Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH] wl12xx: remove warning message during IBSS Tx
@ 2011-10-07 16:17 Shahar Lev
  2011-10-07 16:20 ` Johannes Berg
  2011-10-11 14:43 ` Luciano Coelho
  0 siblings, 2 replies; 11+ messages in thread
From: Shahar Lev @ 2011-10-07 16:17 UTC (permalink / raw)
  To: linux-wireless; +Cc: Luciano Coelho, Shahar Lev

mac80211 sets the carrier on an IBSS interface even when no network is
joined. Ignore garbage frames transmitted on a disconnected IBSS
interface without printing warnings.

Signed-off-by: Shahar Lev <shahar@wizery.com>
---
 drivers/net/wireless/wl12xx/tx.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 1b3d8e3..a3b474b 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -431,7 +431,15 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct sk_buff *skb,
 	}
 	hlid = wl1271_tx_get_hlid(wl, vif, skb);
 	if (hlid == WL12XX_INVALID_LINK_ID) {
-		wl1271_error("invalid hlid. dropping skb 0x%p", skb);
+		if (wlvif->bss_type == BSS_TYPE_IBSS &&
+		    !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags)) {
+			/* It's ok to drop packets when not joined to IBSS */
+			wl1271_debug(DEBUG_TX, "dropping skb while IBSS not "
+				     " joined");
+		} else {
+			wl1271_error("invalid hlid. dropping skb 0x%p", skb);
+		}
+
 		return -EINVAL;
 	}
 
-- 
1.7.4.1


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

end of thread, other threads:[~2011-10-11 16:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-07 16:17 [PATCH] wl12xx: remove warning message during IBSS Tx Shahar Lev
2011-10-07 16:20 ` Johannes Berg
2011-10-07 21:03   ` Shahar Lev
2011-10-07 21:17     ` Luciano Coelho
2011-10-08 19:19       ` Arik Nemtsov
2011-10-08 19:45         ` Luciano Coelho
2011-10-08 19:55           ` Arik Nemtsov
2011-10-08 20:02             ` Luciano Coelho
2011-10-08 20:30               ` Shahar Lev
2011-10-11 14:43 ` Luciano Coelho
2011-10-11 16:18   ` Luciano Coelho

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox