Skip to content

Commit cec3819

Browse files
committed
Merge tag 'mac80211-next-for-davem-2017-04-28' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
Johannes Berg says: ==================== Another set of patches for -next: * API support for concurrent scheduled scan requests * API changes for roaming reporting * BSS max idle support in mac80211 * API changes for TX status reporting in mac80211 * API changes for RX rate reporting in mac80211 * rewrite monitor logic to prepare for BPF filters * bugfix for rare devices without 2.4 GHz support * a bugfix for recent DFS changes * some further cleanups The API changes are actually at a nice time, since it's typically quiet just before the merge window, and trees can be synchronized easily during it. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents 2d2ab65 + b34939b commit cec3819

File tree

86 files changed

+1323
-936
lines changed

Some content is hidden

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

86 files changed

+1323
-936
lines changed

drivers/net/wireless/ath/ath10k/htt_rx.c

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,11 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
632632
sgi = (info3 >> 7) & 1;
633633

634634
status->rate_idx = mcs;
635-
status->flag |= RX_FLAG_HT;
635+
status->encoding = RX_ENC_HT;
636636
if (sgi)
637-
status->flag |= RX_FLAG_SHORT_GI;
637+
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
638638
if (bw)
639-
status->flag |= RX_FLAG_40MHZ;
639+
status->bw = RATE_INFO_BW_40;
640640
break;
641641
case HTT_RX_VHT:
642642
case HTT_RX_VHT_WITH_TXBF:
@@ -689,29 +689,29 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
689689
}
690690

691691
status->rate_idx = mcs;
692-
status->vht_nss = nss;
692+
status->nss = nss;
693693

694694
if (sgi)
695-
status->flag |= RX_FLAG_SHORT_GI;
695+
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
696696

697697
switch (bw) {
698698
/* 20MHZ */
699699
case 0:
700700
break;
701701
/* 40MHZ */
702702
case 1:
703-
status->flag |= RX_FLAG_40MHZ;
703+
status->bw = RATE_INFO_BW_40;
704704
break;
705705
/* 80MHZ */
706706
case 2:
707-
status->vht_flag |= RX_VHT_FLAG_80MHZ;
707+
status->bw = RATE_INFO_BW_80;
708708
break;
709709
case 3:
710-
status->vht_flag |= RX_VHT_FLAG_160MHZ;
710+
status->bw = RATE_INFO_BW_160;
711711
break;
712712
}
713713

714-
status->flag |= RX_FLAG_VHT;
714+
status->encoding = RX_ENC_VHT;
715715
break;
716716
default:
717717
break;
@@ -874,13 +874,10 @@ static void ath10k_htt_rx_h_ppdu(struct ath10k *ar,
874874
/* New PPDU starts so clear out the old per-PPDU status. */
875875
status->freq = 0;
876876
status->rate_idx = 0;
877-
status->vht_nss = 0;
878-
status->vht_flag &= ~RX_VHT_FLAG_80MHZ;
879-
status->flag &= ~(RX_FLAG_HT |
880-
RX_FLAG_VHT |
881-
RX_FLAG_SHORT_GI |
882-
RX_FLAG_40MHZ |
883-
RX_FLAG_MACTIME_END);
877+
status->nss = 0;
878+
status->encoding = RX_ENC_LEGACY;
879+
status->bw = RATE_INFO_BW_20;
880+
status->flag &= ~RX_FLAG_MACTIME_END;
884881
status->flag |= RX_FLAG_NO_SIGNAL_VAL;
885882

886883
ath10k_htt_rx_h_signal(ar, status, rxd);
@@ -933,24 +930,23 @@ static void ath10k_process_rx(struct ath10k *ar,
933930
*status = *rx_status;
934931

935932
ath10k_dbg(ar, ATH10K_DBG_DATA,
936-
"rx skb %pK len %u peer %pM %s %s sn %u %s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%llx fcs-err %i mic-err %i amsdu-more %i\n",
933+
"rx skb %pK len %u peer %pM %s %s sn %u %s%s%s%s%s%s %srate_idx %u vht_nss %u freq %u band %u flag 0x%x fcs-err %i mic-err %i amsdu-more %i\n",
937934
skb,
938935
skb->len,
939936
ieee80211_get_SA(hdr),
940937
ath10k_get_tid(hdr, tid, sizeof(tid)),
941938
is_multicast_ether_addr(ieee80211_get_DA(hdr)) ?
942939
"mcast" : "ucast",
943940
(__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4,
944-
(status->flag & (RX_FLAG_HT | RX_FLAG_VHT)) == 0 ?
945-
"legacy" : "",
946-
status->flag & RX_FLAG_HT ? "ht" : "",
947-
status->flag & RX_FLAG_VHT ? "vht" : "",
948-
status->flag & RX_FLAG_40MHZ ? "40" : "",
949-
status->vht_flag & RX_VHT_FLAG_80MHZ ? "80" : "",
950-
status->vht_flag & RX_VHT_FLAG_160MHZ ? "160" : "",
951-
status->flag & RX_FLAG_SHORT_GI ? "sgi " : "",
941+
(status->encoding == RX_ENC_LEGACY) ? "legacy" : "",
942+
(status->encoding == RX_ENC_HT) ? "ht" : "",
943+
(status->encoding == RX_ENC_VHT) ? "vht" : "",
944+
(status->bw == RATE_INFO_BW_40) ? "40" : "",
945+
(status->bw == RATE_INFO_BW_80) ? "80" : "",
946+
(status->bw == RATE_INFO_BW_160) ? "160" : "",
947+
status->enc_flags & RX_ENC_FLAG_SHORT_GI ? "sgi " : "",
952948
status->rate_idx,
953-
status->vht_nss,
949+
status->nss,
954950
status->freq,
955951
status->band, status->flag,
956952
!!(status->flag & RX_FLAG_FAILED_FCS_CRC),

drivers/net/wireless/ath/ath5k/base.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,18 +1414,18 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb,
14141414
rxs->flag |= ath5k_rx_decrypted(ah, skb, rs);
14151415
switch (ah->ah_bwmode) {
14161416
case AR5K_BWMODE_5MHZ:
1417-
rxs->flag |= RX_FLAG_5MHZ;
1417+
rxs->bw = RATE_INFO_BW_5;
14181418
break;
14191419
case AR5K_BWMODE_10MHZ:
1420-
rxs->flag |= RX_FLAG_10MHZ;
1420+
rxs->bw = RATE_INFO_BW_10;
14211421
break;
14221422
default:
14231423
break;
14241424
}
14251425

14261426
if (rs->rs_rate ==
14271427
ah->sbands[ah->curchan->band].bitrates[rxs->rate_idx].hw_value_short)
1428-
rxs->flag |= RX_FLAG_SHORTPRE;
1428+
rxs->enc_flags |= RX_ENC_FLAG_SHORTPRE;
14291429

14301430
trace_ath5k_rx(ah, skb);
14311431

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static void ath6kl_cfg80211_sscan_disable(struct ath6kl_vif *vif)
169169
if (!stopped)
170170
return;
171171

172-
cfg80211_sched_scan_stopped(ar->wiphy);
172+
cfg80211_sched_scan_stopped(ar->wiphy, 0);
173173
}
174174

175175
static int ath6kl_set_wpa_version(struct ath6kl_vif *vif,
@@ -806,9 +806,15 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
806806
WLAN_STATUS_SUCCESS, GFP_KERNEL);
807807
cfg80211_put_bss(ar->wiphy, bss);
808808
} else if (vif->sme_state == SME_CONNECTED) {
809+
struct cfg80211_roam_info roam_info = {
810+
.bss = bss,
811+
.req_ie = assoc_req_ie,
812+
.req_ie_len = assoc_req_len,
813+
.resp_ie = assoc_resp_ie,
814+
.resp_ie_len = assoc_resp_len,
815+
};
809816
/* inform roam event to cfg80211 */
810-
cfg80211_roamed_bss(vif->ndev, bss, assoc_req_ie, assoc_req_len,
811-
assoc_resp_ie, assoc_resp_len, GFP_KERNEL);
817+
cfg80211_roamed(vif->ndev, &roam_info, GFP_KERNEL);
812818
}
813819
}
814820

@@ -3352,7 +3358,7 @@ static int ath6kl_cfg80211_sscan_start(struct wiphy *wiphy,
33523358
}
33533359

33543360
static int ath6kl_cfg80211_sscan_stop(struct wiphy *wiphy,
3355-
struct net_device *dev)
3361+
struct net_device *dev, u64 reqid)
33563362
{
33573363
struct ath6kl_vif *vif = netdev_priv(dev);
33583364
bool stopped;
@@ -3973,7 +3979,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
39733979
WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;
39743980

39753981
if (test_bit(ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2, ar->fw_capabilities))
3976-
ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
3982+
ar->wiphy->max_sched_scan_reqs = 1;
39773983

39783984
if (test_bit(ATH6KL_FW_CAPABILITY_INACTIVITY_TIMEOUT,
39793985
ar->fw_capabilities))

drivers/net/wireless/ath/ath6kl/wmi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,7 @@ void ath6kl_wmi_sscan_timer(unsigned long ptr)
10821082
{
10831083
struct ath6kl_vif *vif = (struct ath6kl_vif *) ptr;
10841084

1085-
cfg80211_sched_scan_results(vif->ar->wiphy);
1085+
cfg80211_sched_scan_results(vif->ar->wiphy, 0);
10861086
}
10871087

10881088
static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len,

drivers/net/wireless/ath/ath9k/ar9003_mac.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,8 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
494494

495495
rxs->rs_status = 0;
496496
rxs->rs_flags = 0;
497-
rxs->flag = 0;
497+
rxs->enc_flags = 0;
498+
rxs->bw = RATE_INFO_BW_20;
498499

499500
rxs->rs_datalen = rxsp->status2 & AR_DataLen;
500501
rxs->rs_tstamp = rxsp->status3;
@@ -520,8 +521,8 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,
520521
rxs->rs_isaggr = (rxsp->status11 & AR_RxAggr) ? 1 : 0;
521522
rxs->rs_moreaggr = (rxsp->status11 & AR_RxMoreAggr) ? 1 : 0;
522523
rxs->rs_antenna = (MS(rxsp->status4, AR_RxAntenna) & 0x7);
523-
rxs->flag |= (rxsp->status4 & AR_GI) ? RX_FLAG_SHORT_GI : 0;
524-
rxs->flag |= (rxsp->status4 & AR_2040) ? RX_FLAG_40MHZ : 0;
524+
rxs->enc_flags |= (rxsp->status4 & AR_GI) ? RX_ENC_FLAG_SHORT_GI : 0;
525+
rxs->enc_flags |= (rxsp->status4 & AR_2040) ? RX_ENC_FLAG_40MHZ : 0;
525526

526527
rxs->evm0 = rxsp->status6;
527528
rxs->evm1 = rxsp->status7;

drivers/net/wireless/ath/ath9k/common.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,15 @@ int ath9k_cmn_process_rate(struct ath_common *common,
181181
sband = hw->wiphy->bands[band];
182182

183183
if (IS_CHAN_QUARTER_RATE(ah->curchan))
184-
rxs->flag |= RX_FLAG_5MHZ;
184+
rxs->bw = RATE_INFO_BW_5;
185185
else if (IS_CHAN_HALF_RATE(ah->curchan))
186-
rxs->flag |= RX_FLAG_10MHZ;
186+
rxs->bw = RATE_INFO_BW_10;
187187

188188
if (rx_stats->rs_rate & 0x80) {
189189
/* HT rate */
190-
rxs->flag |= RX_FLAG_HT;
191-
rxs->flag |= rx_stats->flag;
190+
rxs->encoding = RX_ENC_HT;
191+
rxs->enc_flags |= rx_stats->enc_flags;
192+
rxs->bw = rx_stats->bw;
192193
rxs->rate_idx = rx_stats->rs_rate & 0x7f;
193194
return 0;
194195
}
@@ -199,7 +200,7 @@ int ath9k_cmn_process_rate(struct ath_common *common,
199200
return 0;
200201
}
201202
if (sband->bitrates[i].hw_value_short == rx_stats->rs_rate) {
202-
rxs->flag |= RX_FLAG_SHORTPRE;
203+
rxs->enc_flags |= RX_ENC_FLAG_SHORTPRE;
203204
rxs->rate_idx = i;
204205
return 0;
205206
}

drivers/net/wireless/ath/ath9k/debug_sta.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,12 @@ void ath_debug_rate_stats(struct ath_softc *sc,
116116
if (rxs->rate_idx >= ARRAY_SIZE(rstats->ht_stats))
117117
goto exit;
118118

119-
if (rxs->flag & RX_FLAG_40MHZ)
119+
if ((rxs->bw == RATE_INFO_BW_40))
120120
rstats->ht_stats[rxs->rate_idx].ht40_cnt++;
121121
else
122122
rstats->ht_stats[rxs->rate_idx].ht20_cnt++;
123123

124-
if (rxs->flag & RX_FLAG_SHORT_GI)
124+
if (rxs->enc_flags & RX_ENC_FLAG_SHORT_GI)
125125
rstats->ht_stats[rxs->rate_idx].sgi_cnt++;
126126
else
127127
rstats->ht_stats[rxs->rate_idx].lgi_cnt++;
@@ -130,7 +130,7 @@ void ath_debug_rate_stats(struct ath_softc *sc,
130130
}
131131

132132
if (IS_CCK_RATE(rs->rs_rate)) {
133-
if (rxs->flag & RX_FLAG_SHORTPRE)
133+
if (rxs->enc_flags & RX_ENC_FLAG_SHORTPRE)
134134
rstats->cck_stats[rxs->rate_idx].cck_sp_cnt++;
135135
else
136136
rstats->cck_stats[rxs->rate_idx].cck_lp_cnt++;

drivers/net/wireless/ath/ath9k/htc_drv_txrx.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -929,11 +929,12 @@ void ath9k_host_rx_init(struct ath9k_htc_priv *priv)
929929
static inline void convert_htc_flag(struct ath_rx_status *rx_stats,
930930
struct ath_htc_rx_status *rxstatus)
931931
{
932-
rx_stats->flag = 0;
932+
rx_stats->enc_flags = 0;
933+
rx_stats->bw = RATE_INFO_BW_20;
933934
if (rxstatus->rs_flags & ATH9K_RX_2040)
934-
rx_stats->flag |= RX_FLAG_40MHZ;
935+
rx_stats->bw = RATE_INFO_BW_40;
935936
if (rxstatus->rs_flags & ATH9K_RX_GI)
936-
rx_stats->flag |= RX_FLAG_SHORT_GI;
937+
rx_stats->enc_flags |= RX_ENC_FLAG_SHORT_GI;
937938
}
938939

939940
static void rx_status_htc_to_ath(struct ath_rx_status *rx_stats,

drivers/net/wireless/ath/ath9k/mac.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
535535

536536
rs->rs_status = 0;
537537
rs->rs_flags = 0;
538-
rs->flag = 0;
538+
rs->enc_flags = 0;
539+
rs->bw = RATE_INFO_BW_20;
539540

540541
rs->rs_datalen = ads.ds_rxstatus1 & AR_DataLen;
541542
rs->rs_tstamp = ads.AR_RcvTimestamp;
@@ -577,15 +578,15 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,
577578
rs->rs_antenna = MS(ads.ds_rxstatus3, AR_RxAntenna);
578579

579580
/* directly mapped flags for ieee80211_rx_status */
580-
rs->flag |=
581-
(ads.ds_rxstatus3 & AR_GI) ? RX_FLAG_SHORT_GI : 0;
582-
rs->flag |=
583-
(ads.ds_rxstatus3 & AR_2040) ? RX_FLAG_40MHZ : 0;
581+
rs->enc_flags |=
582+
(ads.ds_rxstatus3 & AR_GI) ? RX_ENC_FLAG_SHORT_GI : 0;
583+
rs->enc_flags |=
584+
(ads.ds_rxstatus3 & AR_2040) ? RX_ENC_FLAG_40MHZ : 0;
584585
if (AR_SREV_9280_20_OR_LATER(ah))
585-
rs->flag |=
586+
rs->enc_flags |=
586587
(ads.ds_rxstatus3 & AR_STBC) ?
587588
/* we can only Nss=1 STBC */
588-
(1 << RX_FLAG_STBC_SHIFT) : 0;
589+
(1 << RX_ENC_FLAG_STBC_SHIFT) : 0;
589590

590591
if (ads.ds_rxstatus8 & AR_PreDelimCRCErr)
591592
rs->rs_flags |= ATH9K_RX_DELIM_CRC_PRE;

drivers/net/wireless/ath/ath9k/mac.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#ifndef MAC_H
1818
#define MAC_H
19+
#include <net/cfg80211.h>
1920

2021
#define set11nTries(_series, _index) \
2122
(SM((_series)[_index].Tries, AR_XmitDataTries##_index))
@@ -143,7 +144,8 @@ struct ath_rx_status {
143144
u32 evm2;
144145
u32 evm3;
145146
u32 evm4;
146-
u32 flag; /* see enum mac80211_rx_flags */
147+
u16 enc_flags;
148+
enum rate_info_bw bw;
147149
};
148150

149151
struct ath_htc_rx_status {

drivers/net/wireless/ath/ath9k/recv.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,11 +1037,11 @@ static void ath_rx_count_airtime(struct ath_softc *sc,
10371037

10381038
rxs = IEEE80211_SKB_RXCB(skb);
10391039

1040-
is_sgi = !!(rxs->flag & RX_FLAG_SHORT_GI);
1041-
is_40 = !!(rxs->flag & RX_FLAG_40MHZ);
1042-
is_sp = !!(rxs->flag & RX_FLAG_SHORTPRE);
1040+
is_sgi = !!(rxs->enc_flags & RX_ENC_FLAG_SHORT_GI);
1041+
is_40 = !!(rxs->bw == RATE_INFO_BW_40);
1042+
is_sp = !!(rxs->enc_flags & RX_ENC_FLAG_SHORTPRE);
10431043

1044-
if (!!(rxs->flag & RX_FLAG_HT)) {
1044+
if (!!(rxs->encoding == RX_ENC_HT)) {
10451045
/* MCS rates */
10461046

10471047
airtime += ath_pkt_duration(sc, rxs->rate_idx, len,

drivers/net/wireless/ath/carl9170/rx.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ static int carl9170_rx_mac_status(struct ar9170 *ar,
358358
switch (mac->status & AR9170_RX_STATUS_MODULATION) {
359359
case AR9170_RX_STATUS_MODULATION_CCK:
360360
if (mac->status & AR9170_RX_STATUS_SHORT_PREAMBLE)
361-
status->flag |= RX_FLAG_SHORTPRE;
361+
status->enc_flags |= RX_ENC_FLAG_SHORTPRE;
362362
switch (head->plcp[0]) {
363363
case AR9170_RX_PHY_RATE_CCK_1M:
364364
status->rate_idx = 0;
@@ -423,12 +423,12 @@ static int carl9170_rx_mac_status(struct ar9170 *ar,
423423

424424
case AR9170_RX_STATUS_MODULATION_HT:
425425
if (head->plcp[3] & 0x80)
426-
status->flag |= RX_FLAG_40MHZ;
426+
status->bw = RATE_INFO_BW_40;
427427
if (head->plcp[6] & 0x80)
428-
status->flag |= RX_FLAG_SHORT_GI;
428+
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
429429

430430
status->rate_idx = clamp(0, 75, head->plcp[3] & 0x7f);
431-
status->flag |= RX_FLAG_HT;
431+
status->encoding = RX_ENC_HT;
432432
break;
433433

434434
default:

drivers/net/wireless/ath/wcn36xx/txrx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
6868
RX_FLAG_MMIC_STRIPPED |
6969
RX_FLAG_DECRYPTED;
7070

71-
wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%llx\n", status.flag);
71+
wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag);
7272

7373
memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status));
7474

drivers/net/wireless/broadcom/b43/xmit.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
694694
if (unlikely(phystat0 & (B43_RX_PHYST0_PLCPHCF | B43_RX_PHYST0_PLCPFV)))
695695
status.flag |= RX_FLAG_FAILED_PLCP_CRC;
696696
if (phystat0 & B43_RX_PHYST0_SHORTPRMBL)
697-
status.flag |= RX_FLAG_SHORTPRE;
697+
status.enc_flags |= RX_ENC_FLAG_SHORTPRE;
698698
if (macstat & B43_RX_MAC_DECERR) {
699699
/* Decryption with the given key failed.
700700
* Drop the packet. We also won't be able to decrypt it with

0 commit comments

Comments
 (0)