Skip to contentSkip to conversation

Adding Vendor Specific IE in the Beacon

ath9k-devel Dani Camps 2 participants 2 messages May 6, 2011

lore
Share & tools
lore

Dani Camps

author
#0 lore raw

Dear all,

I would like to add a Vendor Specific IE in the Beacon frames generated by ath9k. I am however not able to find out where exactly in the code the Beacon frame is constructed. What I have seen is that ath9k requests the beacon frame to mac80211 in the function ath_beacon_generate() by calling ieee80211_beacon_get(). However in ieee80211_beacon_get_tim() it seems that the Beacon data is retrieved from the structure ieee80211_sub_if_data *sdata, that has been previously populated. In particular the following lines seem relevant in ieee80211_beacon_get_tim():

...
struct ieee80211_sub_if_data *sdata = NULL;
...
sdata = vif_to_sdata(vif);
...
ap = &sdata->u.ap;
beacon = rcu_dereference(ap->beacon);

What I am not able to find out is when and how is the beacon data loaded in sdata->u.ap.beacon ? Any help would be appreciated.

Best Regards

Daniel

#1 lore raw
Quoted 21 lines · Dani Camps

Dear all,

I would like to add a Vendor Specific IE in the Beacon frames generated by ath9k. I am however not able to find out where exactly in the code the Beacon frame is constructed. What I have seen is that ath9k requests the beacon frame to mac80211 in the function ath_beacon_generate() by calling ieee80211_beacon_get(). However in ieee80211_beacon_get_tim() it seems that the Beacon data is retrieved from the structure ieee80211_sub_if_data *sdata, that has been previously populated. In particular the following lines seem relevant in ieee80211_beacon_get_tim():

...
struct ieee80211_sub_if_data *sdata = NULL;
...
sdata = vif_to_sdata(vif);
...
ap = &sdata->u.ap;
beacon = rcu_dereference(ap->beacon);

Quoted 2 lines

What I am not able to find out is when and how is the beacon data loaded in sdata->u.ap.beacon ? Any help would be appreciated.

The beacon template is set by hostapd.

Sujith