return false;
}
- if (ar->wlan_state == WLAN_DISABLED) {
+ if (!test_bit(WLAN_ENABLED, &ar->flag)) {
ath6kl_err("wlan disabled\n");
return false;
}
SME_CONNECTED
};
-enum ath6kl_wlan_state {
- WLAN_DISABLED,
- WLAN_ENABLED
-};
-
struct skb_hold_q {
struct sk_buff *skb;
bool is_amsdu;
#define DESTROY_IN_PROGRESS 9
#define NETDEV_REGISTERED 10
#define SKIP_SCAN 11
+#define WLAN_ENABLED 12
struct ath6kl {
struct device *dev;
u8 tx_pwr;
struct net_device_stats net_stats;
struct target_stats target_stats;
- enum ath6kl_wlan_state wlan_state;
struct ath6kl_node_mapping node_map[MAX_NODE_NUM];
u8 ibss_ps_enable;
u8 node_num;
init_netdev(dev);
ar->net_dev = dev;
- ar->wlan_state = WLAN_ENABLED;
+ set_bit(WLAN_ENABLED, &ar->flag);
ar->wlan_pwr_state = WLAN_POWER_STATE_ON;
if (ar->wlan_pwr_state != WLAN_POWER_STATE_CUT_PWR)
ath6kl_stop_endpoint(ndev, false, true);
- ar->wlan_state = WLAN_DISABLED;
+ clear_bit(WLAN_ENABLED, &ar->flag);
}
/*
spin_lock_irqsave(&ar->lock, flags);
- ar->wlan_state = WLAN_ENABLED;
+ set_bit(WLAN_ENABLED, &ar->flag);
if (test_bit(CONNECTED, &ar->flag)) {
netif_carrier_on(dev);
0, 0, 0))
return -EIO;
- ar->wlan_state = WLAN_DISABLED;
+ clear_bit(WLAN_ENABLED, &ar->flag);
}
ath6kl_cfg80211_scan_complete_event(ar, -ECANCELED);