Skip to content

Commit 30e5a9a

Browse files
committed
Merge tag 'mac80211-next-for-davem-2019-04-26' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== Various updates, notably: * extended key ID support (from 802.11-2016) * per-STA TX power control support * mac80211 TX performance improvements * HE (802.11ax) updates * mesh link probing support * enhancements of multi-BSSID support (also related to HE) * OWE userspace processing support ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents 148f025 + 8828f81 commit 30e5a9a

36 files changed

+1465
-360
lines changed

drivers/net/wireless/mac80211_hwsim.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2810,6 +2810,12 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,
28102810
ieee80211_hw_set(hw, SIGNAL_DBM);
28112811
ieee80211_hw_set(hw, SUPPORTS_PS);
28122812
ieee80211_hw_set(hw, TDLS_WIDER_BW);
2813+
2814+
/* We only have SW crypto and only implement the A-MPDU API
2815+
* (but don't really build A-MPDUs) so can have extended key
2816+
* support
2817+
*/
2818+
ieee80211_hw_set(hw, EXT_KEY_ID_NATIVE);
28132819
if (rctbl)
28142820
ieee80211_hw_set(hw, SUPPORTS_RC_TABLE);
28152821
ieee80211_hw_set(hw, SUPPORTS_MULTI_BSSID);
@@ -3900,6 +3906,8 @@ static int __init init_mac80211_hwsim(void)
39003906
param.p2p_device = support_p2p_device;
39013907
param.use_chanctx = channels > 1;
39023908
param.iftypes = HWSIM_IFTYPE_SUPPORT_MASK;
3909+
if (param.p2p_device)
3910+
param.iftypes |= BIT(NL80211_IFTYPE_P2P_DEVICE);
39033911

39043912
err = mac80211_hwsim_new_radio(NULL, &param);
39053913
if (err < 0)

include/linux/ieee80211.h

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,7 +1557,7 @@ struct ieee80211_vht_operation {
15571557
* struct ieee80211_he_cap_elem - HE capabilities element
15581558
*
15591559
* This structure is the "HE capabilities element" fixed fields as
1560-
* described in P802.11ax_D3.0 section 9.4.2.237.2 and 9.4.2.237.3
1560+
* described in P802.11ax_D4.0 section 9.4.2.242.2 and 9.4.2.242.3
15611561
*/
15621562
struct ieee80211_he_cap_elem {
15631563
u8 mac_cap_info[6];
@@ -1619,20 +1619,20 @@ struct ieee80211_he_mcs_nss_supp {
16191619
* struct ieee80211_he_operation - HE capabilities element
16201620
*
16211621
* This structure is the "HE operation element" fields as
1622-
* described in P802.11ax_D3.0 section 9.4.2.238
1622+
* described in P802.11ax_D4.0 section 9.4.2.243
16231623
*/
16241624
struct ieee80211_he_operation {
16251625
__le32 he_oper_params;
16261626
__le16 he_mcs_nss_set;
1627-
/* Optional 0,1,3 or 4 bytes: depends on @he_oper_params */
1627+
/* Optional 0,1,3,4,5,7 or 8 bytes: depends on @he_oper_params */
16281628
u8 optional[0];
16291629
} __packed;
16301630

16311631
/**
16321632
* struct ieee80211_he_mu_edca_param_ac_rec - MU AC Parameter Record field
16331633
*
16341634
* This structure is the "MU AC Parameter Record" fields as
1635-
* described in P802.11ax_D2.0 section 9.4.2.240
1635+
* described in P802.11ax_D4.0 section 9.4.2.245
16361636
*/
16371637
struct ieee80211_he_mu_edca_param_ac_rec {
16381638
u8 aifsn;
@@ -1644,7 +1644,7 @@ struct ieee80211_he_mu_edca_param_ac_rec {
16441644
* struct ieee80211_mu_edca_param_set - MU EDCA Parameter Set element
16451645
*
16461646
* This structure is the "MU EDCA Parameter Set element" fields as
1647-
* described in P802.11ax_D2.0 section 9.4.2.240
1647+
* described in P802.11ax_D4.0 section 9.4.2.245
16481648
*/
16491649
struct ieee80211_mu_edca_param_set {
16501650
u8 mu_qos_info;
@@ -2026,6 +2026,7 @@ ieee80211_he_ppe_size(u8 ppe_thres_hdr, const u8 *phy_cap_info)
20262026
#define IEEE80211_HE_OPERATION_VHT_OPER_INFO 0x00004000
20272027
#define IEEE80211_HE_OPERATION_CO_HOSTED_BSS 0x00008000
20282028
#define IEEE80211_HE_OPERATION_ER_SU_DISABLE 0x00010000
2029+
#define IEEE80211_HE_OPERATION_6GHZ_OP_INFO 0x00020000
20292030
#define IEEE80211_HE_OPERATION_BSS_COLOR_MASK 0x3f000000
20302031
#define IEEE80211_HE_OPERATION_BSS_COLOR_OFFSET 24
20312032
#define IEEE80211_HE_OPERATION_PARTIAL_BSS_COLOR 0x40000000
@@ -2056,6 +2057,8 @@ ieee80211_he_oper_size(const u8 *he_oper_ie)
20562057
oper_len += 3;
20572058
if (he_oper_params & IEEE80211_HE_OPERATION_CO_HOSTED_BSS)
20582059
oper_len++;
2060+
if (he_oper_params & IEEE80211_HE_OPERATION_6GHZ_OP_INFO)
2061+
oper_len += 4;
20592062

20602063
/* Add the first byte (extension ID) to the total length */
20612064
oper_len++;
@@ -2487,6 +2490,7 @@ enum ieee80211_eid_ext {
24872490
WLAN_EID_EXT_HE_MU_EDCA = 38,
24882491
WLAN_EID_EXT_MAX_CHANNEL_SWITCH_TIME = 52,
24892492
WLAN_EID_EXT_MULTIPLE_BSSID_CONFIGURATION = 55,
2493+
WLAN_EID_EXT_NON_INHERITANCE = 56,
24902494
};
24912495

24922496
/* Action category code */

include/net/cfg80211.h

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,15 @@ struct vif_params {
485485
* with the get_key() callback, must be in little endian,
486486
* length given by @seq_len.
487487
* @seq_len: length of @seq.
488+
* @mode: key install mode (RX_TX, NO_TX or SET_TX)
488489
*/
489490
struct key_params {
490491
const u8 *key;
491492
const u8 *seq;
492493
int key_len;
493494
int seq_len;
494495
u32 cipher;
496+
enum nl80211_key_mode mode;
495497
};
496498

497499
/**
@@ -973,6 +975,27 @@ enum station_parameters_apply_mask {
973975
STATION_PARAM_APPLY_UAPSD = BIT(0),
974976
STATION_PARAM_APPLY_CAPABILITY = BIT(1),
975977
STATION_PARAM_APPLY_PLINK_STATE = BIT(2),
978+
STATION_PARAM_APPLY_STA_TXPOWER = BIT(3),
979+
};
980+
981+
/**
982+
* struct sta_txpwr - station txpower configuration
983+
*
984+
* Used to configure txpower for station.
985+
*
986+
* @power: tx power (in dBm) to be used for sending data traffic. If tx power
987+
* is not provided, the default per-interface tx power setting will be
988+
* overriding. Driver should be picking up the lowest tx power, either tx
989+
* power per-interface or per-station.
990+
* @type: In particular if TPC %type is NL80211_TX_POWER_LIMITED then tx power
991+
* will be less than or equal to specified from userspace, whereas if TPC
992+
* %type is NL80211_TX_POWER_AUTOMATIC then it indicates default tx power.
993+
* NL80211_TX_POWER_FIXED is not a valid configuration option for
994+
* per peer TPC.
995+
*/
996+
struct sta_txpwr {
997+
s16 power;
998+
enum nl80211_tx_power_setting type;
976999
};
9771000

9781001
/**
@@ -1047,6 +1070,7 @@ struct station_parameters {
10471070
const struct ieee80211_he_cap_elem *he_capa;
10481071
u8 he_capa_len;
10491072
u16 airtime_weight;
1073+
struct sta_txpwr txpwr;
10501074
};
10511075

10521076
/**
@@ -1327,6 +1351,7 @@ struct cfg80211_tid_stats {
13271351
* @fcs_err_count: number of packets (MPDUs) received from this station with
13281352
* an FCS error. This counter should be incremented only when TA of the
13291353
* received packet with an FCS error matches the peer MAC address.
1354+
* @airtime_link_metric: mesh airtime link metric.
13301355
*/
13311356
struct station_info {
13321357
u64 filled;
@@ -1381,6 +1406,8 @@ struct station_info {
13811406

13821407
u32 rx_mpdu_count;
13831408
u32 fcs_err_count;
1409+
1410+
u32 airtime_link_metric;
13841411
};
13851412

13861413
#if IS_ENABLED(CONFIG_CFG80211)
@@ -1832,11 +1859,19 @@ static inline void get_random_mask_addr(u8 *buf, const u8 *addr, const u8 *mask)
18321859
* @bssid: BSSID to be matched; may be all-zero BSSID in case of SSID match
18331860
* or no match (RSSI only)
18341861
* @rssi_thold: don't report scan results below this threshold (in s32 dBm)
1862+
* @per_band_rssi_thold: Minimum rssi threshold for each band to be applied
1863+
* for filtering out scan results received. Drivers advertize this support
1864+
* of band specific rssi based filtering through the feature capability
1865+
* %NL80211_EXT_FEATURE_SCHED_SCAN_BAND_SPECIFIC_RSSI_THOLD. These band
1866+
* specific rssi thresholds take precedence over rssi_thold, if specified.
1867+
* If not specified for any band, it will be assigned with rssi_thold of
1868+
* corresponding matchset.
18351869
*/
18361870
struct cfg80211_match_set {
18371871
struct cfg80211_ssid ssid;
18381872
u8 bssid[ETH_ALEN];
18391873
s32 rssi_thold;
1874+
s32 per_band_rssi_thold[NUM_NL80211_BANDS];
18401875
};
18411876

18421877
/**
@@ -3099,6 +3134,32 @@ struct cfg80211_pmsr_request {
30993134
struct cfg80211_pmsr_request_peer peers[];
31003135
};
31013136

3137+
/**
3138+
* struct cfg80211_update_owe_info - OWE Information
3139+
*
3140+
* This structure provides information needed for the drivers to offload OWE
3141+
* (Opportunistic Wireless Encryption) processing to the user space.
3142+
*
3143+
* Commonly used across update_owe_info request and event interfaces.
3144+
*
3145+
* @peer: MAC address of the peer device for which the OWE processing
3146+
* has to be done.
3147+
* @status: status code, %WLAN_STATUS_SUCCESS for successful OWE info
3148+
* processing, use %WLAN_STATUS_UNSPECIFIED_FAILURE if user space
3149+
* cannot give you the real status code for failures. Used only for
3150+
* OWE update request command interface (user space to driver).
3151+
* @ie: IEs obtained from the peer or constructed by the user space. These are
3152+
* the IEs of the remote peer in the event from the host driver and
3153+
* the constructed IEs by the user space in the request interface.
3154+
* @ie_len: Length of IEs in octets.
3155+
*/
3156+
struct cfg80211_update_owe_info {
3157+
u8 peer[ETH_ALEN] __aligned(2);
3158+
u16 status;
3159+
const u8 *ie;
3160+
size_t ie_len;
3161+
};
3162+
31023163
/**
31033164
* struct cfg80211_ops - backend description for wireless configuration
31043165
*
@@ -3436,6 +3497,13 @@ struct cfg80211_pmsr_request {
34363497
* Statistics should be cumulative, currently no way to reset is provided.
34373498
* @start_pmsr: start peer measurement (e.g. FTM)
34383499
* @abort_pmsr: abort peer measurement
3500+
*
3501+
* @update_owe_info: Provide updated OWE info to driver. Driver implementing SME
3502+
* but offloading OWE processing to the user space will get the updated
3503+
* DH IE through this interface.
3504+
*
3505+
* @probe_mesh_link: Probe direct Mesh peer's link quality by sending data frame
3506+
* and overrule HWMP path selection algorithm.
34393507
*/
34403508
struct cfg80211_ops {
34413509
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -3750,6 +3818,10 @@ struct cfg80211_ops {
37503818
struct cfg80211_pmsr_request *request);
37513819
void (*abort_pmsr)(struct wiphy *wiphy, struct wireless_dev *wdev,
37523820
struct cfg80211_pmsr_request *request);
3821+
int (*update_owe_info)(struct wiphy *wiphy, struct net_device *dev,
3822+
struct cfg80211_update_owe_info *owe_info);
3823+
int (*probe_mesh_link)(struct wiphy *wiphy, struct net_device *dev,
3824+
const u8 *buf, size_t len);
37533825
};
37543826

37553827
/*
@@ -5491,6 +5563,28 @@ static inline void cfg80211_gen_new_bssid(const u8 *bssid, u8 max_bssid,
54915563
u64_to_ether_addr(new_bssid_u64, new_bssid);
54925564
}
54935565

5566+
/**
5567+
* cfg80211_is_element_inherited - returns if element ID should be inherited
5568+
* @element: element to check
5569+
* @non_inherit_element: non inheritance element
5570+
*/
5571+
bool cfg80211_is_element_inherited(const struct element *element,
5572+
const struct element *non_inherit_element);
5573+
5574+
/**
5575+
* cfg80211_merge_profile - merges a MBSSID profile if it is split between IEs
5576+
* @ie: ies
5577+
* @ielen: length of IEs
5578+
* @mbssid_elem: current MBSSID element
5579+
* @sub_elem: current MBSSID subelement (profile)
5580+
* @merged_ie: location of the merged profile
5581+
* @max_copy_len: max merged profile length
5582+
*/
5583+
size_t cfg80211_merge_profile(const u8 *ie, size_t ielen,
5584+
const struct element *mbssid_elem,
5585+
const struct element *sub_elem,
5586+
u8 *merged_ie, size_t max_copy_len);
5587+
54945588
/**
54955589
* enum cfg80211_bss_frame_type - frame type that the BSS data came from
54965590
* @CFG80211_BSS_FTYPE_UNKNOWN: driver doesn't know whether the data is
@@ -7213,4 +7307,14 @@ void cfg80211_pmsr_complete(struct wireless_dev *wdev,
72137307
#define wiphy_WARN(wiphy, format, args...) \
72147308
WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args);
72157309

7310+
/**
7311+
* cfg80211_update_owe_info_event - Notify the peer's OWE info to user space
7312+
* @netdev: network device
7313+
* @owe_info: peer's owe info
7314+
* @gfp: allocation flags
7315+
*/
7316+
void cfg80211_update_owe_info_event(struct net_device *netdev,
7317+
struct cfg80211_update_owe_info *owe_info,
7318+
gfp_t gfp);
7319+
72167320
#endif /* __NET_CFG80211_H */

include/net/fq_impl.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -107,21 +107,23 @@ static struct sk_buff *fq_tin_dequeue(struct fq *fq,
107107
return skb;
108108
}
109109

110+
static u32 fq_flow_idx(struct fq *fq, struct sk_buff *skb)
111+
{
112+
u32 hash = skb_get_hash_perturb(skb, fq->perturbation);
113+
114+
return reciprocal_scale(hash, fq->flows_cnt);
115+
}
116+
110117
static struct fq_flow *fq_flow_classify(struct fq *fq,
111-
struct fq_tin *tin,
118+
struct fq_tin *tin, u32 idx,
112119
struct sk_buff *skb,
113120
fq_flow_get_default_t get_default_func)
114121
{
115122
struct fq_flow *flow;
116-
u32 hash;
117-
u32 idx;
118123

119124
lockdep_assert_held(&fq->lock);
120125

121-
hash = skb_get_hash_perturb(skb, fq->perturbation);
122-
idx = reciprocal_scale(hash, fq->flows_cnt);
123126
flow = &fq->flows[idx];
124-
125127
if (flow->tin && flow->tin != tin) {
126128
flow = get_default_func(fq, tin, idx, skb);
127129
tin->collisions++;
@@ -153,7 +155,7 @@ static void fq_recalc_backlog(struct fq *fq,
153155
}
154156

155157
static void fq_tin_enqueue(struct fq *fq,
156-
struct fq_tin *tin,
158+
struct fq_tin *tin, u32 idx,
157159
struct sk_buff *skb,
158160
fq_skb_free_t free_func,
159161
fq_flow_get_default_t get_default_func)
@@ -163,7 +165,7 @@ static void fq_tin_enqueue(struct fq *fq,
163165

164166
lockdep_assert_held(&fq->lock);
165167

166-
flow = fq_flow_classify(fq, tin, skb, get_default_func);
168+
flow = fq_flow_classify(fq, tin, idx, skb, get_default_func);
167169

168170
flow->tin = tin;
169171
flow->backlog += skb->len;

0 commit comments

Comments
 (0)