Skip to content

Commit

Permalink
mac80211: add association capabilty and timing info into bss_conf
Browse files Browse the repository at this point in the history
This patch adds assocation capability, timestamp (tsf) and beacon interval
to bss_conf. This is required for successful assocation of iwlwifi drivers

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Tomas Winkler authored and John W. Linville committed Apr 8, 2008
1 parent 98952d5 commit 21c0cbe
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ enum ieee80211_bss_change {
* @aid: association ID number, valid only when @assoc is true
* @use_cts_prot: use CTS protection
* @use_short_preamble: use 802.11b short preamble
* @timestamp: beacon timestamp
* @beacon_int: beacon interval
* @assoc_capability: capabbilities taken from assoc resp
* @assoc_ht: association in HT mode
* @ht_conf: ht capabilities
* @ht_bss_conf: ht extended capabilities
Expand All @@ -208,6 +211,9 @@ struct ieee80211_bss_conf {
/* erp related data */
bool use_cts_prot;
bool use_short_preamble;
u16 beacon_int;
u16 assoc_capability;
u64 timestamp;
/* ht related data */
bool assoc_ht;
struct ieee80211_ht_info *ht_conf;
Expand Down
9 changes: 8 additions & 1 deletion net/mac80211/ieee80211_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,9 +509,14 @@ static void ieee80211_set_associated(struct net_device *dev,
conf->channel->center_freq,
ifsta->ssid, ifsta->ssid_len);
if (bss) {
/* set timing information */
sdata->bss_conf.beacon_int = bss->beacon_int;
sdata->bss_conf.timestamp = bss->timestamp;

if (bss->has_erp_value)
changed |= ieee80211_handle_erp_ie(
sdata, bss->erp_value);

ieee80211_rx_bss_put(dev, bss);
}

Expand Down Expand Up @@ -2033,8 +2038,10 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
} else
rcu_read_unlock();

/* set AID, ieee80211_set_associated() will tell the driver */
/* set AID and assoc capability,
* ieee80211_set_associated() will tell the driver */
bss_conf->aid = aid;
bss_conf->assoc_capability = capab_info;
ieee80211_set_associated(dev, ifsta, 1);

ieee80211_associated(dev, ifsta);
Expand Down

0 comments on commit 21c0cbe

Please sign in to comment.