提交 c93007ef 编写于 作者: S Samuel Ortiz 提交者: John W. Linville

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: NSamuel Ortiz <samuel.ortiz@intel.com>
Acked-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 99df630c
...@@ -809,12 +809,19 @@ int iwl3945_hw_txq_free_tfd(struct iwl3945_priv *priv, struct iwl3945_tx_queue * ...@@ -809,12 +809,19 @@ int iwl3945_hw_txq_free_tfd(struct iwl3945_priv *priv, struct iwl3945_tx_queue *
u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr) u8 iwl3945_hw_find_station(struct iwl3945_priv *priv, const u8 *addr)
{ {
int i; int i, start = IWL_AP_ID;
int ret = IWL_INVALID_STATION; int ret = IWL_INVALID_STATION;
unsigned long flags; unsigned long flags;
if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) ||
(priv->iw_mode == NL80211_IFTYPE_AP))
start = IWL_STA_ID;
if (is_broadcast_ether_addr(addr))
return priv->hw_setting.bcast_sta_id;
spin_lock_irqsave(&priv->sta_lock, flags); spin_lock_irqsave(&priv->sta_lock, flags);
for (i = IWL_STA_ID; i < priv->hw_setting.max_stations; i++) for (i = start; i < priv->hw_setting.max_stations; i++)
if ((priv->stations[i].used) && if ((priv->stations[i].used) &&
(!compare_ether_addr (!compare_ether_addr
(priv->stations[i].sta.sta.addr, addr))) { (priv->stations[i].sta.sta.addr, addr))) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册