Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-davem-2020-07-31' of git://git.kernel.or…
Browse files Browse the repository at this point in the history
…g/pub/scm/linux/kernel/git/jberg/mac80211-next

Johannes Berg says:

====================
We have a number of changes
 * code cleanups and fixups as usual
 * AQL & internal TXQ improvements from Felix
 * some mesh 802.1X support bits
 * some injection improvements from Mathy of KRACK
   fame, so we'll see what this results in ;-)
 * some more initial S1G supports bits, this time
   (some of?) the userspace APIs
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Aug 1, 2020
2 parents 829eb20 + c8ad010 commit 6f3de75
Show file tree
Hide file tree
Showing 42 changed files with 511 additions and 235 deletions.
9 changes: 2 additions & 7 deletions drivers/net/wireless/ath/ath10k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
case NL80211_CHAN_WIDTH_40:
phymode = MODE_11NG_HT40;
break;
case NL80211_CHAN_WIDTH_5:
case NL80211_CHAN_WIDTH_10:
case NL80211_CHAN_WIDTH_80:
case NL80211_CHAN_WIDTH_80P80:
case NL80211_CHAN_WIDTH_160:
default:
phymode = MODE_UNKNOWN;
break;
}
Expand All @@ -597,8 +593,7 @@ chan_to_phymode(const struct cfg80211_chan_def *chandef)
case NL80211_CHAN_WIDTH_80P80:
phymode = MODE_11AC_VHT80_80;
break;
case NL80211_CHAN_WIDTH_5:
case NL80211_CHAN_WIDTH_10:
default:
phymode = MODE_UNKNOWN;
break;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath11k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,7 @@ static void ath11k_mac_op_bss_info_changed(struct ieee80211_hw *hw,
ret = ath11k_wmi_send_obss_color_collision_cfg_cmd(
ar, arvif->vdev_id, info->he_bss_color.color,
ATH11K_BSS_COLOR_COLLISION_DETECTION_AP_PERIOD_MS,
!info->he_bss_color.disabled);
info->he_bss_color.enabled);
if (ret)
ath11k_warn(ar->ab, "failed to set bss color collision on vdev %i: %d\n",
arvif->vdev_id, ret);
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -4334,7 +4334,7 @@ static int __init init_mac80211_hwsim(void)
break;
case HWSIM_REGTEST_STRICT_ALL:
param.reg_strict = true;
/* fall through */
fallthrough;
case HWSIM_REGTEST_DRIVER_REG_ALL:
param.reg_alpha2 = hwsim_alpha2s[0];
break;
Expand Down
41 changes: 37 additions & 4 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,12 @@ struct ieee80211_he_obss_pd {
* struct cfg80211_he_bss_color - AP settings for BSS coloring
*
* @color: the current color.
* @disabled: is the feature disabled.
* @enabled: HE BSS color is used
* @partial: define the AID equation.
*/
struct cfg80211_he_bss_color {
u8 color;
bool disabled;
bool enabled;
bool partial;
};

Expand Down Expand Up @@ -417,13 +417,29 @@ struct ieee80211_edmg {
enum ieee80211_edmg_bw_config bw_config;
};

/**
* struct ieee80211_sta_s1g_cap - STA's S1G capabilities
*
* This structure describes most essential parameters needed
* to describe 802.11ah S1G capabilities for a STA.
*
* @s1g_supported: is STA an S1G STA
* @cap: S1G capabilities information
* @nss_mcs: Supported NSS MCS set
*/
struct ieee80211_sta_s1g_cap {
bool s1g;
u8 cap[10]; /* use S1G_CAPAB_ */
u8 nss_mcs[5];
};

/**
* struct ieee80211_supported_band - frequency band definition
*
* This structure describes a frequency band a wiphy
* is able to operate in.
*
* @channels: Array of channels the hardware can operate in
* @channels: Array of channels the hardware can operate with
* in this band.
* @band: the band this structure represents
* @n_channels: Number of channels in @channels
Expand All @@ -448,6 +464,7 @@ struct ieee80211_supported_band {
int n_bitrates;
struct ieee80211_sta_ht_cap ht_cap;
struct ieee80211_sta_vht_cap vht_cap;
struct ieee80211_sta_s1g_cap s1g_cap;
struct ieee80211_edmg edmg_cap;
u16 n_iftype_data;
const struct ieee80211_sband_iftype_data *iftype_data;
Expand Down Expand Up @@ -1581,6 +1598,7 @@ struct cfg80211_tid_stats {
* an FCS error. This counter should be incremented only when TA of the
* received packet with an FCS error matches the peer MAC address.
* @airtime_link_metric: mesh airtime link metric.
* @connected_to_as: true if mesh STA has a path to authentication server
*/
struct station_info {
u64 filled;
Expand Down Expand Up @@ -1638,6 +1656,8 @@ struct station_info {
u32 fcs_err_count;

u32 airtime_link_metric;

u8 connected_to_as;
};

#if IS_ENABLED(CONFIG_CFG80211)
Expand Down Expand Up @@ -1853,6 +1873,11 @@ struct bss_parameters {
* connected to a mesh gate in mesh formation info. If false, the
* value in mesh formation is determined by the presence of root paths
* in the mesh path table
* @dot11MeshNolearn: Try to avoid multi-hop path discovery (e.g. PREQ/PREP
* for HWMP) if the destination is a direct neighbor. Note that this might
* not be the optimal decision as a multi-hop route might be better. So
* if using this setting you will likely also want to disable
* dot11MeshForwarding and use another mesh routing protocol on top.
*/
struct mesh_config {
u16 dot11MeshRetryTimeout;
Expand All @@ -1873,6 +1898,7 @@ struct mesh_config {
u16 dot11MeshHWMPnetDiameterTraversalTime;
u8 dot11MeshHWMPRootMode;
bool dot11MeshConnectedToMeshGate;
bool dot11MeshConnectedToAuthServer;
u16 dot11MeshHWMPRannInterval;
bool dot11MeshGateAnnouncementProtocol;
bool dot11MeshForwarding;
Expand All @@ -1884,6 +1910,7 @@ struct mesh_config {
enum nl80211_mesh_power_mode power_mode;
u16 dot11MeshAwakeWindowDuration;
u32 plink_timeout;
bool dot11MeshNolearn;
};

/**
Expand Down Expand Up @@ -5510,7 +5537,7 @@ static inline int ieee80211_data_to_8023(struct sk_buff *skb, const u8 *addr,
*
* @skb: The input A-MSDU frame without any headers.
* @list: The output list of 802.3 frames. It must be allocated and
* initialized by by the caller.
* initialized by the caller.
* @addr: The device MAC address.
* @iftype: The device interface type.
* @extra_headroom: The hardware extra headroom for SKBs in the @list.
Expand Down Expand Up @@ -7882,4 +7909,10 @@ void cfg80211_update_owe_info_event(struct net_device *netdev,
struct cfg80211_update_owe_info *owe_info,
gfp_t gfp);

/**
* cfg80211_bss_flush - resets all the scan entries
* @wiphy: the wiphy
*/
void cfg80211_bss_flush(struct wiphy *wiphy);

#endif /* __NET_CFG80211_H */
1 change: 0 additions & 1 deletion include/net/fq.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ struct fq {
struct list_head backlogs;
spinlock_t lock;
u32 flows_cnt;
siphash_key_t perturbation;
u32 limit;
u32 memory_limit;
u32 memory_usage;
Expand Down
3 changes: 1 addition & 2 deletions include/net/fq_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static struct sk_buff *fq_tin_dequeue(struct fq *fq,

static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb)
{
u32 hash = skb_get_hash_perturb(skb, &fq->perturbation);
u32 hash = skb_get_hash(skb);

return reciprocal_scale(hash, fq->flows_cnt);
}
Expand Down Expand Up @@ -308,7 +308,6 @@ static int fq_init(struct fq *fq, int flows_cnt)
INIT_LIST_HEAD(&fq->backlogs);
spin_lock_init(&fq->lock);
fq->flows_cnt = max_t(u32, flows_cnt, 1);
get_random_bytes(&fq->perturbation, sizeof(fq->perturbation));
fq->quantum = 300;
fq->limit = 8192;
fq->memory_limit = 16 << 20; /* 16 MBytes */
Expand Down
1 change: 1 addition & 0 deletions include/net/ieee80211_radiotap.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ enum ieee80211_radiotap_tx_flags {
IEEE80211_RADIOTAP_F_TX_CTS = 0x0002,
IEEE80211_RADIOTAP_F_TX_RTS = 0x0004,
IEEE80211_RADIOTAP_F_TX_NOACK = 0x0008,
IEEE80211_RADIOTAP_F_TX_NOSEQNO = 0x0010,
};

/* for IEEE80211_RADIOTAP_MCS "have" flags */
Expand Down
42 changes: 39 additions & 3 deletions include/net/mac80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ enum mac80211_tx_info_flags {
* @IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP: This frame skips mesh path lookup
* @IEEE80211_TX_CTRL_HW_80211_ENCAP: This frame uses hardware encapsulation
* (header conversion)
* @IEEE80211_TX_CTRL_NO_SEQNO: Do not overwrite the sequence number that
* has already been assigned to this frame.
*
* These flags are used in tx_info->control.flags.
*/
Expand All @@ -836,6 +838,7 @@ enum mac80211_tx_control_flags {
IEEE80211_TX_CTRL_FAST_XMIT = BIT(4),
IEEE80211_TX_CTRL_SKIP_MPATH_LOOKUP = BIT(5),
IEEE80211_TX_CTRL_HW_80211_ENCAP = BIT(6),
IEEE80211_TX_CTRL_NO_SEQNO = BIT(7),
};

/*
Expand Down Expand Up @@ -2727,7 +2730,7 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb);
* for devices that support offload of data packets (e.g. ARP responses).
*
* Mac80211 drivers should set the @NL80211_EXT_FEATURE_CAN_REPLACE_PTK0 flag
* when they are able to replace in-use PTK keys according to to following
* when they are able to replace in-use PTK keys according to the following
* requirements:
* 1) They do not hand over frames decrypted with the old key to
mac80211 once the call to set_key() with command %DISABLE_KEY has been
Expand Down Expand Up @@ -4357,6 +4360,31 @@ void ieee80211_free_hw(struct ieee80211_hw *hw);
*/
void ieee80211_restart_hw(struct ieee80211_hw *hw);

/**
* ieee80211_rx_list - receive frame and store processed skbs in a list
*
* Use this function to hand received frames to mac80211. The receive
* buffer in @skb must start with an IEEE 802.11 header. In case of a
* paged @skb is used, the driver is recommended to put the ieee80211
* header of the frame on the linear part of the @skb to avoid memory
* allocation and/or memcpy by the stack.
*
* This function may not be called in IRQ context. Calls to this function
* for a single hardware must be synchronized against each other. Calls to
* this function, ieee80211_rx_ni() and ieee80211_rx_irqsafe() may not be
* mixed for a single hardware. Must not run concurrently with
* ieee80211_tx_status() or ieee80211_tx_status_ni().
*
* This function must be called with BHs disabled and RCU read lock
*
* @hw: the hardware this frame came in on
* @sta: the station the frame was received from, or %NULL
* @skb: the buffer to receive, owned by mac80211 after this call
* @list: the destination list
*/
void ieee80211_rx_list(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
struct sk_buff *skb, struct list_head *list);

/**
* ieee80211_rx_napi - receive frame from NAPI context
*
Expand Down Expand Up @@ -4709,7 +4737,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
*
* Call this function for all transmitted data frames after their transmit
* completion. This callback should only be called for data frames which
* are are using driver's (or hardware's) offload capability of encap/decap
* are using driver's (or hardware's) offload capability of encap/decap
* 802.11 frames.
*
* This function may not be called in IRQ context. Calls to this function
Expand Down Expand Up @@ -6235,6 +6263,14 @@ bool ieee80211_tx_prepare_skb(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, struct sk_buff *skb,
int band, struct ieee80211_sta **sta);

/**
* Sanity-check and parse the radiotap header of injected frames
* @skb: packet injected by userspace
* @dev: the &struct device of this 802.11 device
*/
bool ieee80211_parse_tx_radiotap(struct sk_buff *skb,
struct net_device *dev);

/**
* struct ieee80211_noa_data - holds temporary data for tracking P2P NoA state
*
Expand Down Expand Up @@ -6344,7 +6380,7 @@ void ieee80211_unreserve_tid(struct ieee80211_sta *sta, u8 tid);
*
* Note that this must be called in an rcu_read_lock() critical section,
* which can only be released after the SKB was handled. Some pointers in
* skb->cb, e.g. the key pointer, are protected by by RCU and thus the
* skb->cb, e.g. the key pointer, are protected by RCU and thus the
* critical section must persist not just for the duration of this call
* but for the duration of the frame handling.
* However, also note that while in the wake_tx_queue() method,
Expand Down
2 changes: 1 addition & 1 deletion include/net/regulatory.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ enum environment_cap {
* and potentially inform users of which devices specifically
* cased the conflicts.
* @initiator: indicates who sent this request, could be any of
* of those set in nl80211_reg_initiator (%NL80211_REGDOM_SET_BY_*)
* those set in nl80211_reg_initiator (%NL80211_REGDOM_SET_BY_*)
* @alpha2: the ISO / IEC 3166 alpha2 country code of the requested
* regulatory domain. We have a few special codes:
* 00 - World regulatory domain
Expand Down
Loading

0 comments on commit 6f3de75

Please sign in to comment.