summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-04-30 14:08:00 -0700
committerReinette Chatre <reinette.chatre@intel.com>2010-05-13 10:42:32 -0700
commit0af8bcae6f44aa440e51b1925635fb835cd68058 (patch)
tree99256de08f84d6b2e6db87ec32b3471ed5bb3b89 /drivers/net/wireless/iwlwifi/iwl-agn-tx.c
parentfd76f148ebc67d662f71f00128c8ddb0538168c0 (diff)
downloadtalos-obmc-linux-0af8bcae6f44aa440e51b1925635fb835cd68058.tar.gz
talos-obmc-linux-0af8bcae6f44aa440e51b1925635fb835cd68058.zip
iwlwifi: introduce iwl_sta_id_or_broadcast
There are now five places where we need to look up the station ID, but the sta pointer may be NULL due to mac80211 passing that to indicate a certain special state. Replace all these by a new inline function, called iwl_sta_id_or_broadcast(), and add documentation about when to use it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-agn-tx.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-tx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
index c402bfc83f36..18b15466fce1 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -567,10 +567,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
hdr_len = ieee80211_hdrlen(fc);
/* Find index into station table for destination station */
- if (!info->control.sta)
- sta_id = priv->hw_params.bcast_sta_id;
- else
- sta_id = iwl_sta_id(info->control.sta);
+ sta_id = iwl_sta_id_or_broadcast(priv, info->control.sta);
if (sta_id == IWL_INVALID_STATION) {
IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
hdr->addr1);
OpenPOWER on IntegriCloud