Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-net-next-2020-02-24' of git://git.kernel…
Browse files Browse the repository at this point in the history
….org/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg says:

====================
A new set of changes:
 * lots of small documentation fixes, from Jérôme Pouiller
 * beacon protection (BIGTK) support from Jouni Malinen
 * some initial code for TID configuration, from Tamizh chelvam
 * I reverted some new API before it's actually used, because
   it's wrong to mix controlled port and preauth
 * a few other cleanups/fixes
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 24, 2020
2 parents 13ef6ae + 370f51d commit 3b3e808
Show file tree
Hide file tree
Showing 24 changed files with 909 additions and 150 deletions.
1 change: 1 addition & 0 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -2947,6 +2947,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
NL80211_FEATURE_DYNAMIC_SMPS |
NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_BEACON_PROTECTION);

hw->wiphy->interface_modes = param->iftypes;

Expand Down
122 changes: 81 additions & 41 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ struct wiphy;
*
* @IEEE80211_CHAN_DISABLED: This channel is disabled.
* @IEEE80211_CHAN_NO_IR: do not initiate radiation, this includes
* sending probe requests or beaconing.
* sending probe requests or beaconing.
* @IEEE80211_CHAN_RADAR: Radar detection is required on this channel.
* @IEEE80211_CHAN_NO_HT40PLUS: extension channel above this channel
* is not permitted.
* is not permitted.
* @IEEE80211_CHAN_NO_HT40MINUS: extension channel below this channel
* is not permitted.
* is not permitted.
* @IEEE80211_CHAN_NO_OFDM: OFDM is not allowed on this channel.
* @IEEE80211_CHAN_NO_80MHZ: If the driver supports 80 MHz on the band,
* this flag indicates that an 80 MHz channel cannot use this
Expand Down Expand Up @@ -626,6 +626,41 @@ struct cfg80211_chan_def {
struct ieee80211_edmg edmg;
};

/**
* struct cfg80211_tid_cfg - TID specific configuration
* @config_override: Flag to notify driver to reset TID configuration
* of the peer.
* @tids: bitmap of TIDs to modify
* @mask: bitmap of attributes indicating which parameter changed,
* similar to &nl80211_tid_config_supp.
* @noack: noack configuration value for the TID
* @retry_long: retry count value
* @retry_short: retry count value
* @ampdu: Enable/Disable aggregation
* @rtscts: Enable/Disable RTS/CTS
*/
struct cfg80211_tid_cfg {
bool config_override;
u8 tids;
u32 mask;
enum nl80211_tid_config noack;
u8 retry_long, retry_short;
enum nl80211_tid_config ampdu;
enum nl80211_tid_config rtscts;
};

/**
* struct cfg80211_tid_config - TID configuration
* @peer: Station's MAC address
* @n_tid_conf: Number of TID specific configurations to be applied
* @tid_conf: Configuration change info
*/
struct cfg80211_tid_config {
const u8 *peer;
u32 n_tid_conf;
struct cfg80211_tid_cfg tid_conf[];
};

/**
* cfg80211_get_chandef_type - return old channel type from chandef
* @chandef: the channel definition
Expand Down Expand Up @@ -1686,7 +1721,7 @@ struct mpath_info {
* @basic_rates_len: number of basic rates
* @ap_isolate: do not forward packets between connected stations
* @ht_opmode: HT Operation mode
* (u16 = opmode, -1 = do not change)
* (u16 = opmode, -1 = do not change)
* @p2p_ctwindow: P2P CT Window (-1 = no change)
* @p2p_opp_ps: P2P opportunistic PS (-1 = no change)
*/
Expand Down Expand Up @@ -2062,8 +2097,8 @@ struct cfg80211_bss_select_adjust {
* @ie_len: length of ie in octets
* @flags: bit field of flags controlling operation
* @match_sets: sets of parameters to be matched for a scan result
* entry to be considered valid and to be passed to the host
* (others are filtered out).
* entry to be considered valid and to be passed to the host
* (others are filtered out).
* If ommited, all results are passed.
* @n_match_sets: number of match sets
* @report_results: indicates that results were reported for this request
Expand Down Expand Up @@ -2456,7 +2491,7 @@ struct cfg80211_disassoc_request {
* will be used in ht_capa. Un-supported values will be ignored.
* @ht_capa_mask: The bits of ht_capa which are to be used.
* @wep_keys: static WEP keys, if not NULL points to an array of
* CFG80211_MAX_WEP_KEYS WEP keys
* CFG80211_MAX_WEP_KEYS WEP keys
* @wep_tx_key: key index (0..3) of the default TX static WEP key
*/
struct cfg80211_ibss_params {
Expand Down Expand Up @@ -3369,6 +3404,8 @@ struct cfg80211_update_owe_info {
* @set_default_key: set the default key on an interface
*
* @set_default_mgmt_key: set the default management frame key on an interface
* @set_default_beacon_key: set the default Beacon frame key on an interface
*
* @set_rekey_data: give the data necessary for GTK rekeying to the driver
*
Expand Down Expand Up @@ -3669,6 +3706,10 @@ struct cfg80211_update_owe_info {
*
* @probe_mesh_link: Probe direct Mesh peer's link quality by sending data frame
* and overrule HWMP path selection algorithm.
* @set_tid_config: TID specific configuration, this can be peer or BSS specific
* This callback may sleep.
* @reset_tid_config: Reset TID specific configuration for the peer, for the
* given TIDs. This callback may sleep.
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
Expand Down Expand Up @@ -3702,6 +3743,9 @@ struct cfg80211_ops {
int (*set_default_mgmt_key)(struct wiphy *wiphy,
struct net_device *netdev,
u8 key_index);
int (*set_default_beacon_key)(struct wiphy *wiphy,
struct net_device *netdev,
u8 key_index);

int (*start_ap)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_ap_settings *settings);
Expand Down Expand Up @@ -3974,8 +4018,7 @@ struct cfg80211_ops {
int (*tx_control_port)(struct wiphy *wiphy,
struct net_device *dev,
const u8 *buf, size_t len,
const u8 *dest, const u8 *src,
const __be16 proto,
const u8 *dest, const __be16 proto,
const bool noencrypt);

int (*get_ftm_responder_stats)(struct wiphy *wiphy,
Expand All @@ -3990,6 +4033,10 @@ struct cfg80211_ops {
struct cfg80211_update_owe_info *owe_info);
int (*probe_mesh_link)(struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len);
int (*set_tid_config)(struct wiphy *wiphy, struct net_device *dev,
struct cfg80211_tid_config *tid_conf);
int (*reset_tid_config)(struct wiphy *wiphy, struct net_device *dev,
const u8 *peer, u8 tids);
};

/*
Expand Down Expand Up @@ -4427,7 +4474,7 @@ struct wiphy_iftype_akm_suites {
* note that if your driver uses wiphy_apply_custom_regulatory()
* the reg_notifier's request can be passed as NULL
* @regd: the driver's regulatory domain, if one was requested via
* the regulatory_hint() API. This can be used by the driver
* the regulatory_hint() API. This can be used by the driver
* on the reg_notifier() if it chooses to ignore future
* regulatory domain changes caused by other drivers.
* @signal_type: signal type reported in &struct cfg80211_bss.
Expand Down Expand Up @@ -4463,10 +4510,11 @@ struct wiphy_iftype_akm_suites {
* the same number of arbitrary MAC addresses.
* @registered: protects ->resume and ->suspend sysfs callbacks against
* unregister hardware
* @debugfsdir: debugfs directory used for this wiphy, will be renamed
* automatically on wiphy renames
* @dev: (virtual) struct device for this wiphy
* @registered: helps synchronize suspend/resume with wiphy unregister
* @debugfsdir: debugfs directory used for this wiphy (ieee80211/<wiphyname>).
* It will be renamed automatically on wiphy renames
* @dev: (virtual) struct device for this wiphy. The item in
* /sys/class/ieee80211/ points to this. You need use set_wiphy_dev()
* (see below).
* @wext: wireless extension handlers
* @priv: driver private data (sized according to wiphy_new() parameter)
* @interface_modes: bitmask of interfaces types valid for this wiphy,
Expand Down Expand Up @@ -4577,12 +4625,6 @@ struct wiphy_iftype_akm_suites {
* and probe responses. This value should be set if the driver
* wishes to limit the number of csa counters. Default (0) means
* infinite.
* @max_adj_channel_rssi_comp: max offset of between the channel on which the
* frame was sent and the channel on which the frame was heard for which
* the reported rssi is still valid. If a driver is able to compensate the
* 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.
Expand All @@ -4602,11 +4644,19 @@ struct wiphy_iftype_akm_suites {
* @support_mbssid must be set for this to have any effect.
*
* @pmsr_capa: peer measurement capabilities
*
* @tid_config_support: describes the per-TID config support that the
* device has
* @tid_config_support.vif: bitmap of attributes (configurations)
* supported by the driver for each vif
* @tid_config_support.peer: bitmap of attributes (configurations)
* supported by the driver for each peer
* @tid_config_support.max_retry: maximum supported retry count for
* long/short retry configuration
*/
struct wiphy {
/* assign these fields before you register the wiphy */

/* permanent MAC address(es) */
u8 perm_addr[ETH_ALEN];
u8 addr_mask[ETH_ALEN];

Expand Down Expand Up @@ -4673,11 +4723,6 @@ struct wiphy {
u32 available_antennas_tx;
u32 available_antennas_rx;

/*
* Bitmap of supported protocols for probe response offloading
* see &enum nl80211_probe_resp_offload_support_attr. Only valid
* when the wiphy flag @WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD is set.
*/
u32 probe_resp_offload;

const u8 *extended_capabilities, *extended_capabilities_mask;
Expand All @@ -4686,39 +4731,28 @@ struct wiphy {
const struct wiphy_iftype_ext_capab *iftype_ext_capab;
unsigned int num_iftype_ext_capab;

/* If multiple wiphys are registered and you're handed e.g.
* a regular netdev with assigned ieee80211_ptr, you won't
* know whether it points to a wiphy your driver has registered
* or not. Assign this to something global to your driver to
* help determine whether you own this wiphy or not. */
const void *privid;

struct ieee80211_supported_band *bands[NUM_NL80211_BANDS];

/* Lets us get back the wiphy on the callback */
void (*reg_notifier)(struct wiphy *wiphy,
struct regulatory_request *request);

/* fields below are read-only, assigned by cfg80211 */

const struct ieee80211_regdomain __rcu *regd;

/* the item in /sys/class/ieee80211/ points to this,
* you need use set_wiphy_dev() (see below) */
struct device dev;

/* protects ->resume, ->suspend sysfs callbacks against unregister hw */
bool registered;

/* dir in debugfs: ieee80211/<wiphyname> */
struct dentry *debugfsdir;

const struct ieee80211_ht_cap *ht_capa_mod_mask;
const struct ieee80211_vht_cap *vht_capa_mod_mask;

struct list_head wdev_list;

/* the network namespace this phy lives in currently */
possible_net_t _net;

#ifdef CONFIG_CFG80211_WEXT
Expand All @@ -4734,7 +4768,6 @@ struct wiphy {
u16 max_ap_assoc_sta;

u8 max_num_csa_counters;
u8 max_adj_channel_rssi_comp;

u32 bss_select_support;

Expand All @@ -4751,6 +4784,13 @@ struct wiphy {

const struct cfg80211_pmsr_capabilities *pmsr_capa;

struct {
u64 peer, vif;
u8 max_retry;
} tid_config_support;

u8 max_data_retry_count;

char priv[0] __aligned(NETDEV_ALIGN);
};

Expand Down Expand Up @@ -5526,9 +5566,9 @@ void cfg80211_send_layer2_update(struct net_device *dev, const u8 *addr);
* @wiphy: the wireless device giving the hint (used only for reporting
* conflicts)
* @alpha2: the ISO/IEC 3166 alpha2 the driver claims its regulatory domain
* should be in. If @rd is set this should be NULL. Note that if you
* set this to NULL you should still set rd->alpha2 to some accepted
* alpha2.
* should be in. If @rd is set this should be NULL. Note that if you
* set this to NULL you should still set rd->alpha2 to some accepted
* alpha2.
*
* Wireless drivers can use this function to hint to the wireless core
* what it believes should be the current regulatory domain by
Expand Down
10 changes: 10 additions & 0 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -3776,6 +3776,9 @@ enum ieee80211_reconfig_type {
*
* @start_pmsr: start peer measurement (e.g. FTM) (this call can sleep)
* @abort_pmsr: abort peer measurement (this call can sleep)
* @set_tid_config: Apply TID specific configurations. This callback may sleep.
* @reset_tid_config: Reset TID specific configuration for the peer.
* This callback may sleep.
*/
struct ieee80211_ops {
void (*tx)(struct ieee80211_hw *hw,
Expand Down Expand Up @@ -4080,6 +4083,13 @@ struct ieee80211_ops {
struct cfg80211_pmsr_request *request);
void (*abort_pmsr)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct cfg80211_pmsr_request *request);
int (*set_tid_config)(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct cfg80211_tid_config *tid_conf);
int (*reset_tid_config)(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
struct ieee80211_sta *sta, u8 tids);
};

/**
Expand Down
Loading

0 comments on commit 3b3e808

Please sign in to comment.