diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-03-28 19:33:34 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-04-08 15:05:56 -0400 |
commit | 21c0cbe760ca6b5d4c6927c3ec1352a843a8c11c (patch) | |
tree | e1f086fd604c2834a8426effd289f609a746e1fe | |
parent | 98952d5decf8195b2cbb96d47572278335a8a8d8 (diff) |
mac80211: add association capabilty and timing info into bss_conf
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>
-rw-r--r-- | include/net/mac80211.h | 6 | ||||
-rw-r--r-- | net/mac80211/ieee80211_sta.c | 9 |
2 files changed, 14 insertions, 1 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 5174eaa89500..01b32152b89e 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -197,6 +197,9 @@ enum ieee80211_bss_change { | |||
197 | * @aid: association ID number, valid only when @assoc is true | 197 | * @aid: association ID number, valid only when @assoc is true |
198 | * @use_cts_prot: use CTS protection | 198 | * @use_cts_prot: use CTS protection |
199 | * @use_short_preamble: use 802.11b short preamble | 199 | * @use_short_preamble: use 802.11b short preamble |
200 | * @timestamp: beacon timestamp | ||
201 | * @beacon_int: beacon interval | ||
202 | * @assoc_capability: capabbilities taken from assoc resp | ||
200 | * @assoc_ht: association in HT mode | 203 | * @assoc_ht: association in HT mode |
201 | * @ht_conf: ht capabilities | 204 | * @ht_conf: ht capabilities |
202 | * @ht_bss_conf: ht extended capabilities | 205 | * @ht_bss_conf: ht extended capabilities |
@@ -208,6 +211,9 @@ struct ieee80211_bss_conf { | |||
208 | /* erp related data */ | 211 | /* erp related data */ |
209 | bool use_cts_prot; | 212 | bool use_cts_prot; |
210 | bool use_short_preamble; | 213 | bool use_short_preamble; |
214 | u16 beacon_int; | ||
215 | u16 assoc_capability; | ||
216 | u64 timestamp; | ||
211 | /* ht related data */ | 217 | /* ht related data */ |
212 | bool assoc_ht; | 218 | bool assoc_ht; |
213 | struct ieee80211_ht_info *ht_conf; | 219 | struct ieee80211_ht_info *ht_conf; |
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c index 0e936233dac5..cb119d3b6353 100644 --- a/net/mac80211/ieee80211_sta.c +++ b/net/mac80211/ieee80211_sta.c | |||
@@ -509,9 +509,14 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
509 | conf->channel->center_freq, | 509 | conf->channel->center_freq, |
510 | ifsta->ssid, ifsta->ssid_len); | 510 | ifsta->ssid, ifsta->ssid_len); |
511 | if (bss) { | 511 | if (bss) { |
512 | /* set timing information */ | ||
513 | sdata->bss_conf.beacon_int = bss->beacon_int; | ||
514 | sdata->bss_conf.timestamp = bss->timestamp; | ||
515 | |||
512 | if (bss->has_erp_value) | 516 | if (bss->has_erp_value) |
513 | changed |= ieee80211_handle_erp_ie( | 517 | changed |= ieee80211_handle_erp_ie( |
514 | sdata, bss->erp_value); | 518 | sdata, bss->erp_value); |
519 | |||
515 | ieee80211_rx_bss_put(dev, bss); | 520 | ieee80211_rx_bss_put(dev, bss); |
516 | } | 521 | } |
517 | 522 | ||
@@ -2033,8 +2038,10 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2033 | } else | 2038 | } else |
2034 | rcu_read_unlock(); | 2039 | rcu_read_unlock(); |
2035 | 2040 | ||
2036 | /* set AID, ieee80211_set_associated() will tell the driver */ | 2041 | /* set AID and assoc capability, |
2042 | * ieee80211_set_associated() will tell the driver */ | ||
2037 | bss_conf->aid = aid; | 2043 | bss_conf->aid = aid; |
2044 | bss_conf->assoc_capability = capab_info; | ||
2038 | ieee80211_set_associated(dev, ifsta, 1); | 2045 | ieee80211_set_associated(dev, ifsta, 1); |
2039 | 2046 | ||
2040 | ieee80211_associated(dev, ifsta); | 2047 | ieee80211_associated(dev, ifsta); |