linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Vendor specific data within a beacon frame
@ 2010-10-07  9:31 Bjoern Czybik
  2010-10-07 18:11 ` Luis R. Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Bjoern Czybik @ 2010-10-07  9:31 UTC (permalink / raw)
  To: linux-wireless

Hi all,

I am a student from Germany and a newbie to Linux device driver 
programming and the wireless drivers.
We are using the ath5k device driver and hostapd.

In our project we are looking to send some specific data within each 
beacon (should be set from the hostapd).
In which struct can I set the vendor specific data in a beacon frame?

Björn

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

* Re: Vendor specific data within a beacon frame
  2010-10-07  9:31 Vendor specific data within a beacon frame Bjoern Czybik
@ 2010-10-07 18:11 ` Luis R. Rodriguez
  2010-10-07 18:15   ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Luis R. Rodriguez @ 2010-10-07 18:11 UTC (permalink / raw)
  To: Bjoern Czybik; +Cc: linux-wireless

On Thu, Oct 7, 2010 at 2:31 AM, Bjoern Czybik <wlfw@gmx.com> wrote:
> Hi all,
>
> I am a student from Germany and a newbie to Linux device driver programming
> and the wireless drivers.
> We are using the ath5k device driver and hostapd.
>
> In our project we are looking to send some specific data within each beacon
> (should be set from the hostapd).
> In which struct can I set the vendor specific data in a beacon frame?

This can be done from userspace. This is from nl80211.h:


 * @NL80211_CMD_SET_MGMT_EXTRA_IE: Set extra IEs for management frames. The
 *      interface is identified with %NL80211_ATTR_IFINDEX and the management
 *      frame subtype with %NL80211_ATTR_MGMT_SUBTYPE. The extra IE data to be
 *      added to the end of the specified management frame is specified with
 *      %NL80211_ATTR_IE. If the command succeeds, the requested data will be
 *      added to all specified management frames generated by
 *      kernel/firmware/driver.
 *      Note: This command has been removed and it is only reserved at this
 *      point to avoid re-using existing command number. The functionality this
 *      command was planned for has been provided with cleaner design with the
 *      option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN,
 *      NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE,
 *      NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE.

  Luis

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

* Re: Vendor specific data within a beacon frame
  2010-10-07 18:11 ` Luis R. Rodriguez
@ 2010-10-07 18:15   ` Johannes Berg
  2010-10-07 18:31     ` Luis R. Rodriguez
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2010-10-07 18:15 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Bjoern Czybik, linux-wireless

On Thu, 2010-10-07 at 11:11 -0700, Luis R. Rodriguez wrote:

Let me quote what you wrote, but just partially:

> This can be done from userspace. This is from nl80211.h:

>  *      Note: This command has been removed and it is only reserved at this
>  *      point to avoid re-using existing command number. The functionality this
>  *      command was planned for has been provided with cleaner design with the
>  *      option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN,
>  *      NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE,
>  *      NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE.

:P

johannes


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

* Re: Vendor specific data within a beacon frame
  2010-10-07 18:15   ` Johannes Berg
@ 2010-10-07 18:31     ` Luis R. Rodriguez
  2010-10-07 18:35       ` Johannes Berg
  0 siblings, 1 reply; 6+ messages in thread
From: Luis R. Rodriguez @ 2010-10-07 18:31 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Bjoern Czybik, linux-wireless

On Thu, Oct 7, 2010 at 11:15 AM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Thu, 2010-10-07 at 11:11 -0700, Luis R. Rodriguez wrote:
>
> Let me quote what you wrote, but just partially:
>
>> This can be done from userspace. This is from nl80211.h:
>
>>  *      Note: This command has been removed and it is only reserved at this
>>  *      point to avoid re-using existing command number. The functionality this
>>  *      command was planned for has been provided with cleaner design with the
>>  *      option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN,
>>  *      NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE,
>>  *      NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE.
>
> :P

Yeah just noticed *after* I pasted it and sent it. Does hostapd use
this currently?

  Luis

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

* Re: Vendor specific data within a beacon frame
  2010-10-07 18:31     ` Luis R. Rodriguez
@ 2010-10-07 18:35       ` Johannes Berg
  2010-10-08 10:50         ` Bjoern Czybik
  0 siblings, 1 reply; 6+ messages in thread
From: Johannes Berg @ 2010-10-07 18:35 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: Bjoern Czybik, linux-wireless

On Thu, 2010-10-07 at 11:31 -0700, Luis R. Rodriguez wrote:
> On Thu, Oct 7, 2010 at 11:15 AM, Johannes Berg
> <johannes@sipsolutions.net> wrote:
> > On Thu, 2010-10-07 at 11:11 -0700, Luis R. Rodriguez wrote:
> >
> > Let me quote what you wrote, but just partially:
> >
> >> This can be done from userspace. This is from nl80211.h:
> >
> >>  *      Note: This command has been removed and it is only reserved at this
> >>  *      point to avoid re-using existing command number. The functionality this
> >>  *      command was planned for has been provided with cleaner design with the
> >>  *      option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN,
> >>  *      NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE,
> >>  *      NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE.
> >
> > :P
> 
> Yeah just noticed *after* I pasted it and sent it. Does hostapd use
> this currently?

No, hostapd transmits frames via injection and the data it puts into the
beacon is conveyed with the beacon cmd -- it has never used this
command.

Really, what the OP is looking for is the annotated hostapd
configuration file or the hostapd source code -- he should be able to
figure that out for himself.

johannes


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

* Re: Vendor specific data within a beacon frame
  2010-10-07 18:35       ` Johannes Berg
@ 2010-10-08 10:50         ` Bjoern Czybik
  0 siblings, 0 replies; 6+ messages in thread
From: Bjoern Czybik @ 2010-10-08 10:50 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Luis R. Rodriguez, linux-wireless, hostap

Ok, I'm sorry I didn't epress myself well.

There is the struct 80211_gmt in the ieee80211_mgmt module in the 
ieeee80211_defs.h, but there is no field for vendor specific data (of 
course it will be set by the hostapd).

 From the hostapd the function ieee802_11_set_beacon(...) calls the 
wpa_driver_nl80211_set_beacon function in driver_nl80211.c (we are using 
the hostapd-0.7.3).
In wpa_driver_nl80211_set_beacon fct. the macro NLA_PUT and NLA_PUT_32 
is used to set the header and tail of a mgmt frame.

If I am right, I have to use the attribute NL80211_ATTR_IE to set 
information elements data with %NL80211_CMD_SET_MGMT_EXTRA_IE (in 
nl80211.h). But in the enum nl80211_commands is written:
     NL80211_CMD_SET_MGMT_EXTRA_IE /* reserved; not used */,

Does somebody knows how to fix it?

Björn

On 07.10.2010 20:35, Johannes Berg wrote:
> On Thu, 2010-10-07 at 11:31 -0700, Luis R. Rodriguez wrote:
>    
>> On Thu, Oct 7, 2010 at 11:15 AM, Johannes Berg
>> <johannes@sipsolutions.net>  wrote:
>>      
>>> On Thu, 2010-10-07 at 11:11 -0700, Luis R. Rodriguez wrote:
>>>
>>> Let me quote what you wrote, but just partially:
>>>
>>>        
>>>> This can be done from userspace. This is from nl80211.h:
>>>>          
>>>        
>>>>   *      Note: This command has been removed and it is only reserved at this
>>>>   *      point to avoid re-using existing command number. The functionality this
>>>>   *      command was planned for has been provided with cleaner design with the
>>>>   *      option to specify additional IEs in NL80211_CMD_TRIGGER_SCAN,
>>>>   *      NL80211_CMD_AUTHENTICATE, NL80211_CMD_ASSOCIATE,
>>>>   *      NL80211_CMD_DEAUTHENTICATE, and NL80211_CMD_DISASSOCIATE.
>>>>          
>>> :P
>>>        
>> Yeah just noticed *after* I pasted it and sent it. Does hostapd use
>> this currently?
>>      
> No, hostapd transmits frames via injection and the data it puts into the
> beacon is conveyed with the beacon cmd -- it has never used this
> command.
>
> Really, what the OP is looking for is the annotated hostapd
> configuration file or the hostapd source code -- he should be able to
> figure that out for himself.
>
> johannes
>    


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

end of thread, other threads:[~2010-10-08 11:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-07  9:31 Vendor specific data within a beacon frame Bjoern Czybik
2010-10-07 18:11 ` Luis R. Rodriguez
2010-10-07 18:15   ` Johannes Berg
2010-10-07 18:31     ` Luis R. Rodriguez
2010-10-07 18:35       ` Johannes Berg
2010-10-08 10:50         ` Bjoern Czybik

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).