diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-sta.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn-sta.c | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c index f1298cd6a19a..3eb8fd4771b6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-sta.c | |||
@@ -1080,32 +1080,19 @@ static u8 iwlagn_key_sta_id(struct iwl_priv *priv, | |||
1080 | struct ieee80211_sta *sta) | 1080 | struct ieee80211_sta *sta) |
1081 | { | 1081 | { |
1082 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; | 1082 | struct iwl_vif_priv *vif_priv = (void *)vif->drv_priv; |
1083 | u8 sta_id = IWL_INVALID_STATION; | ||
1084 | 1083 | ||
1085 | if (sta) | 1084 | if (sta) |
1086 | sta_id = iwl_sta_id(sta); | 1085 | return iwl_sta_id(sta); |
1087 | 1086 | ||
1088 | /* | 1087 | /* |
1089 | * The device expects GTKs for station interfaces to be | 1088 | * The device expects GTKs for station interfaces to be |
1090 | * installed as GTKs for the AP station. If we have no | 1089 | * installed as GTKs for the AP station. If we have no |
1091 | * station ID, then use the ap_sta_id in that case. | 1090 | * station ID, then use the ap_sta_id in that case. |
1092 | */ | 1091 | */ |
1093 | if (!sta && vif && vif_priv->ctx) { | 1092 | if (vif->type == NL80211_IFTYPE_STATION && vif_priv->ctx) |
1094 | switch (vif->type) { | 1093 | return vif_priv->ctx->ap_sta_id; |
1095 | case NL80211_IFTYPE_STATION: | ||
1096 | sta_id = vif_priv->ctx->ap_sta_id; | ||
1097 | break; | ||
1098 | default: | ||
1099 | /* | ||
1100 | * In all other cases, the key will be | ||
1101 | * used either for TX only or is bound | ||
1102 | * to a station already. | ||
1103 | */ | ||
1104 | break; | ||
1105 | } | ||
1106 | } | ||
1107 | 1094 | ||
1108 | return sta_id; | 1095 | return IWL_INVALID_STATION; |
1109 | } | 1096 | } |
1110 | 1097 | ||
1111 | static int iwlagn_send_sta_key(struct iwl_priv *priv, | 1098 | static int iwlagn_send_sta_key(struct iwl_priv *priv, |