aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-4965.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c40
1 files changed, 4 insertions, 36 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index be4cc5ffa742..f318c50a1a8f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -492,38 +492,6 @@ int iwl4965_hw_rxq_stop(struct iwl_priv *priv)
492 return 0; 492 return 0;
493} 493}
494 494
495u8 iwl4965_hw_find_station(struct iwl_priv *priv, const u8 *addr)
496{
497 int i;
498 int start = 0;
499 int ret = IWL_INVALID_STATION;
500 unsigned long flags;
501 DECLARE_MAC_BUF(mac);
502
503 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) ||
504 (priv->iw_mode == IEEE80211_IF_TYPE_AP))
505 start = IWL_STA_ID;
506
507 if (is_broadcast_ether_addr(addr))
508 return priv->hw_params.bcast_sta_id;
509
510 spin_lock_irqsave(&priv->sta_lock, flags);
511 for (i = start; i < priv->hw_params.max_stations; i++)
512 if ((priv->stations[i].used) &&
513 (!compare_ether_addr
514 (priv->stations[i].sta.sta.addr, addr))) {
515 ret = i;
516 goto out;
517 }
518
519 IWL_DEBUG_ASSOC_LIMIT("can not find STA %s total %d\n",
520 print_mac(mac, addr), priv->num_stations);
521
522 out:
523 spin_unlock_irqrestore(&priv->sta_lock, flags);
524 return ret;
525}
526
527static int iwl4965_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max) 495static int iwl4965_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max)
528{ 496{
529 int ret; 497 int ret;
@@ -3125,7 +3093,7 @@ static void iwl4965_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id)
3125static void iwl4965_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr) 3093static void iwl4965_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr)
3126{ 3094{
3127 /* FIXME: need locking over ps_status ??? */ 3095 /* FIXME: need locking over ps_status ??? */
3128 u8 sta_id = iwl4965_hw_find_station(priv, addr); 3096 u8 sta_id = iwl_find_station(priv, addr);
3129 3097
3130 if (sta_id != IWL_INVALID_STATION) { 3098 if (sta_id != IWL_INVALID_STATION) {
3131 u8 sta_awake = priv->stations[sta_id]. 3099 u8 sta_awake = priv->stations[sta_id].
@@ -4112,7 +4080,7 @@ static int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, const u8 *da,
4112 IWL_WARNING("%s on da = %s tid = %d\n", 4080 IWL_WARNING("%s on da = %s tid = %d\n",
4113 __func__, print_mac(mac, da), tid); 4081 __func__, print_mac(mac, da), tid);
4114 4082
4115 sta_id = iwl4965_hw_find_station(priv, da); 4083 sta_id = iwl_find_station(priv, da);
4116 if (sta_id == IWL_INVALID_STATION) 4084 if (sta_id == IWL_INVALID_STATION)
4117 return -ENXIO; 4085 return -ENXIO;
4118 4086
@@ -4171,7 +4139,7 @@ static int iwl4965_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, const u8 *da,
4171 else 4139 else
4172 return -EINVAL; 4140 return -EINVAL;
4173 4141
4174 sta_id = iwl4965_hw_find_station(priv, da); 4142 sta_id = iwl_find_station(priv, da);
4175 4143
4176 if (sta_id == IWL_INVALID_STATION) 4144 if (sta_id == IWL_INVALID_STATION)
4177 return -ENXIO; 4145 return -ENXIO;
@@ -4221,7 +4189,7 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
4221 4189
4222 IWL_DEBUG_HT("A-MPDU action on da=%s tid=%d ", 4190 IWL_DEBUG_HT("A-MPDU action on da=%s tid=%d ",
4223 print_mac(mac, addr), tid); 4191 print_mac(mac, addr), tid);
4224 sta_id = iwl4965_hw_find_station(priv, addr); 4192 sta_id = iwl_find_station(priv, addr);
4225 switch (action) { 4193 switch (action) {
4226 case IEEE80211_AMPDU_RX_START: 4194 case IEEE80211_AMPDU_RX_START:
4227 IWL_DEBUG_HT("start Rx\n"); 4195 IWL_DEBUG_HT("start Rx\n");