Skip to content

Commit 745bd6f

Browse files
committed
Merge tag 'mac80211-next-for-net-next-2020-04-25' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== One batch of changes, containing: * hwsim improvements from Jouni and myself, to be able to test more scenarios easily * some more HE (802.11ax) support * some initial S1G (sub 1 GHz) work for fractional MHz channels * some (action) frame registration updates to help DPP support * along with other various improvements/fixes ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 0e34811 + 60689de commit 745bd6f

49 files changed

Lines changed: 873 additions & 442 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎drivers/net/wireless/ath/ath11k/mac.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,8 +1178,7 @@ static void ath11k_peer_assoc_h_he(struct ath11k *ar,
11781178
sizeof(arg->peer_he_cap_macinfo));
11791179
memcpy(&arg->peer_he_cap_phyinfo, he_cap->he_cap_elem.phy_cap_info,
11801180
sizeof(arg->peer_he_cap_phyinfo));
1181-
memcpy(&arg->peer_he_ops, &vif->bss_conf.he_operation,
1182-
sizeof(arg->peer_he_ops));
1181+
arg->peer_he_ops = vif->bss_conf.he_oper.params;
11831182

11841183
/* the top most byte is used to indicate BSS color info */
11851184
arg->peer_he_ops &= 0xffffff;

‎drivers/net/wireless/ath/ath6kl/cfg80211.c‎

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3249,22 +3249,19 @@ static int ath6kl_get_antenna(struct wiphy *wiphy,
32493249
return 0;
32503250
}
32513251

3252-
static void ath6kl_mgmt_frame_register(struct wiphy *wiphy,
3253-
struct wireless_dev *wdev,
3254-
u16 frame_type, bool reg)
3252+
static void ath6kl_update_mgmt_frame_registrations(struct wiphy *wiphy,
3253+
struct wireless_dev *wdev,
3254+
struct mgmt_frame_regs *upd)
32553255
{
32563256
struct ath6kl_vif *vif = ath6kl_vif_from_wdev(wdev);
32573257

3258-
ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: frame_type=0x%x reg=%d\n",
3259-
__func__, frame_type, reg);
3260-
if (frame_type == IEEE80211_STYPE_PROBE_REQ) {
3261-
/*
3262-
* Note: This notification callback is not allowed to sleep, so
3263-
* we cannot send WMI_PROBE_REQ_REPORT_CMD here. Instead, we
3264-
* hardcode target to report Probe Request frames all the time.
3265-
*/
3266-
vif->probe_req_report = reg;
3267-
}
3258+
/*
3259+
* FIXME: send WMI_PROBE_REQ_REPORT_CMD here instead of hardcoding
3260+
* the reporting in the target all the time, this callback
3261+
* *is* allowed to sleep after all.
3262+
*/
3263+
vif->probe_req_report =
3264+
upd->interface_stypes & BIT(IEEE80211_STYPE_PROBE_REQ >> 4);
32683265
}
32693266

32703267
static int ath6kl_cfg80211_sscan_start(struct wiphy *wiphy,
@@ -3464,7 +3461,8 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
34643461
.remain_on_channel = ath6kl_remain_on_channel,
34653462
.cancel_remain_on_channel = ath6kl_cancel_remain_on_channel,
34663463
.mgmt_tx = ath6kl_mgmt_tx,
3467-
.mgmt_frame_register = ath6kl_mgmt_frame_register,
3464+
.update_mgmt_frame_registrations =
3465+
ath6kl_update_mgmt_frame_registrations,
34683466
.get_antenna = ath6kl_get_antenna,
34693467
.sched_scan_start = ath6kl_cfg80211_sscan_start,
34703468
.sched_scan_stop = ath6kl_cfg80211_sscan_stop,

‎drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c‎

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5031,21 +5031,15 @@ brcmf_cfg80211_change_station(struct wiphy *wiphy, struct net_device *ndev,
50315031
}
50325032

50335033
static void
5034-
brcmf_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
5035-
struct wireless_dev *wdev,
5036-
u16 frame_type, bool reg)
5034+
brcmf_cfg80211_update_mgmt_frame_registrations(struct wiphy *wiphy,
5035+
struct wireless_dev *wdev,
5036+
struct mgmt_frame_regs *upd)
50375037
{
50385038
struct brcmf_cfg80211_vif *vif;
5039-
u16 mgmt_type;
50405039

5041-
brcmf_dbg(TRACE, "Enter, frame_type %04x, reg=%d\n", frame_type, reg);
5042-
5043-
mgmt_type = (frame_type & IEEE80211_FCTL_STYPE) >> 4;
50445040
vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);
5045-
if (reg)
5046-
vif->mgmt_rx_reg |= BIT(mgmt_type);
5047-
else
5048-
vif->mgmt_rx_reg &= ~BIT(mgmt_type);
5041+
5042+
vif->mgmt_rx_reg = upd->interface_stypes;
50495043
}
50505044

50515045

@@ -5460,7 +5454,8 @@ static struct cfg80211_ops brcmf_cfg80211_ops = {
54605454
.change_station = brcmf_cfg80211_change_station,
54615455
.sched_scan_start = brcmf_cfg80211_sched_scan_start,
54625456
.sched_scan_stop = brcmf_cfg80211_sched_scan_stop,
5463-
.mgmt_frame_register = brcmf_cfg80211_mgmt_frame_register,
5457+
.update_mgmt_frame_registrations =
5458+
brcmf_cfg80211_update_mgmt_frame_registrations,
54645459
.mgmt_tx = brcmf_cfg80211_mgmt_tx,
54655460
.remain_on_channel = brcmf_p2p_remain_on_channel,
54665461
.cancel_remain_on_channel = brcmf_cfg80211_cancel_remain_on_channel,

‎drivers/net/wireless/intel/iwlwifi/mvm/rs.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
// SPDX-License-Identifier: GPL-2.0-only
22
/******************************************************************************
33
*
4-
* Copyright(c) 2005 - 2014 Intel Corporation. All rights reserved.
4+
* Copyright(c) 2005 - 2014, 2018 - 2020 Intel Corporation. All rights reserved.
55
* Copyright(c) 2013 - 2015 Intel Mobile Communications GmbH
66
* Copyright(c) 2016 - 2017 Intel Deutschland GmbH
7-
* Copyright(c) 2018 - 2019 Intel Corporation
87
*
98
* Contact Information:
109
* Intel Linux Wireless <linuxwifi@intel.com>
@@ -1430,7 +1429,8 @@ static u32 rs_bw_from_sta_bw(struct ieee80211_sta *sta)
14301429
*/
14311430
if (ieee80211_get_vht_max_nss(&vht_cap,
14321431
IEEE80211_VHT_CHANWIDTH_160MHZ,
1433-
0, true) < sta->rx_nss)
1432+
0, true,
1433+
sta->rx_nss) < sta->rx_nss)
14341434
return RATE_MCS_CHAN_WIDTH_80;
14351435
return RATE_MCS_CHAN_WIDTH_160;
14361436
case IEEE80211_STA_RX_BW_80:

‎drivers/net/wireless/mac80211_hwsim.c‎

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,6 +1068,47 @@ static int hwsim_unicast_netgroup(struct mac80211_hwsim_data *data,
10681068
return res;
10691069
}
10701070

1071+
static void mac80211_hwsim_config_mac_nl(struct ieee80211_hw *hw,
1072+
const u8 *addr, bool add)
1073+
{
1074+
struct mac80211_hwsim_data *data = hw->priv;
1075+
u32 _portid = READ_ONCE(data->wmediumd);
1076+
struct sk_buff *skb;
1077+
void *msg_head;
1078+
1079+
if (!_portid && !hwsim_virtio_enabled)
1080+
return;
1081+
1082+
skb = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_ATOMIC);
1083+
if (!skb)
1084+
return;
1085+
1086+
msg_head = genlmsg_put(skb, 0, 0, &hwsim_genl_family, 0,
1087+
add ? HWSIM_CMD_ADD_MAC_ADDR :
1088+
HWSIM_CMD_DEL_MAC_ADDR);
1089+
if (!msg_head) {
1090+
pr_debug("mac80211_hwsim: problem with msg_head\n");
1091+
goto nla_put_failure;
1092+
}
1093+
1094+
if (nla_put(skb, HWSIM_ATTR_ADDR_TRANSMITTER,
1095+
ETH_ALEN, data->addresses[1].addr))
1096+
goto nla_put_failure;
1097+
1098+
if (nla_put(skb, HWSIM_ATTR_ADDR_RECEIVER, ETH_ALEN, addr))
1099+
goto nla_put_failure;
1100+
1101+
genlmsg_end(skb, msg_head);
1102+
1103+
if (hwsim_virtio_enabled)
1104+
hwsim_tx_virtio(data, skb);
1105+
else
1106+
hwsim_unicast_netgroup(data, skb, _portid);
1107+
return;
1108+
nla_put_failure:
1109+
nlmsg_free(skb);
1110+
}
1111+
10711112
static inline u16 trans_tx_rate_flags_ieee2hwsim(struct ieee80211_tx_rate *rate)
10721113
{
10731114
u16 result = 0;
@@ -1545,6 +1586,9 @@ static int mac80211_hwsim_add_interface(struct ieee80211_hw *hw,
15451586
vif->addr);
15461587
hwsim_set_magic(vif);
15471588

1589+
if (vif->type != NL80211_IFTYPE_MONITOR)
1590+
mac80211_hwsim_config_mac_nl(hw, vif->addr, true);
1591+
15481592
vif->cab_queue = 0;
15491593
vif->hw_queue[IEEE80211_AC_VO] = 0;
15501594
vif->hw_queue[IEEE80211_AC_VI] = 1;
@@ -1584,6 +1628,8 @@ static void mac80211_hwsim_remove_interface(
15841628
vif->addr);
15851629
hwsim_check_magic(vif);
15861630
hwsim_clear_magic(vif);
1631+
if (vif->type != NL80211_IFTYPE_MONITOR)
1632+
mac80211_hwsim_config_mac_nl(hw, vif->addr, false);
15871633
}
15881634

15891635
static void mac80211_hwsim_tx_frame(struct ieee80211_hw *hw,
@@ -1781,6 +1827,8 @@ static void mac80211_hwsim_configure_filter(struct ieee80211_hw *hw,
17811827
data->rx_filter = 0;
17821828
if (*total_flags & FIF_ALLMULTI)
17831829
data->rx_filter |= FIF_ALLMULTI;
1830+
if (*total_flags & FIF_MCAST_ACTION)
1831+
data->rx_filter |= FIF_MCAST_ACTION;
17841832

17851833
*total_flags = data->rx_filter;
17861834
}
@@ -2104,6 +2152,8 @@ static void hw_scan_work(struct work_struct *work)
21042152
hwsim->hw_scan_vif = NULL;
21052153
hwsim->tmp_chan = NULL;
21062154
mutex_unlock(&hwsim->mutex);
2155+
mac80211_hwsim_config_mac_nl(hwsim->hw, hwsim->scan_addr,
2156+
false);
21072157
return;
21082158
}
21092159

@@ -2177,6 +2227,7 @@ static int mac80211_hwsim_hw_scan(struct ieee80211_hw *hw,
21772227
memset(hwsim->survey_data, 0, sizeof(hwsim->survey_data));
21782228
mutex_unlock(&hwsim->mutex);
21792229

2230+
mac80211_hwsim_config_mac_nl(hw, hwsim->scan_addr, true);
21802231
wiphy_dbg(hw->wiphy, "hwsim hw_scan request\n");
21812232

21822233
ieee80211_queue_delayed_work(hwsim->hw, &hwsim->hw_scan, 0);
@@ -2220,6 +2271,7 @@ static void mac80211_hwsim_sw_scan(struct ieee80211_hw *hw,
22202271
pr_debug("hwsim sw_scan request, prepping stuff\n");
22212272

22222273
memcpy(hwsim->scan_addr, mac_addr, ETH_ALEN);
2274+
mac80211_hwsim_config_mac_nl(hw, hwsim->scan_addr, true);
22232275
hwsim->scanning = true;
22242276
memset(hwsim->survey_data, 0, sizeof(hwsim->survey_data));
22252277

@@ -2236,6 +2288,7 @@ static void mac80211_hwsim_sw_scan_complete(struct ieee80211_hw *hw,
22362288

22372289
pr_debug("hwsim sw_scan_complete\n");
22382290
hwsim->scanning = false;
2291+
mac80211_hwsim_config_mac_nl(hw, hwsim->scan_addr, false);
22392292
eth_zero_addr(hwsim->scan_addr);
22402293

22412294
mutex_unlock(&hwsim->mutex);
@@ -2413,6 +2466,11 @@ static void mac80211_hwsim_get_et_stats(struct ieee80211_hw *hw,
24132466
WARN_ON(i != MAC80211_HWSIM_SSTATS_LEN);
24142467
}
24152468

2469+
static int mac80211_hwsim_tx_last_beacon(struct ieee80211_hw *hw)
2470+
{
2471+
return 1;
2472+
}
2473+
24162474
#define HWSIM_COMMON_OPS \
24172475
.tx = mac80211_hwsim_tx, \
24182476
.start = mac80211_hwsim_start, \
@@ -2423,6 +2481,7 @@ static void mac80211_hwsim_get_et_stats(struct ieee80211_hw *hw,
24232481
.config = mac80211_hwsim_config, \
24242482
.configure_filter = mac80211_hwsim_configure_filter, \
24252483
.bss_info_changed = mac80211_hwsim_bss_info_changed, \
2484+
.tx_last_beacon = mac80211_hwsim_tx_last_beacon, \
24262485
.sta_add = mac80211_hwsim_sta_add, \
24272486
.sta_remove = mac80211_hwsim_sta_remove, \
24282487
.sta_notify = mac80211_hwsim_sta_notify, \
@@ -3003,6 +3062,10 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
30033062
NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR;
30043063
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_VHT_IBSS);
30053064
wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_BEACON_PROTECTION);
3065+
wiphy_ext_feature_set(hw->wiphy,
3066+
NL80211_EXT_FEATURE_MULTICAST_REGISTRATIONS);
3067+
wiphy_ext_feature_set(hw->wiphy,
3068+
NL80211_EXT_FEATURE_BEACON_RATE_LEGACY);
30063069

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

‎drivers/net/wireless/mac80211_hwsim.h‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ enum hwsim_tx_control_flags {
7575
* @HWSIM_CMD_DEL_RADIO: destroy a radio, reply is multicasted
7676
* @HWSIM_CMD_GET_RADIO: fetch information about existing radios, uses:
7777
* %HWSIM_ATTR_RADIO_ID
78+
* @HWSIM_CMD_ADD_MAC_ADDR: add a receive MAC address (given in the
79+
* %HWSIM_ATTR_ADDR_RECEIVER attribute) to a device identified by
80+
* %HWSIM_ATTR_ADDR_TRANSMITTER. This lets wmediumd forward frames
81+
* to this receiver address for a given station.
82+
* @HWSIM_CMD_DEL_MAC_ADDR: remove the MAC address again, the attributes
83+
* are the same as to @HWSIM_CMD_ADD_MAC_ADDR.
7884
* @__HWSIM_CMD_MAX: enum limit
7985
*/
8086
enum {
@@ -85,6 +91,8 @@ enum {
8591
HWSIM_CMD_NEW_RADIO,
8692
HWSIM_CMD_DEL_RADIO,
8793
HWSIM_CMD_GET_RADIO,
94+
HWSIM_CMD_ADD_MAC_ADDR,
95+
HWSIM_CMD_DEL_MAC_ADDR,
8896
__HWSIM_CMD_MAX,
8997
};
9098
#define HWSIM_CMD_MAX (_HWSIM_CMD_MAX - 1)

‎drivers/net/wireless/marvell/mwifiex/cfg80211.c‎

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -269,17 +269,12 @@ mwifiex_cfg80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
269269
* CFG802.11 operation handler to register a mgmt frame.
270270
*/
271271
static void
272-
mwifiex_cfg80211_mgmt_frame_register(struct wiphy *wiphy,
273-
struct wireless_dev *wdev,
274-
u16 frame_type, bool reg)
272+
mwifiex_cfg80211_update_mgmt_frame_registrations(struct wiphy *wiphy,
273+
struct wireless_dev *wdev,
274+
struct mgmt_frame_regs *upd)
275275
{
276276
struct mwifiex_private *priv = mwifiex_netdev_get_priv(wdev->netdev);
277-
u32 mask;
278-
279-
if (reg)
280-
mask = priv->mgmt_frame_mask | BIT(frame_type >> 4);
281-
else
282-
mask = priv->mgmt_frame_mask & ~BIT(frame_type >> 4);
277+
u32 mask = upd->interface_stypes;
283278

284279
if (mask != priv->mgmt_frame_mask) {
285280
priv->mgmt_frame_mask = mask;
@@ -4187,7 +4182,8 @@ static struct cfg80211_ops mwifiex_cfg80211_ops = {
41874182
.del_key = mwifiex_cfg80211_del_key,
41884183
.set_default_mgmt_key = mwifiex_cfg80211_set_default_mgmt_key,
41894184
.mgmt_tx = mwifiex_cfg80211_mgmt_tx,
4190-
.mgmt_frame_register = mwifiex_cfg80211_mgmt_frame_register,
4185+
.update_mgmt_frame_registrations =
4186+
mwifiex_cfg80211_update_mgmt_frame_registrations,
41914187
.remain_on_channel = mwifiex_cfg80211_remain_on_channel,
41924188
.cancel_remain_on_channel = mwifiex_cfg80211_cancel_remain_on_channel,
41934189
.set_default_key = mwifiex_cfg80211_set_default_key,

0 commit comments

Comments
 (0)