nl80211: add feature for BSS selection support
Introducing a new feature that the driver can use to indicate the driver/firmware supports configuration of BSS selection criteria upon CONNECT command. This can be useful when multiple BSS-es are found belonging to the same ESS, ie. Infra-BSS with same SSID. The criteria can then be used to offload selection of a preferred BSS. Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Lei Zhang <leizh@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> [move wiphy support check into parse_bss_select()] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:

committed by
Johannes Berg

parent
f59374eb42
commit
38de03d2a2
@@ -1858,6 +1858,33 @@ struct cfg80211_ibss_params {
|
||||
struct ieee80211_ht_cap ht_capa_mask;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_bss_select_adjust - BSS selection with RSSI adjustment.
|
||||
*
|
||||
* @band: band of BSS which should match for RSSI level adjustment.
|
||||
* @delta: value of RSSI level adjustment.
|
||||
*/
|
||||
struct cfg80211_bss_select_adjust {
|
||||
enum ieee80211_band band;
|
||||
s8 delta;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_bss_selection - connection parameters for BSS selection.
|
||||
*
|
||||
* @behaviour: requested BSS selection behaviour.
|
||||
* @param: parameters for requestion behaviour.
|
||||
* @band_pref: preferred band for %NL80211_BSS_SELECT_ATTR_BAND_PREF.
|
||||
* @adjust: parameters for %NL80211_BSS_SELECT_ATTR_RSSI_ADJUST.
|
||||
*/
|
||||
struct cfg80211_bss_selection {
|
||||
enum nl80211_bss_select_attr behaviour;
|
||||
union {
|
||||
enum ieee80211_band band_pref;
|
||||
struct cfg80211_bss_select_adjust adjust;
|
||||
} param;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct cfg80211_connect_params - Connection parameters
|
||||
*
|
||||
@@ -1895,6 +1922,7 @@ struct cfg80211_ibss_params {
|
||||
* @vht_capa_mask: The bits of vht_capa which are to be used.
|
||||
* @pbss: if set, connect to a PCP instead of AP. Valid for DMG
|
||||
* networks.
|
||||
* @bss_select: criteria to be used for BSS selection.
|
||||
*/
|
||||
struct cfg80211_connect_params {
|
||||
struct ieee80211_channel *channel;
|
||||
@@ -1918,6 +1946,7 @@ struct cfg80211_connect_params {
|
||||
struct ieee80211_vht_cap vht_capa;
|
||||
struct ieee80211_vht_cap vht_capa_mask;
|
||||
bool pbss;
|
||||
struct cfg80211_bss_selection bss_select;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -3186,6 +3215,9 @@ struct wiphy_vendor_command {
|
||||
* low rssi when a frame is heard on different channel, then it should set
|
||||
* this variable to the maximal offset for which it can compensate.
|
||||
* This value should be set in MHz.
|
||||
* @bss_select_support: bitmask indicating the BSS selection criteria supported
|
||||
* by the driver in the .connect() callback. The bit position maps to the
|
||||
* attribute indices defined in &enum nl80211_bss_select_attr.
|
||||
*/
|
||||
struct wiphy {
|
||||
/* assign these fields before you register the wiphy */
|
||||
@@ -3308,6 +3340,8 @@ struct wiphy {
|
||||
u8 max_num_csa_counters;
|
||||
u8 max_adj_channel_rssi_comp;
|
||||
|
||||
u32 bss_select_support;
|
||||
|
||||
char priv[0] __aligned(NETDEV_ALIGN);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user