diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-08-12 15:01:28 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2014-08-26 05:16:02 -0400 |
commit | 5bc8c1f2b070bab82ed738f98ecfac725e33c57f (patch) | |
tree | cc5d73214736192a08d1478da050459a360bf3fd /include/net/cfg80211.h | |
parent | 0e227084aee36b3ba27b4fc9cd9e425be6ce2ab8 (diff) |
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>
Diffstat (limited to 'include/net/cfg80211.h')
-rw-r--r-- | include/net/cfg80211.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 77b85a89abca..ab21299c8f4d 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -3767,11 +3767,25 @@ cfg80211_inform_bss_frame(struct wiphy *wiphy, | |||
3767 | } | 3767 | } |
3768 | 3768 | ||
3769 | /** | 3769 | /** |
3770 | * cfg80211_inform_bss - inform cfg80211 of a new BSS | 3770 | * enum cfg80211_bss_frame_type - frame type that the BSS data came from |
3771 | * @CFG80211_BSS_FTYPE_UNKNOWN: driver doesn't know whether the data is | ||
3772 | * from a beacon or probe response | ||
3773 | * @CFG80211_BSS_FTYPE_BEACON: data comes from a beacon | ||
3774 | * @CFG80211_BSS_FTYPE_PRESP: data comes from a probe response | ||
3775 | */ | ||
3776 | enum cfg80211_bss_frame_type { | ||
3777 | CFG80211_BSS_FTYPE_UNKNOWN, | ||
3778 | CFG80211_BSS_FTYPE_BEACON, | ||
3779 | CFG80211_BSS_FTYPE_PRESP, | ||
3780 | }; | ||
3781 | |||
3782 | /** | ||
3783 | * cfg80211_inform_bss_width - inform cfg80211 of a new BSS | ||
3771 | * | 3784 | * |
3772 | * @wiphy: the wiphy reporting the BSS | 3785 | * @wiphy: the wiphy reporting the BSS |
3773 | * @rx_channel: The channel the frame was received on | 3786 | * @rx_channel: The channel the frame was received on |
3774 | * @scan_width: width of the control channel | 3787 | * @scan_width: width of the control channel |
3788 | * @ftype: frame type (if known) | ||
3775 | * @bssid: the BSSID of the BSS | 3789 | * @bssid: the BSSID of the BSS |
3776 | * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) | 3790 | * @tsf: the TSF sent by the peer in the beacon/probe response (or 0) |
3777 | * @capability: the capability field sent by the peer | 3791 | * @capability: the capability field sent by the peer |
@@ -3791,6 +3805,7 @@ struct cfg80211_bss * __must_check | |||
3791 | cfg80211_inform_bss_width(struct wiphy *wiphy, | 3805 | cfg80211_inform_bss_width(struct wiphy *wiphy, |
3792 | struct ieee80211_channel *rx_channel, | 3806 | struct ieee80211_channel *rx_channel, |
3793 | enum nl80211_bss_scan_width scan_width, | 3807 | enum nl80211_bss_scan_width scan_width, |
3808 | enum cfg80211_bss_frame_type ftype, | ||
3794 | const u8 *bssid, u64 tsf, u16 capability, | 3809 | const u8 *bssid, u64 tsf, u16 capability, |
3795 | u16 beacon_interval, const u8 *ie, size_t ielen, | 3810 | u16 beacon_interval, const u8 *ie, size_t ielen, |
3796 | s32 signal, gfp_t gfp); | 3811 | s32 signal, gfp_t gfp); |
@@ -3798,12 +3813,13 @@ cfg80211_inform_bss_width(struct wiphy *wiphy, | |||
3798 | static inline struct cfg80211_bss * __must_check | 3813 | static inline struct cfg80211_bss * __must_check |
3799 | cfg80211_inform_bss(struct wiphy *wiphy, | 3814 | cfg80211_inform_bss(struct wiphy *wiphy, |
3800 | struct ieee80211_channel *rx_channel, | 3815 | struct ieee80211_channel *rx_channel, |
3816 | enum cfg80211_bss_frame_type ftype, | ||
3801 | const u8 *bssid, u64 tsf, u16 capability, | 3817 | const u8 *bssid, u64 tsf, u16 capability, |
3802 | u16 beacon_interval, const u8 *ie, size_t ielen, | 3818 | u16 beacon_interval, const u8 *ie, size_t ielen, |
3803 | s32 signal, gfp_t gfp) | 3819 | s32 signal, gfp_t gfp) |
3804 | { | 3820 | { |
3805 | return cfg80211_inform_bss_width(wiphy, rx_channel, | 3821 | return cfg80211_inform_bss_width(wiphy, rx_channel, |
3806 | NL80211_BSS_CHAN_WIDTH_20, | 3822 | NL80211_BSS_CHAN_WIDTH_20, ftype, |
3807 | bssid, tsf, capability, | 3823 | bssid, tsf, capability, |
3808 | beacon_interval, ie, ielen, signal, | 3824 | beacon_interval, ie, ielen, signal, |
3809 | gfp); | 3825 | gfp); |