Loading Documentation/DocBook/80211.tmpl +3 −2 Original line number Original line Diff line number Diff line Loading @@ -157,8 +157,9 @@ !Finclude/net/cfg80211.h cfg80211_scan_request !Finclude/net/cfg80211.h cfg80211_scan_request !Finclude/net/cfg80211.h cfg80211_scan_done !Finclude/net/cfg80211.h cfg80211_scan_done !Finclude/net/cfg80211.h cfg80211_bss !Finclude/net/cfg80211.h cfg80211_bss !Finclude/net/cfg80211.h cfg80211_inform_bss_width_frame !Finclude/net/cfg80211.h cfg80211_inform_bss !Finclude/net/cfg80211.h cfg80211_inform_bss_width !Finclude/net/cfg80211.h cfg80211_inform_bss_frame_data !Finclude/net/cfg80211.h cfg80211_inform_bss_data !Finclude/net/cfg80211.h cfg80211_unlink_bss !Finclude/net/cfg80211.h cfg80211_unlink_bss !Finclude/net/cfg80211.h cfg80211_find_ie !Finclude/net/cfg80211.h cfg80211_find_ie !Finclude/net/cfg80211.h ieee80211_bss_get_ie !Finclude/net/cfg80211.h ieee80211_bss_get_ie Loading include/net/cfg80211.h +76 −19 Original line number Original line Diff line number Diff line Loading @@ -1611,6 +1611,26 @@ enum cfg80211_signal_type { CFG80211_SIGNAL_TYPE_UNSPEC, CFG80211_SIGNAL_TYPE_UNSPEC, }; }; /** * struct cfg80211_inform_bss - BSS inform data * @chan: channel the frame was received on * @scan_width: scan width that was used * @signal: signal strength value, according to the wiphy's * signal type * @boottime_ns: timestamp (CLOCK_BOOTTIME) when the information was * received; should match the time when the frame was actually * received by the device (not just by the host, in case it was * buffered on the device) and be accurate to about 10ms. * If the frame isn't buffered, just passing the return value of * ktime_get_boot_ns() is likely appropriate. */ struct cfg80211_inform_bss { struct ieee80211_channel *chan; enum nl80211_bss_scan_width scan_width; s32 signal; u64 boottime_ns; }; /** /** * struct cfg80211_bss_ie_data - BSS entry IE data * struct cfg80211_bss_ie_data - BSS entry IE data * @tsf: TSF contained in the frame that carried these IEs * @tsf: TSF contained in the frame that carried these IEs Loading Loading @@ -3942,14 +3962,11 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy); void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); /** /** * cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame * cfg80211_inform_bss_frame_data - inform cfg80211 of a received BSS frame * * @wiphy: the wiphy reporting the BSS * @wiphy: the wiphy reporting the BSS * @rx_channel: The channel the frame was received on * @data: the BSS metadata * @scan_width: width of the control channel * @mgmt: the management frame (probe response or beacon) * @mgmt: the management frame (probe response or beacon) * @len: length of the management frame * @len: length of the management frame * @signal: the signal strength, type depends on the wiphy's signal_type * @gfp: context flags * @gfp: context flags * * * This informs cfg80211 that BSS information was found and * This informs cfg80211 that BSS information was found and Loading @@ -3959,11 +3976,26 @@ void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); * Or %NULL on error. * Or %NULL on error. */ */ struct cfg80211_bss * __must_check struct cfg80211_bss * __must_check cfg80211_inform_bss_frame_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, struct ieee80211_mgmt *mgmt, size_t len, gfp_t gfp); static inline struct cfg80211_bss * __must_check cfg80211_inform_bss_width_frame(struct wiphy *wiphy, cfg80211_inform_bss_width_frame(struct wiphy *wiphy, struct ieee80211_channel *rx_channel, struct ieee80211_channel *rx_channel, enum nl80211_bss_scan_width scan_width, enum nl80211_bss_scan_width scan_width, struct ieee80211_mgmt *mgmt, size_t len, struct ieee80211_mgmt *mgmt, size_t len, s32 signal, gfp_t gfp); s32 signal, gfp_t gfp) { struct cfg80211_inform_bss data = { .chan = rx_channel, .scan_width = scan_width, .signal = signal, }; return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp); } static inline struct cfg80211_bss * __must_check static inline struct cfg80211_bss * __must_check cfg80211_inform_bss_frame(struct wiphy *wiphy, cfg80211_inform_bss_frame(struct wiphy *wiphy, Loading @@ -3971,9 +4003,13 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, struct ieee80211_mgmt *mgmt, size_t len, struct ieee80211_mgmt *mgmt, size_t len, s32 signal, gfp_t gfp) s32 signal, gfp_t gfp) { { return cfg80211_inform_bss_width_frame(wiphy, rx_channel, struct cfg80211_inform_bss data = { NL80211_BSS_CHAN_WIDTH_20, .chan = rx_channel, mgmt, len, signal, gfp); .scan_width = NL80211_BSS_CHAN_WIDTH_20, .signal = signal, }; return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp); } } /** /** Loading @@ -3990,11 +4026,10 @@ enum cfg80211_bss_frame_type { }; }; /** /** * cfg80211_inform_bss_width - inform cfg80211 of a new BSS * cfg80211_inform_bss_data - inform cfg80211 of a new BSS * * * @wiphy: the wiphy reporting the BSS * @wiphy: the wiphy reporting the BSS * @rx_channel: The channel the frame was received on * @data: the BSS metadata * @scan_width: width of the control channel * @ftype: frame type (if known) * @ftype: frame type (if known) * @bssid: the BSSID of the BSS * @bssid: the BSSID of the BSS * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) Loading @@ -4002,7 +4037,6 @@ enum cfg80211_bss_frame_type { * @beacon_interval: the beacon interval announced by the peer * @beacon_interval: the beacon interval announced by the peer * @ie: additional IEs sent by the peer * @ie: additional IEs sent by the peer * @ielen: length of the additional IEs * @ielen: length of the additional IEs * @signal: the signal strength, type depends on the wiphy's signal_type * @gfp: context flags * @gfp: context flags * * * This informs cfg80211 that BSS information was found and * This informs cfg80211 that BSS information was found and Loading @@ -4012,13 +4046,32 @@ enum cfg80211_bss_frame_type { * Or %NULL on error. * Or %NULL on error. */ */ struct cfg80211_bss * __must_check struct cfg80211_bss * __must_check cfg80211_inform_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability, u16 beacon_interval, const u8 *ie, size_t ielen, gfp_t gfp); static inline struct cfg80211_bss * __must_check cfg80211_inform_bss_width(struct wiphy *wiphy, cfg80211_inform_bss_width(struct wiphy *wiphy, struct ieee80211_channel *rx_channel, struct ieee80211_channel *rx_channel, enum nl80211_bss_scan_width scan_width, enum nl80211_bss_scan_width scan_width, enum cfg80211_bss_frame_type ftype, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability, const u8 *bssid, u64 tsf, u16 capability, u16 beacon_interval, const u8 *ie, size_t ielen, u16 beacon_interval, const u8 *ie, size_t ielen, s32 signal, gfp_t gfp); s32 signal, gfp_t gfp) { struct cfg80211_inform_bss data = { .chan = rx_channel, .scan_width = scan_width, .signal = signal, }; return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf, capability, beacon_interval, ie, ielen, gfp); } static inline struct cfg80211_bss * __must_check static inline struct cfg80211_bss * __must_check cfg80211_inform_bss(struct wiphy *wiphy, cfg80211_inform_bss(struct wiphy *wiphy, Loading @@ -4028,10 +4081,14 @@ cfg80211_inform_bss(struct wiphy *wiphy, u16 beacon_interval, const u8 *ie, size_t ielen, u16 beacon_interval, const u8 *ie, size_t ielen, s32 signal, gfp_t gfp) s32 signal, gfp_t gfp) { { return cfg80211_inform_bss_width(wiphy, rx_channel, struct cfg80211_inform_bss data = { NL80211_BSS_CHAN_WIDTH_20, ftype, .chan = rx_channel, bssid, tsf, capability, .scan_width = NL80211_BSS_CHAN_WIDTH_20, beacon_interval, ie, ielen, signal, .signal = signal, }; return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf, capability, beacon_interval, ie, ielen, gfp); gfp); } } Loading include/uapi/linux/nl80211.h +4 −0 Original line number Original line Diff line number Diff line Loading @@ -3300,6 +3300,9 @@ enum nl80211_bss_scan_width { * (not present if no beacon frame has been received yet) * (not present if no beacon frame has been received yet) * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) * @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry * was last updated by a received frame. The value is expected to be * accurate to about 10ms. (u64, nanoseconds) * @__NL80211_BSS_AFTER_LAST: internal * @__NL80211_BSS_AFTER_LAST: internal * @NL80211_BSS_MAX: highest BSS attribute * @NL80211_BSS_MAX: highest BSS attribute */ */ Loading @@ -3319,6 +3322,7 @@ enum nl80211_bss { NL80211_BSS_CHAN_WIDTH, NL80211_BSS_CHAN_WIDTH, NL80211_BSS_BEACON_TSF, NL80211_BSS_BEACON_TSF, NL80211_BSS_PRESP_DATA, NL80211_BSS_PRESP_DATA, NL80211_BSS_LAST_SEEN_BOOTTIME, /* keep last */ /* keep last */ __NL80211_BSS_AFTER_LAST, __NL80211_BSS_AFTER_LAST, Loading net/wireless/core.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -125,6 +125,7 @@ struct cfg80211_internal_bss { struct list_head list; struct list_head list; struct list_head hidden_list; struct list_head hidden_list; struct rb_node rbn; struct rb_node rbn; u64 ts_boottime; unsigned long ts; unsigned long ts; unsigned long refcount; unsigned long refcount; atomic_t hold; atomic_t hold; Loading net/wireless/nl80211.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -6544,6 +6544,11 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, jiffies_to_msecs(jiffies - intbss->ts))) jiffies_to_msecs(jiffies - intbss->ts))) goto nla_put_failure; goto nla_put_failure; if (intbss->ts_boottime && nla_put_u64(msg, NL80211_BSS_LAST_SEEN_BOOTTIME, intbss->ts_boottime)) goto nla_put_failure; switch (rdev->wiphy.signal_type) { switch (rdev->wiphy.signal_type) { case CFG80211_SIGNAL_TYPE_MBM: case CFG80211_SIGNAL_TYPE_MBM: if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, res->signal)) if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, res->signal)) Loading Loading
Documentation/DocBook/80211.tmpl +3 −2 Original line number Original line Diff line number Diff line Loading @@ -157,8 +157,9 @@ !Finclude/net/cfg80211.h cfg80211_scan_request !Finclude/net/cfg80211.h cfg80211_scan_request !Finclude/net/cfg80211.h cfg80211_scan_done !Finclude/net/cfg80211.h cfg80211_scan_done !Finclude/net/cfg80211.h cfg80211_bss !Finclude/net/cfg80211.h cfg80211_bss !Finclude/net/cfg80211.h cfg80211_inform_bss_width_frame !Finclude/net/cfg80211.h cfg80211_inform_bss !Finclude/net/cfg80211.h cfg80211_inform_bss_width !Finclude/net/cfg80211.h cfg80211_inform_bss_frame_data !Finclude/net/cfg80211.h cfg80211_inform_bss_data !Finclude/net/cfg80211.h cfg80211_unlink_bss !Finclude/net/cfg80211.h cfg80211_unlink_bss !Finclude/net/cfg80211.h cfg80211_find_ie !Finclude/net/cfg80211.h cfg80211_find_ie !Finclude/net/cfg80211.h ieee80211_bss_get_ie !Finclude/net/cfg80211.h ieee80211_bss_get_ie Loading
include/net/cfg80211.h +76 −19 Original line number Original line Diff line number Diff line Loading @@ -1611,6 +1611,26 @@ enum cfg80211_signal_type { CFG80211_SIGNAL_TYPE_UNSPEC, CFG80211_SIGNAL_TYPE_UNSPEC, }; }; /** * struct cfg80211_inform_bss - BSS inform data * @chan: channel the frame was received on * @scan_width: scan width that was used * @signal: signal strength value, according to the wiphy's * signal type * @boottime_ns: timestamp (CLOCK_BOOTTIME) when the information was * received; should match the time when the frame was actually * received by the device (not just by the host, in case it was * buffered on the device) and be accurate to about 10ms. * If the frame isn't buffered, just passing the return value of * ktime_get_boot_ns() is likely appropriate. */ struct cfg80211_inform_bss { struct ieee80211_channel *chan; enum nl80211_bss_scan_width scan_width; s32 signal; u64 boottime_ns; }; /** /** * struct cfg80211_bss_ie_data - BSS entry IE data * struct cfg80211_bss_ie_data - BSS entry IE data * @tsf: TSF contained in the frame that carried these IEs * @tsf: TSF contained in the frame that carried these IEs Loading Loading @@ -3942,14 +3962,11 @@ void cfg80211_sched_scan_stopped(struct wiphy *wiphy); void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); /** /** * cfg80211_inform_bss_width_frame - inform cfg80211 of a received BSS frame * cfg80211_inform_bss_frame_data - inform cfg80211 of a received BSS frame * * @wiphy: the wiphy reporting the BSS * @wiphy: the wiphy reporting the BSS * @rx_channel: The channel the frame was received on * @data: the BSS metadata * @scan_width: width of the control channel * @mgmt: the management frame (probe response or beacon) * @mgmt: the management frame (probe response or beacon) * @len: length of the management frame * @len: length of the management frame * @signal: the signal strength, type depends on the wiphy's signal_type * @gfp: context flags * @gfp: context flags * * * This informs cfg80211 that BSS information was found and * This informs cfg80211 that BSS information was found and Loading @@ -3959,11 +3976,26 @@ void cfg80211_sched_scan_stopped_rtnl(struct wiphy *wiphy); * Or %NULL on error. * Or %NULL on error. */ */ struct cfg80211_bss * __must_check struct cfg80211_bss * __must_check cfg80211_inform_bss_frame_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, struct ieee80211_mgmt *mgmt, size_t len, gfp_t gfp); static inline struct cfg80211_bss * __must_check cfg80211_inform_bss_width_frame(struct wiphy *wiphy, cfg80211_inform_bss_width_frame(struct wiphy *wiphy, struct ieee80211_channel *rx_channel, struct ieee80211_channel *rx_channel, enum nl80211_bss_scan_width scan_width, enum nl80211_bss_scan_width scan_width, struct ieee80211_mgmt *mgmt, size_t len, struct ieee80211_mgmt *mgmt, size_t len, s32 signal, gfp_t gfp); s32 signal, gfp_t gfp) { struct cfg80211_inform_bss data = { .chan = rx_channel, .scan_width = scan_width, .signal = signal, }; return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp); } static inline struct cfg80211_bss * __must_check static inline struct cfg80211_bss * __must_check cfg80211_inform_bss_frame(struct wiphy *wiphy, cfg80211_inform_bss_frame(struct wiphy *wiphy, Loading @@ -3971,9 +4003,13 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, struct ieee80211_mgmt *mgmt, size_t len, struct ieee80211_mgmt *mgmt, size_t len, s32 signal, gfp_t gfp) s32 signal, gfp_t gfp) { { return cfg80211_inform_bss_width_frame(wiphy, rx_channel, struct cfg80211_inform_bss data = { NL80211_BSS_CHAN_WIDTH_20, .chan = rx_channel, mgmt, len, signal, gfp); .scan_width = NL80211_BSS_CHAN_WIDTH_20, .signal = signal, }; return cfg80211_inform_bss_frame_data(wiphy, &data, mgmt, len, gfp); } } /** /** Loading @@ -3990,11 +4026,10 @@ enum cfg80211_bss_frame_type { }; }; /** /** * cfg80211_inform_bss_width - inform cfg80211 of a new BSS * cfg80211_inform_bss_data - inform cfg80211 of a new BSS * * * @wiphy: the wiphy reporting the BSS * @wiphy: the wiphy reporting the BSS * @rx_channel: The channel the frame was received on * @data: the BSS metadata * @scan_width: width of the control channel * @ftype: frame type (if known) * @ftype: frame type (if known) * @bssid: the BSSID of the BSS * @bssid: the BSSID of the BSS * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) Loading @@ -4002,7 +4037,6 @@ enum cfg80211_bss_frame_type { * @beacon_interval: the beacon interval announced by the peer * @beacon_interval: the beacon interval announced by the peer * @ie: additional IEs sent by the peer * @ie: additional IEs sent by the peer * @ielen: length of the additional IEs * @ielen: length of the additional IEs * @signal: the signal strength, type depends on the wiphy's signal_type * @gfp: context flags * @gfp: context flags * * * This informs cfg80211 that BSS information was found and * This informs cfg80211 that BSS information was found and Loading @@ -4012,13 +4046,32 @@ enum cfg80211_bss_frame_type { * Or %NULL on error. * Or %NULL on error. */ */ struct cfg80211_bss * __must_check struct cfg80211_bss * __must_check cfg80211_inform_bss_data(struct wiphy *wiphy, struct cfg80211_inform_bss *data, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability, u16 beacon_interval, const u8 *ie, size_t ielen, gfp_t gfp); static inline struct cfg80211_bss * __must_check cfg80211_inform_bss_width(struct wiphy *wiphy, cfg80211_inform_bss_width(struct wiphy *wiphy, struct ieee80211_channel *rx_channel, struct ieee80211_channel *rx_channel, enum nl80211_bss_scan_width scan_width, enum nl80211_bss_scan_width scan_width, enum cfg80211_bss_frame_type ftype, enum cfg80211_bss_frame_type ftype, const u8 *bssid, u64 tsf, u16 capability, const u8 *bssid, u64 tsf, u16 capability, u16 beacon_interval, const u8 *ie, size_t ielen, u16 beacon_interval, const u8 *ie, size_t ielen, s32 signal, gfp_t gfp); s32 signal, gfp_t gfp) { struct cfg80211_inform_bss data = { .chan = rx_channel, .scan_width = scan_width, .signal = signal, }; return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf, capability, beacon_interval, ie, ielen, gfp); } static inline struct cfg80211_bss * __must_check static inline struct cfg80211_bss * __must_check cfg80211_inform_bss(struct wiphy *wiphy, cfg80211_inform_bss(struct wiphy *wiphy, Loading @@ -4028,10 +4081,14 @@ cfg80211_inform_bss(struct wiphy *wiphy, u16 beacon_interval, const u8 *ie, size_t ielen, u16 beacon_interval, const u8 *ie, size_t ielen, s32 signal, gfp_t gfp) s32 signal, gfp_t gfp) { { return cfg80211_inform_bss_width(wiphy, rx_channel, struct cfg80211_inform_bss data = { NL80211_BSS_CHAN_WIDTH_20, ftype, .chan = rx_channel, bssid, tsf, capability, .scan_width = NL80211_BSS_CHAN_WIDTH_20, beacon_interval, ie, ielen, signal, .signal = signal, }; return cfg80211_inform_bss_data(wiphy, &data, ftype, bssid, tsf, capability, beacon_interval, ie, ielen, gfp); gfp); } } Loading
include/uapi/linux/nl80211.h +4 −0 Original line number Original line Diff line number Diff line Loading @@ -3300,6 +3300,9 @@ enum nl80211_bss_scan_width { * (not present if no beacon frame has been received yet) * (not present if no beacon frame has been received yet) * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and * @NL80211_BSS_PRESP_DATA: the data in @NL80211_BSS_INFORMATION_ELEMENTS and * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) * @NL80211_BSS_TSF is known to be from a probe response (flag attribute) * @NL80211_BSS_LAST_SEEN_BOOTTIME: CLOCK_BOOTTIME timestamp when this entry * was last updated by a received frame. The value is expected to be * accurate to about 10ms. (u64, nanoseconds) * @__NL80211_BSS_AFTER_LAST: internal * @__NL80211_BSS_AFTER_LAST: internal * @NL80211_BSS_MAX: highest BSS attribute * @NL80211_BSS_MAX: highest BSS attribute */ */ Loading @@ -3319,6 +3322,7 @@ enum nl80211_bss { NL80211_BSS_CHAN_WIDTH, NL80211_BSS_CHAN_WIDTH, NL80211_BSS_BEACON_TSF, NL80211_BSS_BEACON_TSF, NL80211_BSS_PRESP_DATA, NL80211_BSS_PRESP_DATA, NL80211_BSS_LAST_SEEN_BOOTTIME, /* keep last */ /* keep last */ __NL80211_BSS_AFTER_LAST, __NL80211_BSS_AFTER_LAST, Loading
net/wireless/core.h +1 −0 Original line number Original line Diff line number Diff line Loading @@ -125,6 +125,7 @@ struct cfg80211_internal_bss { struct list_head list; struct list_head list; struct list_head hidden_list; struct list_head hidden_list; struct rb_node rbn; struct rb_node rbn; u64 ts_boottime; unsigned long ts; unsigned long ts; unsigned long refcount; unsigned long refcount; atomic_t hold; atomic_t hold; Loading
net/wireless/nl80211.c +5 −0 Original line number Original line Diff line number Diff line Loading @@ -6544,6 +6544,11 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb, jiffies_to_msecs(jiffies - intbss->ts))) jiffies_to_msecs(jiffies - intbss->ts))) goto nla_put_failure; goto nla_put_failure; if (intbss->ts_boottime && nla_put_u64(msg, NL80211_BSS_LAST_SEEN_BOOTTIME, intbss->ts_boottime)) goto nla_put_failure; switch (rdev->wiphy.signal_type) { switch (rdev->wiphy.signal_type) { case CFG80211_SIGNAL_TYPE_MBM: case CFG80211_SIGNAL_TYPE_MBM: if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, res->signal)) if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, res->signal)) Loading