diff options
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/core.h | 7 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/init.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/main.c | 4 |
4 files changed, 6 insertions, 11 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index 4284a41ff775..a70d2ac9e47b 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -223,7 +223,7 @@ static bool ath6kl_cfg80211_ready(struct ath6kl *ar) | |||
223 | return false; | 223 | return false; |
224 | } | 224 | } |
225 | 225 | ||
226 | if (ar->wlan_state == WLAN_DISABLED) { | 226 | if (!test_bit(WLAN_ENABLED, &ar->flag)) { |
227 | ath6kl_err("wlan disabled\n"); | 227 | ath6kl_err("wlan disabled\n"); |
228 | return false; | 228 | return false; |
229 | } | 229 | } |
diff --git a/drivers/net/wireless/ath/ath6kl/core.h b/drivers/net/wireless/ath/ath6kl/core.h index 86177f0b98a5..67784752533f 100644 --- a/drivers/net/wireless/ath/ath6kl/core.h +++ b/drivers/net/wireless/ath/ath6kl/core.h | |||
@@ -134,11 +134,6 @@ enum sme_state { | |||
134 | SME_CONNECTED | 134 | SME_CONNECTED |
135 | }; | 135 | }; |
136 | 136 | ||
137 | enum ath6kl_wlan_state { | ||
138 | WLAN_DISABLED, | ||
139 | WLAN_ENABLED | ||
140 | }; | ||
141 | |||
142 | struct skb_hold_q { | 137 | struct skb_hold_q { |
143 | struct sk_buff *skb; | 138 | struct sk_buff *skb; |
144 | bool is_amsdu; | 139 | bool is_amsdu; |
@@ -365,6 +360,7 @@ struct ath6kl_req_key { | |||
365 | #define DESTROY_IN_PROGRESS 9 | 360 | #define DESTROY_IN_PROGRESS 9 |
366 | #define NETDEV_REGISTERED 10 | 361 | #define NETDEV_REGISTERED 10 |
367 | #define SKIP_SCAN 11 | 362 | #define SKIP_SCAN 11 |
363 | #define WLAN_ENABLED 12 | ||
368 | 364 | ||
369 | struct ath6kl { | 365 | struct ath6kl { |
370 | struct device *dev; | 366 | struct device *dev; |
@@ -401,7 +397,6 @@ struct ath6kl { | |||
401 | u8 tx_pwr; | 397 | u8 tx_pwr; |
402 | struct net_device_stats net_stats; | 398 | struct net_device_stats net_stats; |
403 | struct target_stats target_stats; | 399 | struct target_stats target_stats; |
404 | enum ath6kl_wlan_state wlan_state; | ||
405 | struct ath6kl_node_mapping node_map[MAX_NODE_NUM]; | 400 | struct ath6kl_node_mapping node_map[MAX_NODE_NUM]; |
406 | u8 ibss_ps_enable; | 401 | u8 ibss_ps_enable; |
407 | u8 node_num; | 402 | u8 node_num; |
diff --git a/drivers/net/wireless/ath/ath6kl/init.c b/drivers/net/wireless/ath/ath6kl/init.c index fe61871e9874..d574d08f9863 100644 --- a/drivers/net/wireless/ath/ath6kl/init.c +++ b/drivers/net/wireless/ath/ath6kl/init.c | |||
@@ -584,7 +584,7 @@ struct ath6kl *ath6kl_core_alloc(struct device *sdev) | |||
584 | init_netdev(dev); | 584 | init_netdev(dev); |
585 | 585 | ||
586 | ar->net_dev = dev; | 586 | ar->net_dev = dev; |
587 | ar->wlan_state = WLAN_ENABLED; | 587 | set_bit(WLAN_ENABLED, &ar->flag); |
588 | 588 | ||
589 | ar->wlan_pwr_state = WLAN_POWER_STATE_ON; | 589 | ar->wlan_pwr_state = WLAN_POWER_STATE_ON; |
590 | 590 | ||
@@ -1239,7 +1239,7 @@ void ath6kl_stop_txrx(struct ath6kl *ar) | |||
1239 | if (ar->wlan_pwr_state != WLAN_POWER_STATE_CUT_PWR) | 1239 | if (ar->wlan_pwr_state != WLAN_POWER_STATE_CUT_PWR) |
1240 | ath6kl_stop_endpoint(ndev, false, true); | 1240 | ath6kl_stop_endpoint(ndev, false, true); |
1241 | 1241 | ||
1242 | ar->wlan_state = WLAN_DISABLED; | 1242 | clear_bit(WLAN_ENABLED, &ar->flag); |
1243 | } | 1243 | } |
1244 | 1244 | ||
1245 | /* | 1245 | /* |
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c index f325a23dfff0..284e3e96ff3e 100644 --- a/drivers/net/wireless/ath/ath6kl/main.c +++ b/drivers/net/wireless/ath/ath6kl/main.c | |||
@@ -1275,7 +1275,7 @@ static int ath6kl_open(struct net_device *dev) | |||
1275 | 1275 | ||
1276 | spin_lock_irqsave(&ar->lock, flags); | 1276 | spin_lock_irqsave(&ar->lock, flags); |
1277 | 1277 | ||
1278 | ar->wlan_state = WLAN_ENABLED; | 1278 | set_bit(WLAN_ENABLED, &ar->flag); |
1279 | 1279 | ||
1280 | if (test_bit(CONNECTED, &ar->flag)) { | 1280 | if (test_bit(CONNECTED, &ar->flag)) { |
1281 | netif_carrier_on(dev); | 1281 | netif_carrier_on(dev); |
@@ -1301,7 +1301,7 @@ static int ath6kl_close(struct net_device *dev) | |||
1301 | 0, 0, 0)) | 1301 | 0, 0, 0)) |
1302 | return -EIO; | 1302 | return -EIO; |
1303 | 1303 | ||
1304 | ar->wlan_state = WLAN_DISABLED; | 1304 | clear_bit(WLAN_ENABLED, &ar->flag); |
1305 | } | 1305 | } |
1306 | 1306 | ||
1307 | ath6kl_cfg80211_scan_complete_event(ar, -ECANCELED); | 1307 | ath6kl_cfg80211_scan_complete_event(ar, -ECANCELED); |