diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2008-12-02 15:13:59 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-12-05 09:35:52 -0500 |
commit | c93007efaad0a90520ba73f025c663441bf7e9d6 (patch) | |
tree | f312bdcecabb03ae6ddb396743bbd283aef8b866 /drivers/net/wireless | |
parent | 99df630c3453e4a66b3408212dd8e55bc0e04f54 (diff) |
iwl3945: Select correct sta ID from find_station()
The find_station routine needs to look at the IWL_AP_ID entry if we're a STA.
Currently, it only looks for STA entries which causes HW crypto to fail.
Signed-off-by: Samuel Ortiz <samuel.ortiz@intel.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-3945.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index af77ea70d737..61500044f5da 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -809,12 +809,19 @@ int iwl3945_hw_txq_free_tfd(struct iwl3945_priv *priv, struct iwl3945_tx_queue * | |||
809 | 809 | ||
810 | u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr) | 810 | u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr) |
811 | { | 811 | { |
812 | int i; | 812 | int i, start = IWL_AP_ID; |
813 | int ret = IWL_INVALID_STATION; | 813 | int ret = IWL_INVALID_STATION; |
814 | unsigned long flags; | 814 | unsigned long flags; |
815 | 815 | ||
816 | if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) || | ||
817 | (priv->iw_mode == NL80211_IFTYPE_AP)) | ||
818 | start = IWL_STA_ID; | ||
819 | |||
820 | if (is_broadcast_ether_addr(addr)) | ||
821 | return priv->hw_setting.bcast_sta_id; | ||
822 | |||
816 | spin_lock_irqsave(&priv->sta_lock, flags); | 823 | spin_lock_irqsave(&priv->sta_lock, flags); |
817 | for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++) | 824 | for (i = start; i < priv->hw_setting.max_stations; i++) |
818 | if ((priv->stations[i].used) && | 825 | if ((priv->stations[i].used) && |
819 | (!compare_ether_addr | 826 | (!compare_ether_addr |
820 | (priv->stations[i].sta.sta.addr, addr))) { | 827 | (priv->stations[i].sta.sta.addr, addr))) { |