ath6kl: Move disconnect timer to vif structure
authorVasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Tue, 25 Oct 2011 14:04:08 +0000 (19:34 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 11 Nov 2011 10:58:48 +0000 (12:58 +0200)
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/cfg80211.c
drivers/net/wireless/ath/ath6kl/core.h
drivers/net/wireless/ath/ath6kl/main.c

index d08f75553c65d35e9195e675e8f6c5ffea364c42..48a70bcea4f489b8d61f078a91d6855f66a5bb8c 100644 (file)
@@ -479,7 +479,7 @@ static int ath6kl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
        if ((!(ar->connect_ctrl_flags & CONNECT_DO_WPA_OFFLOAD)) &&
            ((vif->auth_mode == WPA_PSK_AUTH)
             || (vif->auth_mode == WPA2_PSK_AUTH))) {
-               mod_timer(&ar->disconnect_timer,
+               mod_timer(&vif->disconnect_timer,
                          jiffies + msecs_to_jiffies(DISCON_TIMER_INTVAL));
        }
 
@@ -897,7 +897,7 @@ static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
        if (((vif->auth_mode == WPA_PSK_AUTH)
             || (vif->auth_mode == WPA2_PSK_AUTH))
            && (key_usage & GROUP_USAGE))
-               del_timer(&ar->disconnect_timer);
+               del_timer(&vif->disconnect_timer);
 
        ath6kl_dbg(ATH6KL_DBG_WLAN_CFG,
                   "%s: index %d, key_len %d, key_type 0x%x, key_usage 0x%x, seq_len %d\n",
@@ -2062,16 +2062,15 @@ int ath6kl_register_ieee80211_hw(struct ath6kl *ar)
 
 static int ath6kl_init_if_data(struct ath6kl_vif *vif)
 {
-       struct ath6kl *ar = vif->ar;
-
        vif->aggr_cntxt = aggr_init(vif->ndev);
        if (!vif->aggr_cntxt) {
                ath6kl_err("failed to initialize aggr\n");
                return -ENOMEM;
        }
 
-       setup_timer(&ar->disconnect_timer, disconnect_timer_handler,
+       setup_timer(&vif->disconnect_timer, disconnect_timer_handler,
                    (unsigned long) vif->ndev);
+       set_bit(WMM_ENABLED, &vif->flags);
 
        return 0;
 }
index f15dd6de96d697df34f2f425450ad68b946adc4b..5403116120f183bbd036ba10b31b9d6556e1c17b 100644 (file)
@@ -416,6 +416,7 @@ struct ath6kl_vif {
        struct ath6kl_wep_key wep_key_list[WMI_MAX_KEY_INDEX + 1];
        struct ath6kl_key keys[WMI_MAX_KEY_INDEX + 1];
        struct aggr_info *aggr_cntxt;
+       struct timer_list disconnect_timer;
 };
 
 /* Flag info */
@@ -477,7 +478,6 @@ struct ath6kl {
        struct wmi_ap_mode_stat ap_stats;
        u8 ap_country_code[3];
        struct list_head amsdu_rx_buffer_queue;
-       struct timer_list disconnect_timer;
        u8 rx_meta_ver;
        struct wireless_dev *wdev;
        struct cfg80211_scan_request *scan_req;
index 0bdb73c21cacdbfbdf6acb5fa85a77b51657d59b..d292e17c27fb004b9bcae0332aec9bc80d850751 100644 (file)
@@ -445,7 +445,7 @@ void ath6kl_stop_endpoint(struct net_device *dev, bool keep_profile,
                if (!keep_profile)
                        ath6kl_init_profile_info(ar);
 
-               del_timer(&ar->disconnect_timer);
+               del_timer(&vif->disconnect_timer);
 
                clear_bit(WMI_READY, &ar->flag);
                ath6kl_wmi_shutdown(ar->wmi);
@@ -1396,7 +1396,7 @@ void ath6kl_disconnect_event(struct ath6kl *ar, u8 reason, u8 *bssid,
 
        aggr_reset_state(vif->aggr_cntxt);
 
-       del_timer(&ar->disconnect_timer);
+       del_timer(&vif->disconnect_timer);
 
        ath6kl_dbg(ATH6KL_DBG_WLAN_CONNECT,
                   "disconnect reason is %d\n", reason);