diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 47 |
1 files changed, 5 insertions, 42 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index 8fa4f7a2dc1a..03acad24f677 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -3058,49 +3058,11 @@ static void iwl_mac_update_tkip_key(struct ieee80211_hw *hw, | |||
3058 | struct ieee80211_key_conf *keyconf, const u8 *addr, | 3058 | struct ieee80211_key_conf *keyconf, const u8 *addr, |
3059 | u32 iv32, u16 *phase1key) | 3059 | u32 iv32, u16 *phase1key) |
3060 | { | 3060 | { |
3061 | struct iwl_priv *priv = hw->priv; | ||
3062 | u8 sta_id = IWL_INVALID_STATION; | ||
3063 | unsigned long flags; | ||
3064 | __le16 key_flags = 0; | ||
3065 | int i; | ||
3066 | 3061 | ||
3062 | struct iwl_priv *priv = hw->priv; | ||
3067 | IWL_DEBUG_MAC80211("enter\n"); | 3063 | IWL_DEBUG_MAC80211("enter\n"); |
3068 | 3064 | ||
3069 | sta_id = iwl_find_station(priv, addr); | 3065 | iwl_update_tkip_key(priv, keyconf, addr, iv32, phase1key); |
3070 | if (sta_id == IWL_INVALID_STATION) { | ||
3071 | IWL_DEBUG_MAC80211("leave - %pM not in station map.\n", | ||
3072 | addr); | ||
3073 | return; | ||
3074 | } | ||
3075 | |||
3076 | if (iwl_scan_cancel(priv)) { | ||
3077 | /* cancel scan failed, just live w/ bad key and rely | ||
3078 | briefly on SW decryption */ | ||
3079 | return; | ||
3080 | } | ||
3081 | |||
3082 | key_flags |= (STA_KEY_FLG_TKIP | STA_KEY_FLG_MAP_KEY_MSK); | ||
3083 | key_flags |= cpu_to_le16(keyconf->keyidx << STA_KEY_FLG_KEYID_POS); | ||
3084 | key_flags &= ~STA_KEY_FLG_INVALID; | ||
3085 | |||
3086 | if (sta_id == priv->hw_params.bcast_sta_id) | ||
3087 | key_flags |= STA_KEY_MULTICAST_MSK; | ||
3088 | |||
3089 | spin_lock_irqsave(&priv->sta_lock, flags); | ||
3090 | |||
3091 | priv->stations[sta_id].sta.key.key_flags = key_flags; | ||
3092 | priv->stations[sta_id].sta.key.tkip_rx_tsc_byte2 = (u8) iv32; | ||
3093 | |||
3094 | for (i = 0; i < 5; i++) | ||
3095 | priv->stations[sta_id].sta.key.tkip_rx_ttak[i] = | ||
3096 | cpu_to_le16(phase1key[i]); | ||
3097 | |||
3098 | priv->stations[sta_id].sta.sta.modify_mask = STA_MODIFY_KEY_MASK; | ||
3099 | priv->stations[sta_id].sta.mode = STA_CONTROL_MODIFY_MSK; | ||
3100 | |||
3101 | iwl_send_add_sta(priv, &priv->stations[sta_id].sta, CMD_ASYNC); | ||
3102 | |||
3103 | spin_unlock_irqrestore(&priv->sta_lock, flags); | ||
3104 | 3066 | ||
3105 | IWL_DEBUG_MAC80211("leave\n"); | 3067 | IWL_DEBUG_MAC80211("leave\n"); |
3106 | } | 3068 | } |
@@ -3239,10 +3201,10 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3239 | switch (action) { | 3201 | switch (action) { |
3240 | case IEEE80211_AMPDU_RX_START: | 3202 | case IEEE80211_AMPDU_RX_START: |
3241 | IWL_DEBUG_HT("start Rx\n"); | 3203 | IWL_DEBUG_HT("start Rx\n"); |
3242 | return iwl_rx_agg_start(priv, sta->addr, tid, *ssn); | 3204 | return iwl_sta_rx_agg_start(priv, sta->addr, tid, *ssn); |
3243 | case IEEE80211_AMPDU_RX_STOP: | 3205 | case IEEE80211_AMPDU_RX_STOP: |
3244 | IWL_DEBUG_HT("stop Rx\n"); | 3206 | IWL_DEBUG_HT("stop Rx\n"); |
3245 | return iwl_rx_agg_stop(priv, sta->addr, tid); | 3207 | return iwl_sta_rx_agg_stop(priv, sta->addr, tid); |
3246 | case IEEE80211_AMPDU_TX_START: | 3208 | case IEEE80211_AMPDU_TX_START: |
3247 | IWL_DEBUG_HT("start Tx\n"); | 3209 | IWL_DEBUG_HT("start Tx\n"); |
3248 | return iwl_tx_agg_start(priv, sta->addr, tid, ssn); | 3210 | return iwl_tx_agg_start(priv, sta->addr, tid, ssn); |
@@ -3256,6 +3218,7 @@ static int iwl_mac_ampdu_action(struct ieee80211_hw *hw, | |||
3256 | } | 3218 | } |
3257 | return 0; | 3219 | return 0; |
3258 | } | 3220 | } |
3221 | |||
3259 | static int iwl_mac_get_tx_stats(struct ieee80211_hw *hw, | 3222 | static int iwl_mac_get_tx_stats(struct ieee80211_hw *hw, |
3260 | struct ieee80211_tx_queue_stats *stats) | 3223 | struct ieee80211_tx_queue_stats *stats) |
3261 | { | 3224 | { |