diff options
| author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2008-07-18 01:52:59 -0400 |
|---|---|---|
| committer | John W. Linville <linville@tuxdriver.com> | 2008-08-04 15:09:07 -0400 |
| commit | 98f7dfd86cbbd377e2cbc293529681b914296f68 (patch) | |
| tree | cce0e06183ae4b8ce0aa845cb56cf9ca90984749 /net | |
| parent | 298df1f62aa69881528bf0f1c3c14395bc447846 (diff) | |
mac80211: pass dtim_period to low level driver
This patch adds the dtim_period in ieee80211_bss_conf, this allows the low
level driver to know the dtim_period, and to plan power save accordingly.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net')
| -rw-r--r-- | net/mac80211/ieee80211_i.h | 1 | ||||
| -rw-r--r-- | net/mac80211/mlme.c | 11 |
2 files changed, 12 insertions, 0 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index a2e200f9811e..ec59345af65b 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
| @@ -82,6 +82,7 @@ struct ieee80211_sta_bss { | |||
| 82 | 82 | ||
| 83 | u8 bssid[ETH_ALEN]; | 83 | u8 bssid[ETH_ALEN]; |
| 84 | u8 ssid[IEEE80211_MAX_SSID_LEN]; | 84 | u8 ssid[IEEE80211_MAX_SSID_LEN]; |
| 85 | u8 dtim_period; | ||
| 85 | u16 capability; /* host byte order */ | 86 | u16 capability; /* host byte order */ |
| 86 | enum ieee80211_band band; | 87 | enum ieee80211_band band; |
| 87 | int freq; | 88 | int freq; |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index acb04133a95d..591e6331c427 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
| @@ -551,6 +551,7 @@ static void ieee80211_set_associated(struct net_device *dev, | |||
| 551 | /* set timing information */ | 551 | /* set timing information */ |
| 552 | sdata->bss_conf.beacon_int = bss->beacon_int; | 552 | sdata->bss_conf.beacon_int = bss->beacon_int; |
| 553 | sdata->bss_conf.timestamp = bss->timestamp; | 553 | sdata->bss_conf.timestamp = bss->timestamp; |
| 554 | sdata->bss_conf.dtim_period = bss->dtim_period; | ||
| 554 | 555 | ||
| 555 | changed |= ieee80211_handle_bss_capability(sdata, bss); | 556 | changed |= ieee80211_handle_bss_capability(sdata, bss); |
| 556 | 557 | ||
| @@ -2688,6 +2689,16 @@ static void ieee80211_rx_bss_info(struct net_device *dev, | |||
| 2688 | bss->beacon_int = le16_to_cpu(mgmt->u.beacon.beacon_int); | 2689 | bss->beacon_int = le16_to_cpu(mgmt->u.beacon.beacon_int); |
| 2689 | bss->capability = le16_to_cpu(mgmt->u.beacon.capab_info); | 2690 | bss->capability = le16_to_cpu(mgmt->u.beacon.capab_info); |
| 2690 | 2691 | ||
| 2692 | if (elems->tim) { | ||
| 2693 | struct ieee80211_tim_ie *tim_ie = | ||
| 2694 | (struct ieee80211_tim_ie *)elems->tim; | ||
| 2695 | bss->dtim_period = tim_ie->dtim_period; | ||
| 2696 | } | ||
| 2697 | |||
| 2698 | /* set default value for buggy APs */ | ||
| 2699 | if (!elems->tim || bss->dtim_period == 0) | ||
| 2700 | bss->dtim_period = 1; | ||
| 2701 | |||
| 2691 | bss->supp_rates_len = 0; | 2702 | bss->supp_rates_len = 0; |
| 2692 | if (elems->supp_rates) { | 2703 | if (elems->supp_rates) { |
| 2693 | clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len; | 2704 | clen = IEEE80211_MAX_SUPP_RATES - bss->supp_rates_len; |
