diff options
author | Johannes Berg <johannes.berg@intel.com> | 2013-03-06 13:15:21 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-03-20 12:02:12 +0100 |
commit | 6caffd4f9d11cbd9651d93a511ac385ce84aab83 (patch) | |
tree | 2605745846dcc8c4d3e8a389ce264efa715ab9c5 /drivers/net/wireless/iwlwifi/mvm | |
parent | b9545b48ff4c725ea71f1d9fd9b78da08ddd6551 (diff) | |
download | talos-op-linux-6caffd4f9d11cbd9651d93a511ac385ce84aab83.tar.gz talos-op-linux-6caffd4f9d11cbd9651d93a511ac385ce84aab83.zip |
iwlwifi: mvm: suppress key error messages in AP mode
In AP mode, don't attempt to program GTKs into the
device, they're used for TX only so not needed and
programming them causes error messages. Also, in
this case and if key programming fails, avoid trying
to remove the key that isn't present later.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/mac80211.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index ed2d8754c82b..f64bca5da450 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -1087,6 +1087,13 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, switch (cmd) { case SET_KEY: + if (vif->type == NL80211_IFTYPE_AP && !sta) { + /* GTK on AP interface is a TX-only key, return 0 */ + ret = 0; + key->hw_key_idx = STA_KEY_IDX_INVALID; + break; + } + IWL_DEBUG_MAC80211(mvm, "set hwcrypto key\n"); ret = iwl_mvm_set_sta_key(mvm, vif, sta, key, false); if (ret) { @@ -1095,11 +1102,17 @@ static int iwl_mvm_mac_set_key(struct ieee80211_hw *hw, * can't add key for RX, but we don't need it * in the device for TX so still return 0 */ + key->hw_key_idx = STA_KEY_IDX_INVALID; ret = 0; } break; case DISABLE_KEY: + if (key->hw_key_idx == STA_KEY_IDX_INVALID) { + ret = 0; + break; + } + IWL_DEBUG_MAC80211(mvm, "disable hwcrypto key\n"); ret = iwl_mvm_remove_sta_key(mvm, vif, sta, key); break; |