* cfg80211: questions regarding cfg80211_ibss_joined()
@ 2009-12-01 12:47 Holger Schurig
2009-12-01 12:54 ` Johannes Berg
0 siblings, 1 reply; 3+ messages in thread
From: Holger Schurig @ 2009-12-01 12:47 UTC (permalink / raw)
To: linux-wireless
Hi !
I'm currently adding IBSS to libertas+cfg80211. Now I'd like
to get some clarifications:
a) when I create a new IBSS and i get a successful response to
the CMD_802_11_AD_HOC_START firmware command, I need to tell
this to cfg80211 somehow.
cfg80211_ibss_joined() seems appropriate, but "iw event"
doesn't show anything. Is this a short-coming or an indication
of an error on my side? Also, "iw wlan info" or "iw wlan link"
doesn't show me anything at all.
b) the docs to cfg80211_ibss_joined() says that I need to call
cfg80211_inform_bss() "with the locally generated beacon". I don't
have any idea which beacon my firmware generates, so I guess I
need to fake some beacon data. Correct? Which IEs should I add?
c) cfg80211_inform_bss() has a field "signal". However, when I
ask my firmware to start beacon, then I don't really have any
signal level. If I add "0", then "iw wlan0 scan dump" shows me
this as a signal:
BSS 02:24:54:25:0f:24 (on wlan0)
freq: 2412
beacon interval: 100
capability: IBSS (0x0002)
signal: 0.00 dBm
last seen: 6184 ms ago
d) And finally, for "u64 timestamp", is it okay to just submit
a zero here?
--
http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cfg80211: questions regarding cfg80211_ibss_joined()
2009-12-01 12:47 cfg80211: questions regarding cfg80211_ibss_joined() Holger Schurig
@ 2009-12-01 12:54 ` Johannes Berg
2009-12-01 13:17 ` Holger Schurig
0 siblings, 1 reply; 3+ messages in thread
From: Johannes Berg @ 2009-12-01 12:54 UTC (permalink / raw)
To: Holger Schurig; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1665 bytes --]
On Tue, 2009-12-01 at 13:47 +0100, Holger Schurig wrote:
> Hi !
>
> I'm currently adding IBSS to libertas+cfg80211. Now I'd like
> to get some clarifications:
>
> a) when I create a new IBSS and i get a successful response to
> the CMD_802_11_AD_HOC_START firmware command, I need to tell
> this to cfg80211 somehow.
>
> cfg80211_ibss_joined() seems appropriate, but "iw event"
> doesn't show anything. Is this a short-coming or an indication
> of an error on my side? Also, "iw wlan info" or "iw wlan link"
> doesn't show me anything at all.
Are you running into the WARN_ON(!bss)?
> b) the docs to cfg80211_ibss_joined() says that I need to call
> cfg80211_inform_bss() "with the locally generated beacon". I don't
> have any idea which beacon my firmware generates, so I guess I
> need to fake some beacon data. Correct? Which IEs should I add?
As close to what your firmware is generating as you can get ...
> c) cfg80211_inform_bss() has a field "signal". However, when I
> ask my firmware to start beacon, then I don't really have any
> signal level. If I add "0", then "iw wlan0 scan dump" shows me
> this as a signal:
>
> BSS 02:24:54:25:0f:24 (on wlan0)
> freq: 2412
> beacon interval: 100
> capability: IBSS (0x0002)
> signal: 0.00 dBm
> last seen: 6184 ms ago
Eep. Yeah that seems like a bug, I guess for an IBSS we shouldn't be
adding the signal attribute at all.
> d) And finally, for "u64 timestamp", is it okay to just submit
> a zero here?
Probably shouldn't be added for an IBSS either in nl80211.
johannes
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cfg80211: questions regarding cfg80211_ibss_joined()
2009-12-01 12:54 ` Johannes Berg
@ 2009-12-01 13:17 ` Holger Schurig
0 siblings, 0 replies; 3+ messages in thread
From: Holger Schurig @ 2009-12-01 13:17 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
> Are you running into the WARN_ON(!bss)?
No, I didn't get a bug, warning nor any output.
In the mean-time I found that this was because I didn't provide
any IE (I just submitted NULL & 0 to cfg80211_inform_bss).
Now I make a fake-IE with just WLAN_EID_SSID, and now I get
some "iw event" output:
# iw event
wlan0 (phy #0): IBSS 02:2a:ea:f0:a5:ef joined
> > need to fake some beacon data. Correct? Which IEs should
> > I add?
>
> As close to what your firmware is generating as you can get ...
Okay, will fire up wireshark :-)
--
http://www.holgerschurig.de
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-12-01 13:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 12:47 cfg80211: questions regarding cfg80211_ibss_joined() Holger Schurig
2009-12-01 12:54 ` Johannes Berg
2009-12-01 13:17 ` Holger Schurig
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).