mac80211: introduce hw config change flags
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rt2x00 / rt2x00mac.c
index 485c40de5cc0448f02cd93aa78790696c55cfbf2..da7b49a364fff45a3e7571619d7fdc96c036035d 100644 (file)
@@ -335,9 +335,10 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
 }
 EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface);
 
-int rt2x00mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
+int rt2x00mac_config(struct ieee80211_hw *hw, u32 changed)
 {
        struct rt2x00_dev *rt2x00dev = hw->priv;
+       struct ieee80211_conf *conf = &hw->conf;
        int radio_on;
        int status;
 
@@ -543,7 +544,8 @@ int rt2x00mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
         * provided but key 0 is not, then the key is not found
         * by the hardware during RX).
         */
-       key->hw_key_idx = 0;
+       if (cmd == SET_KEY)
+               key->hw_key_idx = 0;
 
        if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE)
                set_key = rt2x00dev->ops->lib->config_pairwise_key;