Commit b7bba314 authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: rtl8192e: Remove IS_DOT11D_ENABLE(ieee)

Variable "enabled" is initialized to false and never changed. Therefore
IS_DOT11D_ENABLE(ieee) returns always false. Remove dead code.
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/9e737b2246e0b73c3ad84a4ee09f5e94bf778b3c.1700431464.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f6b64c97
......@@ -18,8 +18,6 @@ void dot11d_init(struct rtllib_device *ieee)
{
struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(ieee);
dot11d_info->enabled = false;
dot11d_info->state = DOT11D_STATE_NONE;
dot11d_info->country_len = 0;
memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
......
......@@ -33,8 +33,6 @@ enum dot11d_state {
*/
struct rt_dot11d_info {
bool enabled;
u16 country_len;
u8 country_buffer[MAX_IE_LEN];
u8 country_src_addr[6];
......@@ -54,8 +52,6 @@ static inline void copy_mac_addr(unsigned char *des, unsigned char *src)
#define GET_DOT11D_INFO(__ieee_dev) \
((struct rt_dot11d_info *)((__ieee_dev)->dot11d_info))
#define IS_DOT11D_ENABLE(__ieee_dev) \
(GET_DOT11D_INFO(__ieee_dev)->enabled)
#define IS_COUNTRY_IE_VALID(__ieee_dev) \
(GET_DOT11D_INFO(__ieee_dev)->country_len > 0)
......
......@@ -492,10 +492,6 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee)
ieee->actscanning = false;
ieee->sync_scan_hurryup = 0;
if (ieee->link_state >= MAC80211_LINKED) {
if (IS_DOT11D_ENABLE(ieee))
dot11d_scan_complete(ieee);
}
mutex_unlock(&ieee->scan_mutex);
ieee->be_scan_inprogress = false;
......@@ -552,8 +548,6 @@ static void rtllib_softmac_scan_wq(void *data)
return;
out:
if (IS_DOT11D_ENABLE(ieee))
dot11d_scan_complete(ieee);
ieee->current_network.channel = last_channel;
out1:
......@@ -609,10 +603,6 @@ static void rtllib_start_scan(struct rtllib_device *ieee)
{
ieee->rtllib_ips_leave_wq(ieee->dev);
if (IS_DOT11D_ENABLE(ieee)) {
if (IS_COUNTRY_IE_VALID(ieee))
RESET_CIE_WATCHDOG(ieee);
}
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN) {
if (ieee->scanning_continue == 0) {
ieee->actscanning = true;
......@@ -625,10 +615,6 @@ static void rtllib_start_scan(struct rtllib_device *ieee)
/* called with wx_mutex held */
void rtllib_start_scan_syncro(struct rtllib_device *ieee)
{
if (IS_DOT11D_ENABLE(ieee)) {
if (IS_COUNTRY_IE_VALID(ieee))
RESET_CIE_WATCHDOG(ieee);
}
ieee->sync_scan_hurryup = 0;
if (ieee->softmac_features & IEEE_SOFTMAC_SCAN)
rtllib_softmac_scan_syncro(ieee);
......@@ -2090,10 +2076,6 @@ static void rtllib_start_bss(struct rtllib_device *ieee)
{
unsigned long flags;
if (IS_DOT11D_ENABLE(ieee) && !IS_COUNTRY_IE_VALID(ieee)) {
if (!ieee->global_domain)
return;
}
/* check if we have already found the net we
* are interested in (if any).
* if not (we are disassociated and we are not
......@@ -2128,8 +2110,6 @@ void rtllib_disassociate(struct rtllib_device *ieee)
if (ieee->softmac_features & IEEE_SOFTMAC_TX_QUEUE)
rtllib_reset_queue(ieee);
if (IS_DOT11D_ENABLE(ieee))
dot11d_reset(ieee);
ieee->link_state = MAC80211_NOLINK;
ieee->is_set_key = false;
ieee->wap_set = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment