aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl3945-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c19
1 files changed, 4 insertions, 15 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 4c78783a6035..68b8a1af3be7 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -509,10 +509,7 @@ static int iwl3945_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
509 hdr_len = ieee80211_hdrlen(fc); 509 hdr_len = ieee80211_hdrlen(fc);
510 510
511 /* Find index into station table for destination station */ 511 /* Find index into station table for destination station */
512 if (!info->control.sta) 512 sta_id = iwl_sta_id_or_broadcast(priv, info->control.sta);
513 sta_id = priv->hw_params.bcast_sta_id;
514 else
515 sta_id = iwl_sta_id(info->control.sta);
516 if (sta_id == IWL_INVALID_STATION) { 513 if (sta_id == IWL_INVALID_STATION) {
517 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n", 514 IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
518 hdr->addr1); 515 hdr->addr1);
@@ -3336,17 +3333,9 @@ static int iwl3945_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3336 static_key = !iwl_is_associated(priv); 3333 static_key = !iwl_is_associated(priv);
3337 3334
3338 if (!static_key) { 3335 if (!static_key) {
3339 if (!sta) { 3336 sta_id = iwl_sta_id_or_broadcast(priv, sta);
3340 sta_id = priv->hw_params.bcast_sta_id; 3337 if (sta_id == IWL_INVALID_STATION)
3341 } else { 3338 return -EINVAL;
3342 sta_id = iwl_sta_id(sta);
3343 if (sta_id == IWL_INVALID_STATION) {
3344 IWL_DEBUG_MAC80211(priv,
3345 "leave - %pM not in station map.\n",
3346 sta->addr);
3347 return -EINVAL;
3348 }
3349 }
3350 } 3339 }
3351 3340
3352 mutex_lock(&priv->mutex); 3341 mutex_lock(&priv->mutex);