Skip to content

Commit

Permalink
Merge tag 'mac80211-next-for-davem-2017-04-28' 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:

====================
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 <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Apr 28, 2017
2 parents 2d2ab65 + b34939b commit cec3819
Show file tree
Hide file tree
Showing 86 changed files with 1,323 additions and 936 deletions.
48 changes: 22 additions & 26 deletions drivers/net/wireless/ath/ath10k/htt_rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,11 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
sgi = (info3 >> 7) & 1;

status->rate_idx = mcs;
status->flag |= RX_FLAG_HT;
status->encoding = RX_ENC_HT;
if (sgi)
status->flag |= RX_FLAG_SHORT_GI;
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;
if (bw)
status->flag |= RX_FLAG_40MHZ;
status->bw = RATE_INFO_BW_40;
break;
case HTT_RX_VHT:
case HTT_RX_VHT_WITH_TXBF:
Expand Down Expand Up @@ -689,29 +689,29 @@ static void ath10k_htt_rx_h_rates(struct ath10k *ar,
}

status->rate_idx = mcs;
status->vht_nss = nss;
status->nss = nss;

if (sgi)
status->flag |= RX_FLAG_SHORT_GI;
status->enc_flags |= RX_ENC_FLAG_SHORT_GI;

switch (bw) {
/* 20MHZ */
case 0:
break;
/* 40MHZ */
case 1:
status->flag |= RX_FLAG_40MHZ;
status->bw = RATE_INFO_BW_40;
break;
/* 80MHZ */
case 2:
status->vht_flag |= RX_VHT_FLAG_80MHZ;
status->bw = RATE_INFO_BW_80;
break;
case 3:
status->vht_flag |= RX_VHT_FLAG_160MHZ;
status->bw = RATE_INFO_BW_160;
break;
}

status->flag |= RX_FLAG_VHT;
status->encoding = RX_ENC_VHT;
break;
default:
break;
Expand Down Expand Up @@ -874,13 +874,10 @@ static void ath10k_htt_rx_h_ppdu(struct ath10k *ar,
/* New PPDU starts so clear out the old per-PPDU status. */
status->freq = 0;
status->rate_idx = 0;
status->vht_nss = 0;
status->vht_flag &= ~RX_VHT_FLAG_80MHZ;
status->flag &= ~(RX_FLAG_HT |
RX_FLAG_VHT |
RX_FLAG_SHORT_GI |
RX_FLAG_40MHZ |
RX_FLAG_MACTIME_END);
status->nss = 0;
status->encoding = RX_ENC_LEGACY;
status->bw = RATE_INFO_BW_20;
status->flag &= ~RX_FLAG_MACTIME_END;
status->flag |= RX_FLAG_NO_SIGNAL_VAL;

ath10k_htt_rx_h_signal(ar, status, rxd);
Expand Down Expand Up @@ -933,24 +930,23 @@ static void ath10k_process_rx(struct ath10k *ar,
*status = *rx_status;

ath10k_dbg(ar, ATH10K_DBG_DATA,
"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",
"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",
skb,
skb->len,
ieee80211_get_SA(hdr),
ath10k_get_tid(hdr, tid, sizeof(tid)),
is_multicast_ether_addr(ieee80211_get_DA(hdr)) ?
"mcast" : "ucast",
(__le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_SEQ) >> 4,
(status->flag & (RX_FLAG_HT | RX_FLAG_VHT)) == 0 ?
"legacy" : "",
status->flag & RX_FLAG_HT ? "ht" : "",
status->flag & RX_FLAG_VHT ? "vht" : "",
status->flag & RX_FLAG_40MHZ ? "40" : "",
status->vht_flag & RX_VHT_FLAG_80MHZ ? "80" : "",
status->vht_flag & RX_VHT_FLAG_160MHZ ? "160" : "",
status->flag & RX_FLAG_SHORT_GI ? "sgi " : "",
(status->encoding == RX_ENC_LEGACY) ? "legacy" : "",
(status->encoding == RX_ENC_HT) ? "ht" : "",
(status->encoding == RX_ENC_VHT) ? "vht" : "",
(status->bw == RATE_INFO_BW_40) ? "40" : "",
(status->bw == RATE_INFO_BW_80) ? "80" : "",
(status->bw == RATE_INFO_BW_160) ? "160" : "",
status->enc_flags & RX_ENC_FLAG_SHORT_GI ? "sgi " : "",
status->rate_idx,
status->vht_nss,
status->nss,
status->freq,
status->band, status->flag,
!!(status->flag & RX_FLAG_FAILED_FCS_CRC),
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath/ath5k/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1414,18 +1414,18 @@ ath5k_receive_frame(struct ath5k_hw *ah, struct sk_buff *skb,
rxs->flag |= ath5k_rx_decrypted(ah, skb, rs);
switch (ah->ah_bwmode) {
case AR5K_BWMODE_5MHZ:
rxs->flag |= RX_FLAG_5MHZ;
rxs->bw = RATE_INFO_BW_5;
break;
case AR5K_BWMODE_10MHZ:
rxs->flag |= RX_FLAG_10MHZ;
rxs->bw = RATE_INFO_BW_10;
break;
default:
break;
}

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

trace_ath5k_rx(ah, skb);

Expand Down
16 changes: 11 additions & 5 deletions drivers/net/wireless/ath/ath6kl/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ static void ath6kl_cfg80211_sscan_disable(struct ath6kl_vif *vif)
if (!stopped)
return;

cfg80211_sched_scan_stopped(ar->wiphy);
cfg80211_sched_scan_stopped(ar->wiphy, 0);
}

static int ath6kl_set_wpa_version(struct ath6kl_vif *vif,
Expand Down Expand Up @@ -806,9 +806,15 @@ void ath6kl_cfg80211_connect_event(struct ath6kl_vif *vif, u16 channel,
WLAN_STATUS_SUCCESS, GFP_KERNEL);
cfg80211_put_bss(ar->wiphy, bss);
} else if (vif->sme_state == SME_CONNECTED) {
struct cfg80211_roam_info roam_info = {
.bss = bss,
.req_ie = assoc_req_ie,
.req_ie_len = assoc_req_len,
.resp_ie = assoc_resp_ie,
.resp_ie_len = assoc_resp_len,
};
/* inform roam event to cfg80211 */
cfg80211_roamed_bss(vif->ndev, bss, assoc_req_ie, assoc_req_len,
assoc_resp_ie, assoc_resp_len, GFP_KERNEL);
cfg80211_roamed(vif->ndev, &roam_info, GFP_KERNEL);
}
}

Expand Down Expand Up @@ -3352,7 +3358,7 @@ static int ath6kl_cfg80211_sscan_start(struct wiphy *wiphy,
}

static int ath6kl_cfg80211_sscan_stop(struct wiphy *wiphy,
struct net_device *dev)
struct net_device *dev, u64 reqid)
{
struct ath6kl_vif *vif = netdev_priv(dev);
bool stopped;
Expand Down Expand Up @@ -3973,7 +3979,7 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD;

if (test_bit(ATH6KL_FW_CAPABILITY_SCHED_SCAN_V2, ar->fw_capabilities))
ar->wiphy->flags |= WIPHY_FLAG_SUPPORTS_SCHED_SCAN;
ar->wiphy->max_sched_scan_reqs = 1;

if (test_bit(ATH6KL_FW_CAPABILITY_INACTIVITY_TIMEOUT,
ar->fw_capabilities))
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/ath6kl/wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ void ath6kl_wmi_sscan_timer(unsigned long ptr)
{
struct ath6kl_vif *vif = (struct ath6kl_vif *) ptr;

cfg80211_sched_scan_results(vif->ar->wiphy);
cfg80211_sched_scan_results(vif->ar->wiphy, 0);
}

static int ath6kl_wmi_bssinfo_event_rx(struct wmi *wmi, u8 *datap, int len,
Expand Down
7 changes: 4 additions & 3 deletions drivers/net/wireless/ath/ath9k/ar9003_mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,8 @@ int ath9k_hw_process_rxdesc_edma(struct ath_hw *ah, struct ath_rx_status *rxs,

rxs->rs_status = 0;
rxs->rs_flags = 0;
rxs->flag = 0;
rxs->enc_flags = 0;
rxs->bw = RATE_INFO_BW_20;

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

rxs->evm0 = rxsp->status6;
rxs->evm1 = rxsp->status7;
Expand Down
11 changes: 6 additions & 5 deletions drivers/net/wireless/ath/ath9k/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,14 +181,15 @@ int ath9k_cmn_process_rate(struct ath_common *common,
sband = hw->wiphy->bands[band];

if (IS_CHAN_QUARTER_RATE(ah->curchan))
rxs->flag |= RX_FLAG_5MHZ;
rxs->bw = RATE_INFO_BW_5;
else if (IS_CHAN_HALF_RATE(ah->curchan))
rxs->flag |= RX_FLAG_10MHZ;
rxs->bw = RATE_INFO_BW_10;

if (rx_stats->rs_rate & 0x80) {
/* HT rate */
rxs->flag |= RX_FLAG_HT;
rxs->flag |= rx_stats->flag;
rxs->encoding = RX_ENC_HT;
rxs->enc_flags |= rx_stats->enc_flags;
rxs->bw = rx_stats->bw;
rxs->rate_idx = rx_stats->rs_rate & 0x7f;
return 0;
}
Expand All @@ -199,7 +200,7 @@ int ath9k_cmn_process_rate(struct ath_common *common,
return 0;
}
if (sband->bitrates[i].hw_value_short == rx_stats->rs_rate) {
rxs->flag |= RX_FLAG_SHORTPRE;
rxs->enc_flags |= RX_ENC_FLAG_SHORTPRE;
rxs->rate_idx = i;
return 0;
}
Expand Down
6 changes: 3 additions & 3 deletions drivers/net/wireless/ath/ath9k/debug_sta.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ void ath_debug_rate_stats(struct ath_softc *sc,
if (rxs->rate_idx >= ARRAY_SIZE(rstats->ht_stats))
goto exit;

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

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

if (IS_CCK_RATE(rs->rs_rate)) {
if (rxs->flag & RX_FLAG_SHORTPRE)
if (rxs->enc_flags & RX_ENC_FLAG_SHORTPRE)
rstats->cck_stats[rxs->rate_idx].cck_sp_cnt++;
else
rstats->cck_stats[rxs->rate_idx].cck_lp_cnt++;
Expand Down
7 changes: 4 additions & 3 deletions drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -929,11 +929,12 @@ void ath9k_host_rx_init(struct ath9k_htc_priv *priv)
static inline void convert_htc_flag(struct ath_rx_status *rx_stats,
struct ath_htc_rx_status *rxstatus)
{
rx_stats->flag = 0;
rx_stats->enc_flags = 0;
rx_stats->bw = RATE_INFO_BW_20;
if (rxstatus->rs_flags & ATH9K_RX_2040)
rx_stats->flag |= RX_FLAG_40MHZ;
rx_stats->bw = RATE_INFO_BW_40;
if (rxstatus->rs_flags & ATH9K_RX_GI)
rx_stats->flag |= RX_FLAG_SHORT_GI;
rx_stats->enc_flags |= RX_ENC_FLAG_SHORT_GI;
}

static void rx_status_htc_to_ath(struct ath_rx_status *rx_stats,
Expand Down
15 changes: 8 additions & 7 deletions drivers/net/wireless/ath/ath9k/mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *ah, struct ath_desc *ds,

rs->rs_status = 0;
rs->rs_flags = 0;
rs->flag = 0;
rs->enc_flags = 0;
rs->bw = RATE_INFO_BW_20;

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

/* directly mapped flags for ieee80211_rx_status */
rs->flag |=
(ads.ds_rxstatus3 & AR_GI) ? RX_FLAG_SHORT_GI : 0;
rs->flag |=
(ads.ds_rxstatus3 & AR_2040) ? RX_FLAG_40MHZ : 0;
rs->enc_flags |=
(ads.ds_rxstatus3 & AR_GI) ? RX_ENC_FLAG_SHORT_GI : 0;
rs->enc_flags |=
(ads.ds_rxstatus3 & AR_2040) ? RX_ENC_FLAG_40MHZ : 0;
if (AR_SREV_9280_20_OR_LATER(ah))
rs->flag |=
rs->enc_flags |=
(ads.ds_rxstatus3 & AR_STBC) ?
/* we can only Nss=1 STBC */
(1 << RX_FLAG_STBC_SHIFT) : 0;
(1 << RX_ENC_FLAG_STBC_SHIFT) : 0;

if (ads.ds_rxstatus8 & AR_PreDelimCRCErr)
rs->rs_flags |= ATH9K_RX_DELIM_CRC_PRE;
Expand Down
4 changes: 3 additions & 1 deletion drivers/net/wireless/ath/ath9k/mac.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

#ifndef MAC_H
#define MAC_H
#include <net/cfg80211.h>

#define set11nTries(_series, _index) \
(SM((_series)[_index].Tries, AR_XmitDataTries##_index))
Expand Down Expand Up @@ -143,7 +144,8 @@ struct ath_rx_status {
u32 evm2;
u32 evm3;
u32 evm4;
u32 flag; /* see enum mac80211_rx_flags */
u16 enc_flags;
enum rate_info_bw bw;
};

struct ath_htc_rx_status {
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/ath/ath9k/recv.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,11 +1037,11 @@ static void ath_rx_count_airtime(struct ath_softc *sc,

rxs = IEEE80211_SKB_RXCB(skb);

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

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

airtime += ath_pkt_duration(sc, rxs->rate_idx, len,
Expand Down
8 changes: 4 additions & 4 deletions drivers/net/wireless/ath/carl9170/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ static int carl9170_rx_mac_status(struct ar9170 *ar,
switch (mac->status & AR9170_RX_STATUS_MODULATION) {
case AR9170_RX_STATUS_MODULATION_CCK:
if (mac->status & AR9170_RX_STATUS_SHORT_PREAMBLE)
status->flag |= RX_FLAG_SHORTPRE;
status->enc_flags |= RX_ENC_FLAG_SHORTPRE;
switch (head->plcp[0]) {
case AR9170_RX_PHY_RATE_CCK_1M:
status->rate_idx = 0;
Expand Down Expand Up @@ -423,12 +423,12 @@ static int carl9170_rx_mac_status(struct ar9170 *ar,

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

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

default:
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/ath/wcn36xx/txrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ int wcn36xx_rx_skb(struct wcn36xx *wcn, struct sk_buff *skb)
RX_FLAG_MMIC_STRIPPED |
RX_FLAG_DECRYPTED;

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

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

Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/broadcom/b43/xmit.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
if (unlikely(phystat0 & (B43_RX_PHYST0_PLCPHCF | B43_RX_PHYST0_PLCPFV)))
status.flag |= RX_FLAG_FAILED_PLCP_CRC;
if (phystat0 & B43_RX_PHYST0_SHORTPRMBL)
status.flag |= RX_FLAG_SHORTPRE;
status.enc_flags |= RX_ENC_FLAG_SHORTPRE;
if (macstat & B43_RX_MAC_DECERR) {
/* Decryption with the given key failed.
* Drop the packet. We also won't be able to decrypt it with
Expand Down
Loading

0 comments on commit cec3819

Please sign in to comment.