* [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
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
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-11 14:43 ` Luciano Coelho
1 sibling, 1 reply; 11+ messages in thread
From: Johannes Berg @ 2011-10-07 16:20 UTC (permalink / raw)
To: Shahar Lev; +Cc: linux-wireless, Luciano Coelho
On Fri, 2011-10-07 at 18:17 +0200, Shahar Lev wrote:
> mac80211 sets the carrier on an IBSS interface even when no network is
> joined.
Maybe you should also change that? :-)
johannes
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-07 16:20 ` Johannes Berg
@ 2011-10-07 21:03 ` Shahar Lev
2011-10-07 21:17 ` Luciano Coelho
0 siblings, 1 reply; 11+ messages in thread
From: Shahar Lev @ 2011-10-07 21:03 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Luciano Coelho
On Fri, Oct 7, 2011 at 6:20 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> Maybe you should also change that? :-)
Consider it added to our collective TODO.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-07 21:03 ` Shahar Lev
@ 2011-10-07 21:17 ` Luciano Coelho
2011-10-08 19:19 ` Arik Nemtsov
0 siblings, 1 reply; 11+ messages in thread
From: Luciano Coelho @ 2011-10-07 21:17 UTC (permalink / raw)
To: Shahar Lev; +Cc: Johannes Berg, linux-wireless
On Fri, 2011-10-07 at 23:03 +0200, Shahar Lev wrote:
> On Fri, Oct 7, 2011 at 6:20 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > Maybe you should also change that? :-)
>
> Consider it added to our collective TODO.
Well, the fix is probably supposed to be done in mac80211, instead of
hiding the bug by removing the warning, isn't it?
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-07 21:17 ` Luciano Coelho
@ 2011-10-08 19:19 ` Arik Nemtsov
2011-10-08 19:45 ` Luciano Coelho
0 siblings, 1 reply; 11+ messages in thread
From: Arik Nemtsov @ 2011-10-08 19:19 UTC (permalink / raw)
To: Luciano Coelho; +Cc: Shahar Lev, Johannes Berg, linux-wireless
On Fri, Oct 7, 2011 at 23:17, Luciano Coelho <coelho@ti.com> wrote:
> On Fri, 2011-10-07 at 23:03 +0200, Shahar Lev wrote:
>> On Fri, Oct 7, 2011 at 6:20 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> > Maybe you should also change that? :-)
>>
>> Consider it added to our collective TODO.
>
> Well, the fix is probably supposed to be done in mac80211, instead of
> hiding the bug by removing the warning, isn't it?
Sometimes data is sent when the IBSS interface is not connected.
wl12xx handles this correctly by throwing the packets. In this sense
there's no "bug".
All this patch does is remove warning messages that confuse the users
(and developers).
I agree fixing mac80211 is the better thing to do, and we'll get to it
when time permits.
Arik
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-08 19:19 ` Arik Nemtsov
@ 2011-10-08 19:45 ` Luciano Coelho
2011-10-08 19:55 ` Arik Nemtsov
0 siblings, 1 reply; 11+ messages in thread
From: Luciano Coelho @ 2011-10-08 19:45 UTC (permalink / raw)
To: Arik Nemtsov; +Cc: Shahar Lev, Johannes Berg, linux-wireless
On Sat, 2011-10-08 at 21:19 +0200, Arik Nemtsov wrote:
> On Fri, Oct 7, 2011 at 23:17, Luciano Coelho <coelho@ti.com> wrote:
> > On Fri, 2011-10-07 at 23:03 +0200, Shahar Lev wrote:
> >> On Fri, Oct 7, 2011 at 6:20 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >> > Maybe you should also change that? :-)
> >>
> >> Consider it added to our collective TODO.
> >
> > Well, the fix is probably supposed to be done in mac80211, instead of
> > hiding the bug by removing the warning, isn't it?
>
> Sometimes data is sent when the IBSS interface is not connected.
> wl12xx handles this correctly by throwing the packets. In this sense
> there's no "bug".
> All this patch does is remove warning messages that confuse the users
> (and developers).
>
> I agree fixing mac80211 is the better thing to do, and we'll get to it
> when time permits.
Okay, not a big problem to do this in the driver.
But what I meant with "the bug" was that, if this can be avoided in
mac80211, why not do it there? Is it a a big effort to do it in
mac80211?
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-08 19:45 ` Luciano Coelho
@ 2011-10-08 19:55 ` Arik Nemtsov
2011-10-08 20:02 ` Luciano Coelho
0 siblings, 1 reply; 11+ messages in thread
From: Arik Nemtsov @ 2011-10-08 19:55 UTC (permalink / raw)
To: Luciano Coelho; +Cc: Shahar Lev, Johannes Berg, linux-wireless
On Sat, Oct 8, 2011 at 21:45, Luciano Coelho <coelho@ti.com> wrote:
>
> But what I meant with "the bug" was that, if this can be avoided in
> mac80211, why not do it there? Is it a a big effort to do it in
> mac80211?
Not sure it's a big effort, but it requires testing etc. I'm afraid
we're all pretty busy with other stuff right now :)
Arik
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-08 19:55 ` Arik Nemtsov
@ 2011-10-08 20:02 ` Luciano Coelho
2011-10-08 20:30 ` Shahar Lev
0 siblings, 1 reply; 11+ messages in thread
From: Luciano Coelho @ 2011-10-08 20:02 UTC (permalink / raw)
To: Arik Nemtsov; +Cc: Shahar Lev, Johannes Berg, linux-wireless
On Sat, 2011-10-08 at 21:55 +0200, Arik Nemtsov wrote:
> On Sat, Oct 8, 2011 at 21:45, Luciano Coelho <coelho@ti.com> wrote:
> >
> > But what I meant with "the bug" was that, if this can be avoided in
> > mac80211, why not do it there? Is it a a big effort to do it in
> > mac80211?
>
> Not sure it's a big effort, but it requires testing etc. I'm afraid
> we're all pretty busy with other stuff right now :)
Not a very good excuse when it comes to upstreaming, but okay, I'll take
this in anyway. :)
Thanks, Shahar, and welcome! :)
(BTW, Shahar Lev is not to be confused with Shahar Levi, as they are two
different persons :)
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-08 20:02 ` Luciano Coelho
@ 2011-10-08 20:30 ` Shahar Lev
0 siblings, 0 replies; 11+ messages in thread
From: Shahar Lev @ 2011-10-08 20:30 UTC (permalink / raw)
To: Luciano Coelho; +Cc: Arik Nemtsov, Johannes Berg, linux-wireless
Part of a plot to increase the chances of my submissions getting
through by posing as Mr. Levi.
Thanks,
The Other Shahar
On Sat, Oct 8, 2011 at 10:02 PM, Luciano Coelho <coelho@ti.com> wrote:
> On Sat, 2011-10-08 at 21:55 +0200, Arik Nemtsov wrote:
>> On Sat, Oct 8, 2011 at 21:45, Luciano Coelho <coelho@ti.com> wrote:
>> >
>> > But what I meant with "the bug" was that, if this can be avoided in
>> > mac80211, why not do it there? Is it a a big effort to do it in
>> > mac80211?
>>
>> Not sure it's a big effort, but it requires testing etc. I'm afraid
>> we're all pretty busy with other stuff right now :)
>
> Not a very good excuse when it comes to upstreaming, but okay, I'll take
> this in anyway. :)
>
> Thanks, Shahar, and welcome! :)
>
> (BTW, Shahar Lev is not to be confused with Shahar Levi, as they are two
> different persons :)
>
> --
> Cheers,
> Luca.
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-07 16:17 [PATCH] wl12xx: remove warning message during IBSS Tx Shahar Lev
2011-10-07 16:20 ` Johannes Berg
@ 2011-10-11 14:43 ` Luciano Coelho
2011-10-11 16:18 ` Luciano Coelho
1 sibling, 1 reply; 11+ messages in thread
From: Luciano Coelho @ 2011-10-11 14:43 UTC (permalink / raw)
To: Shahar Lev; +Cc: linux-wireless
On Fri, 2011-10-07 at 18:17 +0200, Shahar Lev wrote:
> 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>
> ---
Applied, thanks!
--
Cheers,
Luca.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] wl12xx: remove warning message during IBSS Tx
2011-10-11 14:43 ` Luciano Coelho
@ 2011-10-11 16:18 ` Luciano Coelho
0 siblings, 0 replies; 11+ messages in thread
From: Luciano Coelho @ 2011-10-11 16:18 UTC (permalink / raw)
To: Shahar Lev; +Cc: linux-wireless
On Tue, 2011-10-11 at 17:43 +0300, Luciano Coelho wrote:
> On Fri, 2011-10-07 at 18:17 +0200, Shahar Lev wrote:
> > 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>
> > ---
>
> Applied, thanks!
Actually I had to merge this with Eliad's vif patches, so I did this
before applying:
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index 1bc00ca..27a45e1 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -429,7 +429,7 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif,
hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
if (hlid == WL12XX_INVALID_LINK_ID) {
if (wlvif->bss_type == BSS_TYPE_IBSS &&
- !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags)) {
+ !test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) {
/* It's ok to drop packets when not joined to IBSS */
wl1271_debug(DEBUG_TX, "dropping skb while IBSS not "
" joined");
--
Cheers,
Luca.
^ 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;
as well as URLs for NNTP newsgroup(s).