2008-12-11 02:13:34

by Larry Finger

[permalink] [raw]
Subject: [PATCH] rtl8187: Fix for change in STA handling in mac80211

After commit ca247d5f50acd4fc6fdc1dec770e726b0d7eda60 "mac80211: only create
default STA interface if supported", rtl8187 stopped working because the
add_interface callback was not called. For reasons that I do not understand,
the IFTYPE_ADHOC bit, as well as the IFTYPE_STATION bit, must be set in the
interface_modes variable.

Signed-off-by: Larry Finger <[email protected]>
---

John,

This should be added to wireless-testing as soon as possible.

Larry
---

Index: wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/rtl818x/rtl8187_dev.c
+++ wireless-testing/drivers/net/wireless/rtl818x/rtl8187_dev.c
@@ -1429,7 +1429,10 @@ static int __devinit rtl8187_probe(struc
* XXX: Once this driver supports anything that requires
* beacons it must implement IEEE80211_TX_CTL_ASSIGN_SEQ.
*/
- dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
+ dev->wiphy->interface_modes =
+ BIT(NL80211_IFTYPE_STATION) |
+ BIT(NL80211_IFTYPE_ADHOC);
+

if ((id->driver_info == DEVICE_RTL8187) && priv->is_rtl8187b)
printk(KERN_INFO "rtl8187: inconsistency between id with OEM"


2008-12-11 11:58:27

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211

--- On Thu, 11/12/08, Johannes Berg <[email protected]> wrote:

> From: Johannes Berg <[email protected]>
> Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211
> To: "Larry Finger" <[email protected]>
> Cc: "John W Linville" <[email protected]>, "Herton Ronaldo Krzesinski" <[email protected]>, "Hin-Tak Leung" <[email protected]>, [email protected]
> Date: Thursday, 11 December, 2008, 8:26 AM
> On Wed, 2008-12-10 at 19:59 -0600, Larry Finger wrote:
> > After commit ca247d5f50acd4fc6fdc1dec770e726b0d7eda60
> "mac80211: only create
> > default STA interface if supported", rtl8187
> stopped working because the
> > add_interface callback was not called. For reasons
> that I do not understand,
> > the IFTYPE_ADHOC bit, as well as the IFTYPE_STATION
> bit, must be set in the
> > interface_modes variable.
>
> Because I'm stupid. Don't apply this patch.

okay - that explains why my wlan* device disappeared last night after upgrading to the latest wireless-testing :-). I knew breakage like that got to be big news in the wireless-testing mailing list, *if only and as soon as I can revert the change to get my wireless connectivity back*.

I better go and check Larry's patch and see how it turns out :-). Write again soon, after I have tested Larry's patch, hopefully.

Hin-Tak






2008-12-11 12:17:14

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211

--- On Thu, 11/12/08, Larry Finger <[email protected]> wrote:

> From: Larry Finger <[email protected]>
<snipped>
> After commit ca247d5f50acd4fc6fdc1dec770e726b0d7eda60
> "mac80211: only create
> default STA interface if supported", rtl8187 stopped
> working because the
> add_interface callback was not called. For reasons that I
> do not understand,
> the IFTYPE_ADHOC bit, as well as the IFTYPE_STATION bit,
> must be set in the
> interface_modes variable.
>
> Signed-off-by: Larry Finger
> <[email protected]>
Tested-by: Hin-Tak Leung <[email protected]>

Okay, the disappeared wlan* device is back.

> John,
>
> This should be added to wireless-testing as soon as
> possible.

I don't know the verdict yet - but I think we need to either revert Johannes's earlier patch, or have this change from Larry incoporated, ASAP.

Hin-Tak




2008-12-11 17:37:38

by Gábor Stefanik

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211

On Thu, Dec 11, 2008 at 6:33 PM, Hin-Tak Leung
<[email protected]> wrote:
> --- On Thu, 11/12/08, Larry Finger <[email protected]> wrote:
>> Hin-Tak Leung wrote:
>> >
>> > I don't know the verdict yet - but I think we need
>> to either revert Johannes's earlier patch, or have this
>> change from Larry incoporated, ASAP.
>> >
>> > Hin-Tak
>>
>> No, the best solution is to incorporate Johannes patch of
>> today. Now that I
>> understand what happened, my patch just wallpapers over his
>> mistake.
>>
>> To explain how that happened, he used
>> NL80211_IFTYPE_STATION (2) when he meant
>> BIT(NL80211_IFTYPE_STATION)(4). My "fix" works
>> because BIT(NL80211_IFTYPE_ADHOC)
>> == NL80211_IFTYPE_STATION.
>
> okay, I like my wlan* device not to disappear. One way or the other, this needs fixing ASAP. It was very weird to put the latest wireless-testing on and wlanX is nowhere to be found :-). I'll dig through the archive for the patch. (still not subscribe to linux-wireless - maybe I should when I figure out gmail's filtering system).
>
> Hin-Tak

A little help: Subscribe, and when you get the first message from the
list, click "Show details", then click "Filter messages from this
mailing list". Gmail will configure the filter criteria for you.

--
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)

2008-12-11 17:33:20

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211

--- On Thu, 11/12/08, Larry Finger <[email protected]> wrote:
> Hin-Tak Leung wrote:
> >
> > I don't know the verdict yet - but I think we need
> to either revert Johannes's earlier patch, or have this
> change from Larry incoporated, ASAP.
> >
> > Hin-Tak
>
> No, the best solution is to incorporate Johannes patch of
> today. Now that I
> understand what happened, my patch just wallpapers over his
> mistake.
>
> To explain how that happened, he used
> NL80211_IFTYPE_STATION (2) when he meant
> BIT(NL80211_IFTYPE_STATION)(4). My "fix" works
> because BIT(NL80211_IFTYPE_ADHOC)
> == NL80211_IFTYPE_STATION.

okay, I like my wlan* device not to disappear. One way or the other, this needs fixing ASAP. It was very weird to put the latest wireless-testing on and wlanX is nowhere to be found :-). I'll dig through the archive for the patch. (still not subscribe to linux-wireless - maybe I should when I figure out gmail's filtering system).

Hin-Tak




2008-12-11 15:33:29

by Larry Finger

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211

Hin-Tak Leung wrote:
>
> I don't know the verdict yet - but I think we need to either revert Johannes's earlier patch, or have this change from Larry incoporated, ASAP.
>
> Hin-Tak

No, the best solution is to incorporate Johannes patch of today. Now that I
understand what happened, my patch just wallpapers over his mistake.

To explain how that happened, he used NL80211_IFTYPE_STATION (2) when he meant
BIT(NL80211_IFTYPE_STATION)(4). My "fix" works because BIT(NL80211_IFTYPE_ADHOC)
== NL80211_IFTYPE_STATION.

Larry




2008-12-11 19:24:24

by Hin-Tak Leung

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211

--- On Thu, 11/12/08, Larry Finger <[email protected]> wrote:

> Hin-Tak Leung wrote:
> >
> > I don't know the verdict yet - but I think we need
> to either revert Johannes's earlier patch, or have this
> change from Larry incoporated, ASAP.
> >
> > Hin-Tak
>
> No, the best solution is to incorporate Johannes patch of
> today. Now that I
> understand what happened, my patch just wallpapers over his
> mistake.
>
> To explain how that happened, he used
> NL80211_IFTYPE_STATION (2) when he meant
> BIT(NL80211_IFTYPE_STATION)(4). My "fix" works
> because BIT(NL80211_IFTYPE_ADHOC)
> == NL80211_IFTYPE_STATION.

Found Johannes's new patch - and using it right now. So I could have a
Tested-by: ... Yes, it makes more sense :-).

Hin-Tak






2008-12-11 08:27:27

by Johannes Berg

[permalink] [raw]
Subject: Re: [PATCH] rtl8187: Fix for change in STA handling in mac80211

On Wed, 2008-12-10 at 19:59 -0600, Larry Finger wrote:
> After commit ca247d5f50acd4fc6fdc1dec770e726b0d7eda60 "mac80211: only create
> default STA interface if supported", rtl8187 stopped working because the
> add_interface callback was not called. For reasons that I do not understand,
> the IFTYPE_ADHOC bit, as well as the IFTYPE_STATION bit, must be set in the
> interface_modes variable.

Because I'm stupid. Don't apply this patch.

johannes


Attachments:
signature.asc (836.00 B)
This is a digitally signed message part