cfg80211: allow passing frame type to cfg80211_inform_bss()
When using the cfg80211_inform_bss[_width]() functions drivers cannot currently indicate whether the data was received in a beacon or probe response. Fix that by passing a new enum that indicates such (or unknown). For good measure, use it in ath6kl. Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> [ath6kl] Acked-by: Arend van Spriel <arend@broadcom.com> [brcmfmac] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
@@ -3767,11 +3767,25 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy,
|
||||
}
|
||||
|
||||
/**
|
||||
* cfg80211_inform_bss - inform cfg80211 of a new BSS
|
||||
* enum cfg80211_bss_frame_type - frame type that the BSS data came from
|
||||
* @CFG80211_BSS_FTYPE_UNKNOWN: driver doesn't know whether the data is
|
||||
* from a beacon or probe response
|
||||
* @CFG80211_BSS_FTYPE_BEACON: data comes from a beacon
|
||||
* @CFG80211_BSS_FTYPE_PRESP: data comes from a probe response
|
||||
*/
|
||||
enum cfg80211_bss_frame_type {
|
||||
CFG80211_BSS_FTYPE_UNKNOWN,
|
||||
CFG80211_BSS_FTYPE_BEACON,
|
||||
CFG80211_BSS_FTYPE_PRESP,
|
||||
};
|
||||
|
||||
/**
|
||||
* cfg80211_inform_bss_width - inform cfg80211 of a new BSS
|
||||
*
|
||||
* @wiphy: the wiphy reporting the BSS
|
||||
* @rx_channel: The channel the frame was received on
|
||||
* @scan_width: width of the control channel
|
||||
* @ftype: frame type (if known)
|
||||
* @bssid: the BSSID of the BSS
|
||||
* @tsf: the TSF sent by the peer in the beacon/probe response (or 0)
|
||||
* @capability: the capability field sent by the peer
|
||||
@@ -3791,6 +3805,7 @@ struct cfg80211_bss * __must_check
|
||||
cfg80211_inform_bss_width(struct wiphy *wiphy,
|
||||
struct ieee80211_channel *rx_channel,
|
||||
enum nl80211_bss_scan_width scan_width,
|
||||
enum cfg80211_bss_frame_type ftype,
|
||||
const u8 *bssid, u64 tsf, u16 capability,
|
||||
u16 beacon_interval, const u8 *ie, size_t ielen,
|
||||
s32 signal, gfp_t gfp);
|
||||
@@ -3798,12 +3813,13 @@ cfg80211_inform_bss_width(struct wiphy *wiphy,
|
||||
static inline struct cfg80211_bss * __must_check
|
||||
cfg80211_inform_bss(struct wiphy *wiphy,
|
||||
struct ieee80211_channel *rx_channel,
|
||||
enum cfg80211_bss_frame_type ftype,
|
||||
const u8 *bssid, u64 tsf, u16 capability,
|
||||
u16 beacon_interval, const u8 *ie, size_t ielen,
|
||||
s32 signal, gfp_t gfp)
|
||||
{
|
||||
return cfg80211_inform_bss_width(wiphy, rx_channel,
|
||||
NL80211_BSS_CHAN_WIDTH_20,
|
||||
NL80211_BSS_CHAN_WIDTH_20, ftype,
|
||||
bssid, tsf, capability,
|
||||
beacon_interval, ie, ielen, signal,
|
||||
gfp);
|
||||
|
||||
Reference in New Issue
Block a user