Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-net-next-2020-02-14' 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 few big new things:
 * 802.11 frame encapsulation offload support
 * more HE (802.11ax) support, including some for 6 GHz band
 * powersave in hwsim, for better testing

Of course as usual there are various cleanups and small fixes.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Feb 17, 2020
2 parents 1e5946f + 1f6e0ba commit ddb535a
Show file tree
Hide file tree
Showing 35 changed files with 1,078 additions and 338 deletions.
3 changes: 2 additions & 1 deletion drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -5103,7 +5103,8 @@ static int ath10k_mac_txpower_recalc(struct ath10k *ar)
lockdep_assert_held(&ar->conf_mutex);

list_for_each_entry(arvif, &ar->arvifs, list) {
if (arvif->txpower <= 0)
/* txpower not initialized yet? */
if (arvif->txpower == INT_MIN)
continue;

if (txpower == -1)
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/ath/ath9k/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1196,6 +1196,9 @@ static void ath9k_tpc_vif_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
{
int *power = data;

if (vif->bss_conf.txpower == INT_MIN)
return;

if (*power < vif->bss_conf.txpower)
*power = vif->bss_conf.txpower;
}
Expand Down
7 changes: 5 additions & 2 deletions drivers/net/wireless/ath/ath9k/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -2095,10 +2095,13 @@ static void setup_frame_info(struct ieee80211_hw *hw,

if (tx_info->control.vif) {
struct ieee80211_vif *vif = tx_info->control.vif;

if (vif->bss_conf.txpower == INT_MIN)
goto nonvifpower;
txpower = 2 * vif->bss_conf.txpower;
} else {
struct ath_softc *sc = hw->priv;
struct ath_softc *sc;
nonvifpower:
sc = hw->priv;

txpower = sc->cur_chan->cur_txpower;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -2019,7 +2019,7 @@ static void iwl_mvm_cfg_he_sta(struct iwl_mvm *mvm,
struct iwl_he_sta_context_cmd sta_ctxt_cmd = {
.sta_id = sta_id,
.tid_limit = IWL_MAX_TID_COUNT,
.bss_color = vif->bss_conf.bss_color,
.bss_color = vif->bss_conf.he_bss_color.color,
.htc_trig_based_pkt_ext = vif->bss_conf.htc_trig_based_pkt_ext,
.frame_time_rts_th =
cpu_to_le16(vif->bss_conf.frame_time_rts_th),
Expand Down
11 changes: 9 additions & 2 deletions drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -300,14 +300,12 @@ static struct net_device *hwsim_mon; /* global monitor netdev */
.band = NL80211_BAND_2GHZ, \
.center_freq = (_freq), \
.hw_value = (_freq), \
.max_power = 20, \
}

#define CHAN5G(_freq) { \
.band = NL80211_BAND_5GHZ, \
.center_freq = (_freq), \
.hw_value = (_freq), \
.max_power = 20, \
}

static const struct ieee80211_channel hwsim_channels_2ghz[] = {
Expand Down Expand Up @@ -1595,6 +1593,11 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
mac80211_hwsim_tx_frame(hw, skb,
rcu_dereference(vif->chanctx_conf)->def.chan);

while ((skb = ieee80211_get_buffered_bc(hw, vif)) != NULL) {
mac80211_hwsim_tx_frame(hw, skb,
rcu_dereference(vif->chanctx_conf)->def.chan);
}

if (vif->csa_active && ieee80211_csa_is_complete(vif))
ieee80211_csa_finish(vif);
}
Expand Down Expand Up @@ -2925,11 +2928,15 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
ieee80211_hw_set(hw, MFP_CAPABLE);
ieee80211_hw_set(hw, SIGNAL_DBM);
ieee80211_hw_set(hw, SUPPORTS_PS);
ieee80211_hw_set(hw, REPORTS_TX_ACK_STATUS);
ieee80211_hw_set(hw, HOST_BROADCAST_PS_BUFFERING);
ieee80211_hw_set(hw, PS_NULLFUNC_STACK);
ieee80211_hw_set(hw, TDLS_WIDER_BW);
if (rctbl)
ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);

hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS |
WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL |
WIPHY_FLAG_AP_UAPSD |
Expand Down
26 changes: 22 additions & 4 deletions include/linux/ieee80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -619,6 +619,15 @@ static inline bool ieee80211_is_qos_nullfunc(__le16 fc)
cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_QOS_NULLFUNC);
}

/**
* ieee80211_is_any_nullfunc - check if frame is regular or QoS nullfunc frame
* @fc: frame control bytes in little-endian byteorder
*/
static inline bool ieee80211_is_any_nullfunc(__le16 fc)
{
return (ieee80211_is_nullfunc(fc) || ieee80211_is_qos_nullfunc(fc));
}

/**
* ieee80211_is_bufferable_mmpdu - check if frame is bufferable MMPDU
* @fc: frame control field in little-endian byteorder
Expand Down Expand Up @@ -2047,13 +2056,13 @@ ieee80211_he_ppe_size(u8 ppe_thres_hdr, const u8 *phy_cap_info)
#define IEEE80211_HE_OPERATION_ER_SU_DISABLE 0x00010000
#define IEEE80211_HE_OPERATION_6GHZ_OP_INFO 0x00020000
#define IEEE80211_HE_OPERATION_BSS_COLOR_MASK 0x3f000000
#define IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET 24
#define IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET 24
#define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x40000000
#define IEEE80211_HE_OPERATION_BSS_COLOR_DISABLED 0x80000000

/*
* ieee80211_he_oper_size - calculate 802.11ax HE Operations IE size
* @he_oper_ie: byte data of the He Operations IE, stating from the the byte
* @he_oper_ie: byte data of the He Operations IE, stating from the byte
* after the ext ID byte. It is assumed that he_oper_ie has at least
* sizeof(struct ieee80211_he_operation) bytes, the caller must have
* validated this.
Expand Down Expand Up @@ -2091,7 +2100,7 @@ ieee80211_he_oper_size(const u8 *he_oper_ie)

/*
* ieee80211_he_spr_size - calculate 802.11ax HE Spatial Reuse IE size
* @he_spr_ie: byte data of the He Spatial Reuse IE, stating from the the byte
* @he_spr_ie: byte data of the He Spatial Reuse IE, stating from the byte
* after the ext ID byte. It is assumed that he_spr_ie has at least
* sizeof(struct ieee80211_he_spr) bytes, the caller must have validated
* this
Expand Down Expand Up @@ -2523,6 +2532,7 @@ enum ieee80211_eid {
WLAN_EID_FILS_INDICATION = 240,
WLAN_EID_DILS = 241,
WLAN_EID_FRAGMENT = 242,
WLAN_EID_RSNX = 244,
WLAN_EID_EXTENSION = 255
};

Expand Down Expand Up @@ -2734,7 +2744,7 @@ enum ieee80211_tdls_actioncode {
*/
#define WLAN_EXT_CAPA3_MULTI_BSSID_SUPPORT BIT(6)

/* TDLS capabilities in the the 4th byte of @WLAN_EID_EXT_CAPABILITY */
/* TDLS capabilities in the 4th byte of @WLAN_EID_EXT_CAPABILITY */
#define WLAN_EXT_CAPA4_TDLS_BUFFER_STA BIT(4)
#define WLAN_EXT_CAPA4_TDLS_PEER_PSM BIT(5)
#define WLAN_EXT_CAPA4_TDLS_CHAN_SWITCH BIT(6)
Expand Down Expand Up @@ -3034,6 +3044,7 @@ struct ieee80211_multiple_bssid_configuration {
#define WLAN_AKM_SUITE_FILS_SHA384 SUITE(0x000FAC, 15)
#define WLAN_AKM_SUITE_FT_FILS_SHA256 SUITE(0x000FAC, 16)
#define WLAN_AKM_SUITE_FT_FILS_SHA384 SUITE(0x000FAC, 17)
#define WLAN_AKM_SUITE_OWE SUITE(0x000FAC, 18)

#define WLAN_MAX_KEY_LEN 32

Expand Down Expand Up @@ -3412,4 +3423,11 @@ static inline bool for_each_element_completed(const struct element *element,
return (const u8 *)element == (const u8 *)data + datalen;
}

/**
* RSNX Capabilities:
* bits 0-3: Field length (n-1)
*/
#define WLAN_RSNX_CAPA_PROTECTED_TWT BIT(4)
#define WLAN_RSNX_CAPA_SAE_H2E BIT(5)

#endif /* LINUX_IEEE80211_H */
63 changes: 61 additions & 2 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ struct wiphy;
* on this channel.
* @IEEE80211_CHAN_NO_10MHZ: 10 MHz bandwidth is not permitted
* on this channel.
* @IEEE80211_CHAN_NO_HE: HE operation is not permitted on this channel.
*
*/
enum ieee80211_channel_flags {
Expand All @@ -111,6 +112,7 @@ enum ieee80211_channel_flags {
IEEE80211_CHAN_IR_CONCURRENT = 1<<10,
IEEE80211_CHAN_NO_20MHZ = 1<<11,
IEEE80211_CHAN_NO_10MHZ = 1<<12,
IEEE80211_CHAN_NO_HE = 1<<13,
};

#define IEEE80211_CHAN_NO_HT40 \
Expand Down Expand Up @@ -259,6 +261,32 @@ struct ieee80211_he_obss_pd {
u8 max_offset;
};

/**
* struct cfg80211_he_bss_color - AP settings for BSS coloring
*
* @color: the current color.
* @disabled: is the feature disabled.
* @partial: define the AID equation.
*/
struct cfg80211_he_bss_color {
u8 color;
bool disabled;
bool partial;
};

/**
* struct ieee80211_he_bss_color - AP settings for BSS coloring
*
* @color: the current color.
* @disabled: is the feature disabled.
* @partial: define the AID equation.
*/
struct ieee80211_he_bss_color {
u8 color;
bool disabled;
bool partial;
};

/**
* struct ieee80211_sta_ht_cap - STA's HT capabilities
*
Expand Down Expand Up @@ -990,6 +1018,7 @@ enum cfg80211_ap_settings_flags {
* @twt_responder: Enable Target Wait Time
* @flags: flags, as defined in enum cfg80211_ap_settings_flags
* @he_obss_pd: OBSS Packet Detection settings
* @he_bss_color: BSS Color settings
*/
struct cfg80211_ap_settings {
struct cfg80211_chan_def chandef;
Expand Down Expand Up @@ -1018,6 +1047,7 @@ struct cfg80211_ap_settings {
bool twt_responder;
u32 flags;
struct ieee80211_he_obss_pd he_obss_pd;
struct cfg80211_he_bss_color he_bss_color;
};

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

int (*get_ftm_responder_stats)(struct wiphy *wiphy,
Expand Down Expand Up @@ -4375,6 +4406,21 @@ struct cfg80211_pmsr_capabilities {
} ftm;
};

/**
* struct wiphy_iftype_akm_suites - This structure encapsulates supported akm
* suites for interface types defined in @iftypes_mask. Each type in the
* @iftypes_mask must be unique across all instances of iftype_akm_suites.
*
* @iftypes_mask: bitmask of interfaces types
* @akm_suites: points to an array of supported akm suites
* @n_akm_suites: number of supported AKM suites
*/
struct wiphy_iftype_akm_suites {
u16 iftypes_mask;
const u32 *akm_suites;
int n_akm_suites;
};

/**
* struct wiphy - wireless hardware description
* @reg_notifier: the driver's regulatory notification callback,
Expand All @@ -4387,8 +4433,16 @@ struct cfg80211_pmsr_capabilities {
* @signal_type: signal type reported in &struct cfg80211_bss.
* @cipher_suites: supported cipher suites
* @n_cipher_suites: number of supported cipher suites
* @akm_suites: supported AKM suites
* @akm_suites: supported AKM suites. These are the default AKMs supported if
* the supported AKMs not advertized for a specific interface type in
* iftype_akm_suites.
* @n_akm_suites: number of supported AKM suites
* @iftype_akm_suites: array of supported akm suites info per interface type.
* Note that the bits in @iftypes_mask inside this structure cannot
* overlap (i.e. only one occurrence of each type is allowed across all
* instances of iftype_akm_suites).
* @num_iftype_akm_suites: number of interface types for which supported akm
* suites are specified separately.
* @retry_short: Retry limit for short frames (dot11ShortRetryLimit)
* @retry_long: Retry limit for long frames (dot11LongRetryLimit)
* @frag_threshold: Fragmentation threshold (dot11FragmentationThreshold);
Expand Down Expand Up @@ -4595,6 +4649,9 @@ struct wiphy {
int n_akm_suites;
const u32 *akm_suites;

const struct wiphy_iftype_akm_suites *iftype_akm_suites;
unsigned int num_iftype_akm_suites;

u8 retry_short;
u8 retry_long;
u32 frag_threshold;
Expand Down Expand Up @@ -4687,6 +4744,8 @@ struct wiphy {
u32 txq_memory_limit;
u32 txq_quantum;

unsigned long tx_queue_len;

u8 support_mbssid:1,
support_only_he_mbssid:1;

Expand Down
Loading

0 comments on commit ddb535a

Please sign in to comment.