ath6kl: Fix key configuration to copy at most seq_len from seq
[deliverable/linux.git] / drivers / net / wireless / ath / ath6kl / main.c
index 23da82e148eadc0cd3586b3fb33616b69a762671..5e5f4ca8f3f079488391bf902897991e3ba3e03d 100644 (file)
@@ -442,7 +442,7 @@ static void ath6kl_install_static_wep_keys(struct ath6kl_vif *vif)
                                              WEP_CRYPT,
                                              keyusage,
                                              vif->wep_key_list[index].key_len,
-                                             NULL,
+                                             NULL, 0,
                                              vif->wep_key_list[index].key,
                                              KEY_OP_INIT_VAL, NULL,
                                              NO_SYNC_WMIFLAG);
@@ -477,7 +477,8 @@ void ath6kl_connect_ap_mode_bss(struct ath6kl_vif *vif, u16 channel)
                memset(key_rsc, 0, sizeof(key_rsc));
                res = ath6kl_wmi_addkey_cmd(
                        ar->wmi, vif->fw_vif_idx, ik->key_index, ik->key_type,
-                       GROUP_USAGE, ik->key_len, key_rsc, ik->key,
+                       GROUP_USAGE, ik->key_len, key_rsc, ATH6KL_KEY_SEQ_LEN,
+                       ik->key,
                        KEY_OP_INIT_VAL, NULL, SYNC_BOTH_WMIFLAG);
                if (res) {
                        ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "Delayed "
@@ -1046,15 +1047,15 @@ struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar)
 {
        struct ath6kl_vif *vif;
 
-       spin_lock(&ar->list_lock);
+       spin_lock_bh(&ar->list_lock);
        if (list_empty(&ar->vif_list)) {
-               spin_unlock(&ar->list_lock);
+               spin_unlock_bh(&ar->list_lock);
                return NULL;
        }
 
        vif = list_first_entry(&ar->vif_list, struct ath6kl_vif, list);
 
-       spin_unlock(&ar->list_lock);
+       spin_unlock_bh(&ar->list_lock);
 
        return vif;
 }
@@ -1062,12 +1063,6 @@ struct ath6kl_vif *ath6kl_vif_first(struct ath6kl *ar)
 static int ath6kl_open(struct net_device *dev)
 {
        struct ath6kl_vif *vif = netdev_priv(dev);
-       int ret;
-
-       /* FIXME: how to handle multi vif support? */
-       ret = ath6kl_init_hw_start(vif->ar);
-       if (ret)
-               return ret;
 
        set_bit(WLAN_ENABLED, &vif->flags);
 
@@ -1084,7 +1079,6 @@ static int ath6kl_close(struct net_device *dev)
 {
        struct ath6kl *ar = ath6kl_priv(dev);
        struct ath6kl_vif *vif = netdev_priv(dev);
-       int ret;
 
        netif_stop_queue(dev);
 
@@ -1099,11 +1093,6 @@ static int ath6kl_close(struct net_device *dev)
 
        ath6kl_cfg80211_scan_complete_event(vif, true);
 
-       /* FIXME: how to handle multi vif support? */
-       ret = ath6kl_init_hw_stop(ar);
-       if (ret)
-               return ret;
-
        clear_bit(WLAN_ENABLED, &vif->flags);
 
        return 0;
This page took 0.027377 seconds and 5 git commands to generate.