Commit bb6e753e95a968fab0e366caace78fb2c08cc239
Committed by
John W. Linville
1 parent
59b66255bc
Exists in
master
and in
6 other branches
nl80211: Add sta_flags to the station info
Reuse the already existing struct nl80211_sta_flag_update to specify both, a flag mask and the flag set itself. This means nl80211_sta_flag_update is now used for setting station flags and also for getting station flags. Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Showing 3 changed files with 10 additions and 1 deletions Side-by-side Diff
include/linux/nl80211.h
... | ... | @@ -1548,6 +1548,7 @@ |
1548 | 1548 | * @NL80211_STA_INFO_BSS_PARAM: current station's view of BSS, nested attribute |
1549 | 1549 | * containing info as possible, see &enum nl80211_sta_bss_param |
1550 | 1550 | * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected |
1551 | + * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update. | |
1551 | 1552 | * @__NL80211_STA_INFO_AFTER_LAST: internal |
1552 | 1553 | * @NL80211_STA_INFO_MAX: highest possible station info attribute |
1553 | 1554 | */ |
... | ... | @@ -1569,6 +1570,7 @@ |
1569 | 1570 | NL80211_STA_INFO_RX_BITRATE, |
1570 | 1571 | NL80211_STA_INFO_BSS_PARAM, |
1571 | 1572 | NL80211_STA_INFO_CONNECTED_TIME, |
1573 | + NL80211_STA_INFO_STA_FLAGS, | |
1572 | 1574 | |
1573 | 1575 | /* keep last */ |
1574 | 1576 | __NL80211_STA_INFO_AFTER_LAST, |
include/net/cfg80211.h
... | ... | @@ -497,6 +497,7 @@ |
497 | 497 | * @STATION_INFO_BSS_PARAM: @bss_param filled |
498 | 498 | * @STATION_INFO_CONNECTED_TIME: @connected_time filled |
499 | 499 | * @STATION_INFO_ASSOC_REQ_IES: @assoc_req_ies filled |
500 | + * @STATION_INFO_STA_FLAGS: @sta_flags filled | |
500 | 501 | */ |
501 | 502 | enum station_info_flags { |
502 | 503 | STATION_INFO_INACTIVE_TIME = 1<<0, |
... | ... | @@ -516,7 +517,8 @@ |
516 | 517 | STATION_INFO_RX_BITRATE = 1<<14, |
517 | 518 | STATION_INFO_BSS_PARAM = 1<<15, |
518 | 519 | STATION_INFO_CONNECTED_TIME = 1<<16, |
519 | - STATION_INFO_ASSOC_REQ_IES = 1<<17 | |
520 | + STATION_INFO_ASSOC_REQ_IES = 1<<17, | |
521 | + STATION_INFO_STA_FLAGS = 1<<18 | |
520 | 522 | }; |
521 | 523 | |
522 | 524 | /** |
... | ... | @@ -633,6 +635,7 @@ |
633 | 635 | u32 tx_failed; |
634 | 636 | u32 rx_dropped_misc; |
635 | 637 | struct sta_bss_parameters bss_param; |
638 | + struct nl80211_sta_flag_update sta_flags; | |
636 | 639 | |
637 | 640 | int generation; |
638 | 641 |
net/wireless/nl80211.c
... | ... | @@ -2344,6 +2344,10 @@ |
2344 | 2344 | |
2345 | 2345 | nla_nest_end(msg, bss_param); |
2346 | 2346 | } |
2347 | + if (sinfo->filled & STATION_INFO_STA_FLAGS) | |
2348 | + NLA_PUT(msg, NL80211_STA_INFO_STA_FLAGS, | |
2349 | + sizeof(struct nl80211_sta_flag_update), | |
2350 | + &sinfo->sta_flags); | |
2347 | 2351 | nla_nest_end(msg, sinfoattr); |
2348 | 2352 | |
2349 | 2353 | if (sinfo->filled & STATION_INFO_ASSOC_REQ_IES) |