Skip to content

Commit f0259b6

Browse files
committed
Merge tag 'mac80211-next-for-davem-2018-08-29' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== Only a few changes at this point: * new channels in 60 GHz * clarify (average) ACK signal reporting API * expose ieee80211_send_layer2_update() for all drivers * start/stop mac80211's TXQs properly when required * avoid regulatory restore with IE ignoring * spelling: contidion -> condition * fully implement WFA Multi-AP backhaul ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 016f3d1 + 9c06602 commit f0259b6

File tree

16 files changed

+258
-77
lines changed

16 files changed

+258
-77
lines changed

drivers/net/wireless/ath/wil6210/debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1436,7 +1436,7 @@ static int wil_freq_debugfs_show(struct seq_file *s, void *data)
14361436
{
14371437
struct wil6210_priv *wil = s->private;
14381438
struct wireless_dev *wdev = wil->main_ndev->ieee80211_ptr;
1439-
u16 freq = wdev->chandef.chan ? wdev->chandef.chan->center_freq : 0;
1439+
u32 freq = wdev->chandef.chan ? wdev->chandef.chan->center_freq : 0;
14401440

14411441
seq_printf(s, "Freq = %d\n", freq);
14421442

include/net/cfg80211.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ enum ieee80211_channel_flags {
149149
*/
150150
struct ieee80211_channel {
151151
enum nl80211_band band;
152-
u16 center_freq;
152+
u32 center_freq;
153153
u16 hw_value;
154154
u32 flags;
155155
int max_antenna_gain;
@@ -4732,6 +4732,17 @@ static inline const u8 *cfg80211_find_ext_ie(u8 ext_eid, const u8 *ies, int len)
47324732
const u8 *cfg80211_find_vendor_ie(unsigned int oui, int oui_type,
47334733
const u8 *ies, int len);
47344734

4735+
/**
4736+
* cfg80211_send_layer2_update - send layer 2 update frame
4737+
*
4738+
* @dev: network device
4739+
* @addr: STA MAC address
4740+
*
4741+
* Wireless drivers can use this function to update forwarding tables in bridge
4742+
* devices upon STA association.
4743+
*/
4744+
void cfg80211_send_layer2_update(struct net_device *dev, const u8 *addr);
4745+
47354746
/**
47364747
* DOC: Regulatory enforcement infrastructure
47374748
*

include/net/mac80211.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,6 +1504,8 @@ enum ieee80211_vif_flags {
15041504
* @drv_priv: data area for driver use, will always be aligned to
15051505
* sizeof(void \*).
15061506
* @txq: the multicast data TX queue (if driver uses the TXQ abstraction)
1507+
* @txqs_stopped: per AC flag to indicate that intermediate TXQs are stopped,
1508+
* protected by fq->lock.
15071509
*/
15081510
struct ieee80211_vif {
15091511
enum nl80211_iftype type;
@@ -1528,6 +1530,8 @@ struct ieee80211_vif {
15281530

15291531
unsigned int probe_req_reg;
15301532

1533+
bool txqs_stopped[IEEE80211_NUM_ACS];
1534+
15311535
/* must be last */
15321536
u8 drv_priv[0] __aligned(sizeof(void *));
15331537
};

include/uapi/linux/nl80211.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3050,8 +3050,7 @@ enum nl80211_sta_bss_param {
30503050
* received from the station (u64, usec)
30513051
* @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment
30523052
* @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm)
3053-
* @NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG: avg signal strength of (data)
3054-
* ACK frame (s8, dBm)
3053+
* @NL80211_STA_INFO_ACK_SIGNAL_AVG: avg signal strength of ACK frames (s8, dBm)
30553054
* @__NL80211_STA_INFO_AFTER_LAST: internal
30563055
* @NL80211_STA_INFO_MAX: highest possible station info attribute
30573056
*/
@@ -3091,13 +3090,17 @@ enum nl80211_sta_info {
30913090
NL80211_STA_INFO_RX_DURATION,
30923091
NL80211_STA_INFO_PAD,
30933092
NL80211_STA_INFO_ACK_SIGNAL,
3094-
NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG,
3093+
NL80211_STA_INFO_ACK_SIGNAL_AVG,
30953094

30963095
/* keep last */
30973096
__NL80211_STA_INFO_AFTER_LAST,
30983097
NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1
30993098
};
31003099

3100+
/* we renamed this - stay compatible */
3101+
#define NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG NL80211_STA_INFO_ACK_SIGNAL_AVG
3102+
3103+
31013104
/**
31023105
* enum nl80211_tid_stats - per TID statistics attributes
31033106
* @__NL80211_TID_STATS_INVALID: attribute number 0 is reserved
@@ -4338,7 +4341,7 @@ enum nl80211_txrate_gi {
43384341
* enum nl80211_band - Frequency band
43394342
* @NL80211_BAND_2GHZ: 2.4 GHz ISM band
43404343
* @NL80211_BAND_5GHZ: around 5 GHz band (4.9 - 5.7 GHz)
4341-
* @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 64.80 GHz)
4344+
* @NL80211_BAND_60GHZ: around 60 GHz band (58.32 - 69.12 GHz)
43424345
* @NUM_NL80211_BANDS: number of bands, avoid using this in userspace
43434346
* since newer kernel versions may support more bands
43444347
*/
@@ -5213,9 +5216,8 @@ enum nl80211_feature_flags {
52135216
* "radar detected" event.
52145217
* @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and
52155218
* receiving control port frames over nl80211 instead of the netdevice.
5216-
* @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack
5217-
* rssi if firmware support, this flag is to intimate about ack rssi
5218-
* support to nl80211.
5219+
* @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports
5220+
* (average) ACK signal strength reporting.
52195221
* @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
52205222
* TXQs.
52215223
* @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the
@@ -5255,7 +5257,9 @@ enum nl80211_ext_feature_index {
52555257
NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN,
52565258
NL80211_EXT_FEATURE_DFS_OFFLOAD,
52575259
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211,
5258-
NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT,
5260+
NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
5261+
/* we renamed this - stay compatible */
5262+
NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
52595263
NL80211_EXT_FEATURE_TXQS,
52605264
NL80211_EXT_FEATURE_SCAN_RANDOM_SN,
52615265
NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT,

net/mac80211/cfg.c

Lines changed: 2 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,50 +1092,6 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev)
10921092
return 0;
10931093
}
10941094

1095-
/* Layer 2 Update frame (802.2 Type 1 LLC XID Update response) */
1096-
struct iapp_layer2_update {
1097-
u8 da[ETH_ALEN]; /* broadcast */
1098-
u8 sa[ETH_ALEN]; /* STA addr */
1099-
__be16 len; /* 6 */
1100-
u8 dsap; /* 0 */
1101-
u8 ssap; /* 0 */
1102-
u8 control;
1103-
u8 xid_info[3];
1104-
} __packed;
1105-
1106-
static void ieee80211_send_layer2_update(struct sta_info *sta)
1107-
{
1108-
struct iapp_layer2_update *msg;
1109-
struct sk_buff *skb;
1110-
1111-
/* Send Level 2 Update Frame to update forwarding tables in layer 2
1112-
* bridge devices */
1113-
1114-
skb = dev_alloc_skb(sizeof(*msg));
1115-
if (!skb)
1116-
return;
1117-
msg = skb_put(skb, sizeof(*msg));
1118-
1119-
/* 802.2 Type 1 Logical Link Control (LLC) Exchange Identifier (XID)
1120-
* Update response frame; IEEE Std 802.2-1998, 5.4.1.2.1 */
1121-
1122-
eth_broadcast_addr(msg->da);
1123-
memcpy(msg->sa, sta->sta.addr, ETH_ALEN);
1124-
msg->len = htons(6);
1125-
msg->dsap = 0;
1126-
msg->ssap = 0x01; /* NULL LSAP, CR Bit: Response */
1127-
msg->control = 0xaf; /* XID response lsb.1111F101.
1128-
* F=0 (no poll command; unsolicited frame) */
1129-
msg->xid_info[0] = 0x81; /* XID format identifier */
1130-
msg->xid_info[1] = 1; /* LLC types/classes: Type 1 LLC */
1131-
msg->xid_info[2] = 0; /* XID sender's receive window size (RW) */
1132-
1133-
skb->dev = sta->sdata->dev;
1134-
skb->protocol = eth_type_trans(skb, sta->sdata->dev);
1135-
memset(skb->cb, 0, sizeof(skb->cb));
1136-
netif_rx_ni(skb);
1137-
}
1138-
11391095
static int sta_apply_auth_flags(struct ieee80211_local *local,
11401096
struct sta_info *sta,
11411097
u32 mask, u32 set)
@@ -1499,7 +1455,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev,
14991455
}
15001456

15011457
if (layer2_update)
1502-
ieee80211_send_layer2_update(sta);
1458+
cfg80211_send_layer2_update(sta->sdata->dev, sta->sta.addr);
15031459

15041460
rcu_read_unlock();
15051461

@@ -1601,7 +1557,7 @@ static int ieee80211_change_station(struct wiphy *wiphy,
16011557
if (test_sta_flag(sta, WLAN_STA_AUTHORIZED))
16021558
ieee80211_vif_inc_num_mcast(sta->sdata);
16031559

1604-
ieee80211_send_layer2_update(sta);
1560+
cfg80211_send_layer2_update(sta->sdata->dev, sta->sta.addr);
16051561
}
16061562

16071563
err = sta_apply_parameters(local, sta, params);

net/mac80211/ieee80211_i.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,7 @@ enum txq_info_flags {
818818
IEEE80211_TXQ_STOP,
819819
IEEE80211_TXQ_AMPDU,
820820
IEEE80211_TXQ_NO_AMSDU,
821+
IEEE80211_TXQ_STOP_NETIF_TX,
821822
};
822823

823824
/**
@@ -1226,6 +1227,7 @@ struct ieee80211_local {
12261227

12271228
struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
12281229
struct tasklet_struct tx_pending_tasklet;
1230+
struct tasklet_struct wake_txqs_tasklet;
12291231

12301232
atomic_t agg_queue_stop[IEEE80211_MAX_QUEUES];
12311233

@@ -2038,6 +2040,7 @@ void ieee80211_txq_remove_vlan(struct ieee80211_local *local,
20382040
struct ieee80211_sub_if_data *sdata);
20392041
void ieee80211_fill_txq_stats(struct cfg80211_txq_stats *txqstats,
20402042
struct txq_info *txqi);
2043+
void ieee80211_wake_txqs(unsigned long data);
20412044
void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
20422045
u16 transaction, u16 auth_alg, u16 status,
20432046
const u8 *extra, size_t extra_len, const u8 *bssid,

net/mac80211/main.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,10 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
668668
tasklet_init(&local->tx_pending_tasklet, ieee80211_tx_pending,
669669
(unsigned long)local);
670670

671+
if (ops->wake_tx_queue)
672+
tasklet_init(&local->wake_txqs_tasklet, ieee80211_wake_txqs,
673+
(unsigned long)local);
674+
671675
tasklet_init(&local->tasklet,
672676
ieee80211_tasklet_handler,
673677
(unsigned long) local);

net/mac80211/rx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2313,7 +2313,7 @@ __ieee80211_data_to_8023(struct ieee80211_rx_data *rx, bool *port_control)
23132313

23142314
if (!sdata->u.mgd.use_4addr)
23152315
return -1;
2316-
else
2316+
else if (!ether_addr_equal(hdr->addr1, sdata->vif.addr))
23172317
check_port_control = true;
23182318
}
23192319

net/mac80211/sta_info.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,13 +2323,13 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
23232323
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
23242324
}
23252325

2326-
if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS) &&
2327-
!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG))) {
2326+
if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG)) &&
2327+
sta->status_stats.ack_signal_filled) {
23282328
sinfo->avg_ack_signal =
23292329
-(s8)ewma_avg_signal_read(
23302330
&sta->status_stats.avg_ack_signal);
23312331
sinfo->filled |=
2332-
BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG);
2332+
BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG);
23332333
}
23342334
}
23352335

net/mac80211/tx.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3466,13 +3466,19 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
34663466
struct ieee80211_tx_info *info;
34673467
struct ieee80211_tx_data tx;
34683468
ieee80211_tx_result r;
3469-
struct ieee80211_vif *vif;
3469+
struct ieee80211_vif *vif = txq->vif;
34703470

34713471
spin_lock_bh(&fq->lock);
34723472

3473-
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags))
3473+
if (test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ||
3474+
test_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags))
34743475
goto out;
34753476

3477+
if (vif->txqs_stopped[ieee80211_ac_from_tid(txq->tid)]) {
3478+
set_bit(IEEE80211_TXQ_STOP_NETIF_TX, &txqi->flags);
3479+
goto out;
3480+
}
3481+
34763482
/* Make sure fragments stay together. */
34773483
skb = __skb_dequeue(&txqi->frags);
34783484
if (skb)
@@ -3567,6 +3573,7 @@ struct sk_buff *ieee80211_tx_dequeue(struct ieee80211_hw *hw,
35673573
}
35683574

35693575
IEEE80211_SKB_CB(skb)->control.vif = vif;
3576+
35703577
out:
35713578
spin_unlock_bh(&fq->lock);
35723579

0 commit comments

Comments
 (0)