diff options
author | Helmut Schaa <helmut.schaa@googlemail.com> | 2011-10-13 10:30:40 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-14 14:48:23 -0400 |
commit | 7a72476766735c57bc00d655770f8f21f232f482 (patch) | |
tree | 516ede1c0d7219543a35153babdb9668f3359e1c | |
parent | bb6e753e95a968fab0e366caace78fb2c08cc239 (diff) |
mac80211: Provide station flags to cfg80211
Only station flags that are already defined in nl80211 are added for
now.
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | net/mac80211/cfg.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index d0705f260178..e253afa13001 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -344,7 +344,8 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) | |||
344 | STATION_INFO_RX_BITRATE | | 344 | STATION_INFO_RX_BITRATE | |
345 | STATION_INFO_RX_DROP_MISC | | 345 | STATION_INFO_RX_DROP_MISC | |
346 | STATION_INFO_BSS_PARAM | | 346 | STATION_INFO_BSS_PARAM | |
347 | STATION_INFO_CONNECTED_TIME; | 347 | STATION_INFO_CONNECTED_TIME | |
348 | STATION_INFO_STA_FLAGS; | ||
348 | 349 | ||
349 | do_posix_clock_monotonic_gettime(&uptime); | 350 | do_posix_clock_monotonic_gettime(&uptime); |
350 | sinfo->connected_time = uptime.tv_sec - sta->last_connected; | 351 | sinfo->connected_time = uptime.tv_sec - sta->last_connected; |
@@ -404,6 +405,23 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo) | |||
404 | sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; | 405 | sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; |
405 | sinfo->bss_param.dtim_period = sdata->local->hw.conf.ps_dtim_period; | 406 | sinfo->bss_param.dtim_period = sdata->local->hw.conf.ps_dtim_period; |
406 | sinfo->bss_param.beacon_interval = sdata->vif.bss_conf.beacon_int; | 407 | sinfo->bss_param.beacon_interval = sdata->vif.bss_conf.beacon_int; |
408 | |||
409 | sinfo->sta_flags.set = 0; | ||
410 | sinfo->sta_flags.mask = BIT(NL80211_STA_FLAG_AUTHORIZED) | | ||
411 | BIT(NL80211_STA_FLAG_SHORT_PREAMBLE) | | ||
412 | BIT(NL80211_STA_FLAG_WME) | | ||
413 | BIT(NL80211_STA_FLAG_MFP) | | ||
414 | BIT(NL80211_STA_FLAG_AUTHENTICATED); | ||
415 | if (test_sta_flag(sta, WLAN_STA_AUTHORIZED)) | ||
416 | sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_AUTHORIZED); | ||
417 | if (test_sta_flag(sta, WLAN_STA_SHORT_PREAMBLE)) | ||
418 | sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_SHORT_PREAMBLE); | ||
419 | if (test_sta_flag(sta, WLAN_STA_WME)) | ||
420 | sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_WME); | ||
421 | if (test_sta_flag(sta, WLAN_STA_MFP)) | ||
422 | sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_MFP); | ||
423 | if (test_sta_flag(sta, WLAN_STA_AUTH)) | ||
424 | sinfo->sta_flags.set |= BIT(NL80211_STA_FLAG_AUTHENTICATED); | ||
407 | } | 425 | } |
408 | 426 | ||
409 | 427 | ||