linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iwlwifi: Make injection of non-broadcast frames work again
@ 2009-08-20 22:08 Gábor Stefanik
  2009-08-21  8:21 ` Johannes Berg
  2009-08-21 16:33 ` reinette chatre
  0 siblings, 2 replies; 11+ messages in thread
From: Gábor Stefanik @ 2009-08-20 22:08 UTC (permalink / raw)
  To: John Linville, Reinette Chatre, Zhu Yi
  Cc: Wey-Yi Guy, Rafael Laufer, ipw3945-devel, linux-wireless

Commit 1ccb84d87d04df3c76cd4352fe69786d8c7cf016 by Wey-Yi Guy
("iwlwifi: clean up unused NL80211_IFTYPE_MONITOR for Monitor mode")
broke injection of non-broadcast frames to unassociated stations
(causing a SYSASSERT for all such injected frames), due to injected
frames no longer automatically getting a broadcast station ID assigned,
and instead ending up with invalid station IDs.
This patch restores the old behavior, fixing the aforementioned
regression.

Signed-off-by: Gábor Stefanik <netrolller.3d@gmail.com>
---
This fixes a regression introduced between 2.6.30 and 2.6.31-rc1.
Please apply to 2.6.31.

 drivers/net/wireless/iwlwifi/iwl-sta.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index c6633fe..81a656f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -1054,7 +1054,8 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
 	__le16 fc = hdr->frame_control;
 
 	/* If this frame is broadcast or management, use broadcast station id */
-	if (!ieee80211_is_data(fc) ||  is_multicast_ether_addr(hdr->addr1))
+	if (!ieee80211_is_data(fc) || is_multicast_ether_addr(hdr->addr1) ||
+	    iwl_is_monitor_mode(priv)) /* Injected frames need broadcast too */
 		return priv->hw_params.bcast_sta_id;
 
 	switch (priv->iw_mode) {
-- 
1.6.2.4




^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-08-21 18:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 22:08 [PATCH] iwlwifi: Make injection of non-broadcast frames work again Gábor Stefanik
2009-08-21  8:21 ` Johannes Berg
2009-08-21 13:21   ` Gábor Stefanik
2009-08-21 13:28     ` Johannes Berg
2009-08-21 16:33 ` reinette chatre
2009-08-21 16:43   ` John W. Linville
2009-08-21 17:24   ` Gábor Stefanik
2009-08-21 17:59     ` reinette chatre
2009-08-21 18:10       ` Gábor Stefanik
2009-08-21 18:24         ` reinette chatre
2009-08-21 18:37           ` Gábor Stefanik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).