]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - net/mac80211/key.c
mac80211: optimise station flags
[mirror_ubuntu-artful-kernel.git] / net / mac80211 / key.c
index 739bee13e813d6a59619155fc2498ec7e650abab..756b157c2edd7a147c9390ec773d173f074117d5 100644 (file)
@@ -278,7 +278,7 @@ static void __ieee80211_key_replace(struct ieee80211_sub_if_data *sdata,
        bool defunikey, defmultikey, defmgmtkey;
 
        if (new)
-               list_add(&new->list, &sdata->key_list);
+               list_add_tail(&new->list, &sdata->key_list);
 
        if (sta && pairwise) {
                rcu_assign_pointer(sta->ptk, new);
@@ -464,7 +464,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
                 * some hardware cannot handle TKIP with QoS, so
                 * we indicate whether QoS could be in use.
                 */
-               if (test_sta_flags(sta, WLAN_STA_WME))
+               if (test_sta_flag(sta, WLAN_STA_WME))
                        key->conf.flags |= IEEE80211_KEY_FLAG_WMM_STA;
        } else {
                if (sdata->vif.type == NL80211_IFTYPE_STATION) {
@@ -478,7 +478,7 @@ int ieee80211_key_link(struct ieee80211_key *key,
                        /* same here, the AP could be using QoS */
                        ap = sta_info_get(key->sdata, key->sdata->u.mgd.bssid);
                        if (ap) {
-                               if (test_sta_flags(ap, WLAN_STA_WME))
+                               if (test_sta_flag(ap, WLAN_STA_WME))
                                        key->conf.flags |=
                                                IEEE80211_KEY_FLAG_WMM_STA;
                        }