Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mac80211: clean up rate encoding bits in RX status

In preparation for adding support for HE rates, clean up
the driver report encoding for rate/bandwidth reporting
on RX frames.

Much of this patch was done with the following spatch:

@@
expression status;
@@
-status->flag & (RX_FLAG_HT | RX_FLAG_VHT)
+status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT)

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_SHORTPRE
+status->enc_flags op RX_ENC_FLAG_SHORTPRE
@@
expression status;
@@
-status->flag & RX_FLAG_SHORTPRE
+status->enc_flags & RX_ENC_FLAG_SHORTPRE

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_HT
+status->enc_flags op RX_ENC_FLAG_HT
@@
expression status;
@@
-status->flag & RX_FLAG_HT
+status->enc_flags & RX_ENC_FLAG_HT

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_40MHZ
+status->enc_flags op RX_ENC_FLAG_40MHZ
@@
expression status;
@@
-status->flag & RX_FLAG_40MHZ
+status->enc_flags & RX_ENC_FLAG_40MHZ

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_SHORT_GI
+status->enc_flags op RX_ENC_FLAG_SHORT_GI
@@
expression status;
@@
-status->flag & RX_FLAG_SHORT_GI
+status->enc_flags & RX_ENC_FLAG_SHORT_GI

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_HT_GF
+status->enc_flags op RX_ENC_FLAG_HT_GF
@@
expression status;
@@
-status->flag & RX_FLAG_HT_GF
+status->enc_flags & RX_ENC_FLAG_HT_GF

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_VHT
+status->enc_flags op RX_ENC_FLAG_VHT
@@
expression status;
@@
-status->flag & RX_FLAG_VHT
+status->enc_flags & RX_ENC_FLAG_VHT

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_STBC_MASK
+status->enc_flags op RX_ENC_FLAG_STBC_MASK
@@
expression status;
@@
-status->flag & RX_FLAG_STBC_MASK
+status->enc_flags & RX_ENC_FLAG_STBC_MASK

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_LDPC
+status->enc_flags op RX_ENC_FLAG_LDPC
@@
expression status;
@@
-status->flag & RX_FLAG_LDPC
+status->enc_flags & RX_ENC_FLAG_LDPC

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_10MHZ
+status->enc_flags op RX_ENC_FLAG_10MHZ
@@
expression status;
@@
-status->flag & RX_FLAG_10MHZ
+status->enc_flags & RX_ENC_FLAG_10MHZ

@@
assignment operator op;
expression status;
@@
-status->flag op RX_FLAG_5MHZ
+status->enc_flags op RX_ENC_FLAG_5MHZ
@@
expression status;
@@
-status->flag & RX_FLAG_5MHZ
+status->enc_flags & RX_ENC_FLAG_5MHZ

@@
assignment operator op;
expression status;
@@
-status->vht_flag op RX_VHT_FLAG_80MHZ
+status->enc_flags op RX_ENC_FLAG_80MHZ
@@
expression status;
@@
-status->vht_flag & RX_VHT_FLAG_80MHZ
+status->enc_flags & RX_ENC_FLAG_80MHZ

@@
assignment operator op;
expression status;
@@
-status->vht_flag op RX_VHT_FLAG_160MHZ
+status->enc_flags op RX_ENC_FLAG_160MHZ
@@
expression status;
@@
-status->vht_flag & RX_VHT_FLAG_160MHZ
+status->enc_flags & RX_ENC_FLAG_160MHZ

@@
assignment operator op;
expression status;
@@
-status->vht_flag op RX_VHT_FLAG_BF
+status->enc_flags op RX_ENC_FLAG_BF
@@
expression status;
@@
-status->vht_flag & RX_VHT_FLAG_BF
+status->enc_flags & RX_ENC_FLAG_BF

@@
assignment operator op;
expression status, STBC;
@@
-status->flag op STBC << RX_FLAG_STBC_SHIFT
+status->enc_flags op STBC << RX_ENC_FLAG_STBC_SHIFT

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_SHORTPRE
+status.enc_flags op RX_ENC_FLAG_SHORTPRE
@@
expression status;
@@
-status.flag & RX_FLAG_SHORTPRE
+status.enc_flags & RX_ENC_FLAG_SHORTPRE

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_HT
+status.enc_flags op RX_ENC_FLAG_HT
@@
expression status;
@@
-status.flag & RX_FLAG_HT
+status.enc_flags & RX_ENC_FLAG_HT

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_40MHZ
+status.enc_flags op RX_ENC_FLAG_40MHZ
@@
expression status;
@@
-status.flag & RX_FLAG_40MHZ
+status.enc_flags & RX_ENC_FLAG_40MHZ

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_SHORT_GI
+status.enc_flags op RX_ENC_FLAG_SHORT_GI
@@
expression status;
@@
-status.flag & RX_FLAG_SHORT_GI
+status.enc_flags & RX_ENC_FLAG_SHORT_GI

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_HT_GF
+status.enc_flags op RX_ENC_FLAG_HT_GF
@@
expression status;
@@
-status.flag & RX_FLAG_HT_GF
+status.enc_flags & RX_ENC_FLAG_HT_GF

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_VHT
+status.enc_flags op RX_ENC_FLAG_VHT
@@
expression status;
@@
-status.flag & RX_FLAG_VHT
+status.enc_flags & RX_ENC_FLAG_VHT

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_STBC_MASK
+status.enc_flags op RX_ENC_FLAG_STBC_MASK
@@
expression status;
@@
-status.flag & RX_FLAG_STBC_MASK
+status.enc_flags & RX_ENC_FLAG_STBC_MASK

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_LDPC
+status.enc_flags op RX_ENC_FLAG_LDPC
@@
expression status;
@@
-status.flag & RX_FLAG_LDPC
+status.enc_flags & RX_ENC_FLAG_LDPC

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_10MHZ
+status.enc_flags op RX_ENC_FLAG_10MHZ
@@
expression status;
@@
-status.flag & RX_FLAG_10MHZ
+status.enc_flags & RX_ENC_FLAG_10MHZ

@@
assignment operator op;
expression status;
@@
-status.flag op RX_FLAG_5MHZ
+status.enc_flags op RX_ENC_FLAG_5MHZ
@@
expression status;
@@
-status.flag & RX_FLAG_5MHZ
+status.enc_flags & RX_ENC_FLAG_5MHZ

@@
assignment operator op;
expression status;
@@
-status.vht_flag op RX_VHT_FLAG_80MHZ
+status.enc_flags op RX_ENC_FLAG_80MHZ
@@
expression status;
@@
-status.vht_flag & RX_VHT_FLAG_80MHZ
+status.enc_flags & RX_ENC_FLAG_80MHZ

@@
assignment operator op;
expression status;
@@
-status.vht_flag op RX_VHT_FLAG_160MHZ
+status.enc_flags op RX_ENC_FLAG_160MHZ
@@
expression status;
@@
-status.vht_flag & RX_VHT_FLAG_160MHZ
+status.enc_flags & RX_ENC_FLAG_160MHZ

@@
assignment operator op;
expression status;
@@
-status.vht_flag op RX_VHT_FLAG_BF
+status.enc_flags op RX_ENC_FLAG_BF
@@
expression status;
@@
-status.vht_flag & RX_VHT_FLAG_BF
+status.enc_flags & RX_ENC_FLAG_BF

@@
assignment operator op;
expression status, STBC;
@@
-status.flag op STBC << RX_FLAG_STBC_SHIFT
+status.enc_flags op STBC << RX_ENC_FLAG_STBC_SHIFT

@@
@@
-RX_FLAG_STBC_SHIFT
+RX_ENC_FLAG_STBC_SHIFT

Signed-off-by: Johannes Berg <johannes.berg@intel.com>

+260 -261
+23 -23
drivers/net/wireless/ath/ath10k/htt_rx.c
··· 632 632 sgi = (info3 >> 7) & 1; 633 633 634 634 status->rate_idx = mcs; 635 - status->flag |= RX_FLAG_HT; 635 + status->enc_flags |= RX_ENC_FLAG_HT; 636 636 if (sgi) 637 - status->flag |= RX_FLAG_SHORT_GI; 637 + status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 638 638 if (bw) 639 - status->flag |= RX_FLAG_40MHZ; 639 + status->enc_flags |= RX_ENC_FLAG_40MHZ; 640 640 break; 641 641 case HTT_RX_VHT: 642 642 case HTT_RX_VHT_WITH_TXBF: ··· 692 692 status->vht_nss = nss; 693 693 694 694 if (sgi) 695 - status->flag |= RX_FLAG_SHORT_GI; 695 + status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 696 696 697 697 switch (bw) { 698 698 /* 20MHZ */ ··· 700 700 break; 701 701 /* 40MHZ */ 702 702 case 1: 703 - status->flag |= RX_FLAG_40MHZ; 703 + status->enc_flags |= RX_ENC_FLAG_40MHZ; 704 704 break; 705 705 /* 80MHZ */ 706 706 case 2: 707 - status->vht_flag |= RX_VHT_FLAG_80MHZ; 707 + status->enc_flags |= RX_ENC_FLAG_80MHZ; 708 708 break; 709 709 case 3: 710 - status->vht_flag |= RX_VHT_FLAG_160MHZ; 710 + status->enc_flags |= RX_ENC_FLAG_160MHZ; 711 711 break; 712 712 } 713 713 714 - status->flag |= RX_FLAG_VHT; 714 + status->enc_flags |= RX_ENC_FLAG_VHT; 715 715 break; 716 716 default: 717 717 break; ··· 875 875 status->freq = 0; 876 876 status->rate_idx = 0; 877 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); 878 + status->enc_flags &= ~(RX_ENC_FLAG_HT | 879 + RX_ENC_FLAG_VHT | 880 + RX_ENC_FLAG_SHORT_GI | 881 + RX_ENC_FLAG_40MHZ | 882 + RX_ENC_FLAG_80MHZ); 883 + status->flag &= ~RX_FLAG_MACTIME_END; 884 884 status->flag |= RX_FLAG_NO_SIGNAL_VAL; 885 885 886 886 ath10k_htt_rx_h_signal(ar, status, rxd); ··· 933 933 *status = *rx_status; 934 934 935 935 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", 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%x fcs-err %i mic-err %i amsdu-more %i\n", 937 937 skb, 938 938 skb->len, 939 939 ieee80211_get_SA(hdr), ··· 941 941 is_multicast_ether_addr(ieee80211_get_DA(hdr)) ? 942 942 "mcast" : "ucast", 943 943 (__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 " : "", 944 + (status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT)) == 0 ? 945 + "legacy" : "", 946 + status->enc_flags & RX_ENC_FLAG_HT ? "ht" : "", 947 + status->enc_flags & RX_ENC_FLAG_VHT ? "vht" : "", 948 + status->enc_flags & RX_ENC_FLAG_40MHZ ? "40" : "", 949 + status->enc_flags & RX_ENC_FLAG_80MHZ ? "80" : "", 950 + status->enc_flags & RX_ENC_FLAG_160MHZ ? "160" : "", 951 + status->enc_flags & RX_ENC_FLAG_SHORT_GI ? "sgi " : "", 952 952 status->rate_idx, 953 953 status->vht_nss, 954 954 status->freq,
+3 -3
drivers/net/wireless/ath/ath5k/base.c
··· 1414 1414 rxs->flag |= ath5k_rx_decrypted(ah, skb, rs); 1415 1415 switch (ah->ah_bwmode) { 1416 1416 case AR5K_BWMODE_5MHZ: 1417 - rxs->flag |= RX_FLAG_5MHZ; 1417 + rxs->enc_flags |= RX_ENC_FLAG_5MHZ; 1418 1418 break; 1419 1419 case AR5K_BWMODE_10MHZ: 1420 - rxs->flag |= RX_FLAG_10MHZ; 1420 + rxs->enc_flags |= RX_ENC_FLAG_10MHZ; 1421 1421 break; 1422 1422 default: 1423 1423 break; ··· 1425 1425 1426 1426 if (rs->rs_rate == 1427 1427 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; 1429 1429 1430 1430 trace_ath5k_rx(ah, skb); 1431 1431
+3 -3
drivers/net/wireless/ath/ath9k/ar9003_mac.c
··· 494 494 495 495 rxs->rs_status = 0; 496 496 rxs->rs_flags = 0; 497 - rxs->flag = 0; 497 + rxs->enc_flags = 0; 498 498 499 499 rxs->rs_datalen = rxsp->status2 & AR_DataLen; 500 500 rxs->rs_tstamp = rxsp->status3; ··· 520 520 rxs->rs_isaggr = (rxsp->status11 & AR_RxAggr) ? 1 : 0; 521 521 rxs->rs_moreaggr = (rxsp->status11 & AR_RxMoreAggr) ? 1 : 0; 522 522 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; 523 + rxs->enc_flags |= (rxsp->status4 & AR_GI) ? RX_ENC_FLAG_SHORT_GI : 0; 524 + rxs->enc_flags |= (rxsp->status4 & AR_2040) ? RX_ENC_FLAG_40MHZ : 0; 525 525 526 526 rxs->evm0 = rxsp->status6; 527 527 rxs->evm1 = rxsp->status7;
+4 -5
drivers/net/wireless/ath/ath9k/common.c
··· 181 181 sband = hw->wiphy->bands[band]; 182 182 183 183 if (IS_CHAN_QUARTER_RATE(ah->curchan)) 184 - rxs->flag |= RX_FLAG_5MHZ; 184 + rxs->enc_flags |= RX_ENC_FLAG_5MHZ; 185 185 else if (IS_CHAN_HALF_RATE(ah->curchan)) 186 - rxs->flag |= RX_FLAG_10MHZ; 186 + rxs->enc_flags |= RX_ENC_FLAG_10MHZ; 187 187 188 188 if (rx_stats->rs_rate & 0x80) { 189 189 /* HT rate */ 190 - rxs->flag |= RX_FLAG_HT; 191 - rxs->flag |= rx_stats->flag; 190 + rxs->enc_flags |= RX_ENC_FLAG_HT | rx_stats->enc_flags; 192 191 rxs->rate_idx = rx_stats->rs_rate & 0x7f; 193 192 return 0; 194 193 } ··· 198 199 return 0; 199 200 } 200 201 if (sband->bitrates[i].hw_value_short == rx_stats->rs_rate) { 201 - rxs->flag |= RX_FLAG_SHORTPRE; 202 + rxs->enc_flags |= RX_ENC_FLAG_SHORTPRE; 202 203 rxs->rate_idx = i; 203 204 return 0; 204 205 }
+3 -3
drivers/net/wireless/ath/ath9k/debug_sta.c
··· 116 116 if (rxs->rate_idx >= ARRAY_SIZE(rstats->ht_stats)) 117 117 goto exit; 118 118 119 - if (rxs->flag & RX_FLAG_40MHZ) 119 + if (rxs->enc_flags & RX_ENC_FLAG_40MHZ) 120 120 rstats->ht_stats[rxs->rate_idx].ht40_cnt++; 121 121 else 122 122 rstats->ht_stats[rxs->rate_idx].ht20_cnt++; 123 123 124 - if (rxs->flag & RX_FLAG_SHORT_GI) 124 + if (rxs->enc_flags & RX_ENC_FLAG_SHORT_GI) 125 125 rstats->ht_stats[rxs->rate_idx].sgi_cnt++; 126 126 else 127 127 rstats->ht_stats[rxs->rate_idx].lgi_cnt++; ··· 130 130 } 131 131 132 132 if (IS_CCK_RATE(rs->rs_rate)) { 133 - if (rxs->flag & RX_FLAG_SHORTPRE) 133 + if (rxs->enc_flags & RX_ENC_FLAG_SHORTPRE) 134 134 rstats->cck_stats[rxs->rate_idx].cck_sp_cnt++; 135 135 else 136 136 rstats->cck_stats[rxs->rate_idx].cck_lp_cnt++;
+3 -3
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
··· 929 929 static inline void convert_htc_flag(struct ath_rx_status *rx_stats, 930 930 struct ath_htc_rx_status *rxstatus) 931 931 { 932 - rx_stats->flag = 0; 932 + rx_stats->enc_flags = 0; 933 933 if (rxstatus->rs_flags & ATH9K_RX_2040) 934 - rx_stats->flag |= RX_FLAG_40MHZ; 934 + rx_stats->enc_flags |= RX_ENC_FLAG_40MHZ; 935 935 if (rxstatus->rs_flags & ATH9K_RX_GI) 936 - rx_stats->flag |= RX_FLAG_SHORT_GI; 936 + rx_stats->enc_flags |= RX_ENC_FLAG_SHORT_GI; 937 937 } 938 938 939 939 static void rx_status_htc_to_ath(struct ath_rx_status *rx_stats,
+7 -7
drivers/net/wireless/ath/ath9k/mac.c
··· 535 535 536 536 rs->rs_status = 0; 537 537 rs->rs_flags = 0; 538 - rs->flag = 0; 538 + rs->enc_flags = 0; 539 539 540 540 rs->rs_datalen = ads.ds_rxstatus1 & AR_DataLen; 541 541 rs->rs_tstamp = ads.AR_RcvTimestamp; ··· 577 577 rs->rs_antenna = MS(ads.ds_rxstatus3, AR_RxAntenna); 578 578 579 579 /* 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; 580 + rs->enc_flags |= 581 + (ads.ds_rxstatus3 & AR_GI) ? RX_ENC_FLAG_SHORT_GI : 0; 582 + rs->enc_flags |= 583 + (ads.ds_rxstatus3 & AR_2040) ? RX_ENC_FLAG_40MHZ : 0; 584 584 if (AR_SREV_9280_20_OR_LATER(ah)) 585 - rs->flag |= 585 + rs->enc_flags |= 586 586 (ads.ds_rxstatus3 & AR_STBC) ? 587 587 /* we can only Nss=1 STBC */ 588 - (1 << RX_FLAG_STBC_SHIFT) : 0; 588 + (1 << RX_ENC_FLAG_STBC_SHIFT) : 0; 589 589 590 590 if (ads.ds_rxstatus8 & AR_PreDelimCRCErr) 591 591 rs->rs_flags |= ATH9K_RX_DELIM_CRC_PRE;
+1 -1
drivers/net/wireless/ath/ath9k/mac.h
··· 143 143 u32 evm2; 144 144 u32 evm3; 145 145 u32 evm4; 146 - u32 flag; /* see enum mac80211_rx_flags */ 146 + u16 enc_flags; 147 147 }; 148 148 149 149 struct ath_htc_rx_status {
+4 -4
drivers/net/wireless/ath/ath9k/recv.c
··· 1037 1037 1038 1038 rxs = IEEE80211_SKB_RXCB(skb); 1039 1039 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->enc_flags & RX_ENC_FLAG_40MHZ); 1042 + is_sp = !!(rxs->enc_flags & RX_ENC_FLAG_SHORTPRE); 1043 1043 1044 - if (!!(rxs->flag & RX_FLAG_HT)) { 1044 + if (!!(rxs->enc_flags & RX_ENC_FLAG_HT)) { 1045 1045 /* MCS rates */ 1046 1046 1047 1047 airtime += ath_pkt_duration(sc, rxs->rate_idx, len,
+4 -4
drivers/net/wireless/ath/carl9170/rx.c
··· 358 358 switch (mac->status & AR9170_RX_STATUS_MODULATION) { 359 359 case AR9170_RX_STATUS_MODULATION_CCK: 360 360 if (mac->status & AR9170_RX_STATUS_SHORT_PREAMBLE) 361 - status->flag |= RX_FLAG_SHORTPRE; 361 + status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 362 362 switch (head->plcp[0]) { 363 363 case AR9170_RX_PHY_RATE_CCK_1M: 364 364 status->rate_idx = 0; ··· 423 423 424 424 case AR9170_RX_STATUS_MODULATION_HT: 425 425 if (head->plcp[3] & 0x80) 426 - status->flag |= RX_FLAG_40MHZ; 426 + status->enc_flags |= RX_ENC_FLAG_40MHZ; 427 427 if (head->plcp[6] & 0x80) 428 - status->flag |= RX_FLAG_SHORT_GI; 428 + status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 429 429 430 430 status->rate_idx = clamp(0, 75, head->plcp[3] & 0x7f); 431 - status->flag |= RX_FLAG_HT; 431 + status->enc_flags |= RX_ENC_FLAG_HT; 432 432 break; 433 433 434 434 default:
+1 -1
drivers/net/wireless/ath/wcn36xx/txrx.c
··· 68 68 RX_FLAG_MMIC_STRIPPED | 69 69 RX_FLAG_DECRYPTED; 70 70 71 - wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%llx\n", status.flag); 71 + wcn36xx_dbg(WCN36XX_DBG_RX, "status.flags=%x\n", status.flag); 72 72 73 73 memcpy(IEEE80211_SKB_RXCB(skb), &status, sizeof(status)); 74 74
+1 -1
drivers/net/wireless/broadcom/b43/xmit.c
··· 694 694 if (unlikely(phystat0 & (B43_RX_PHYST0_PLCPHCF | B43_RX_PHYST0_PLCPFV))) 695 695 status.flag |= RX_FLAG_FAILED_PLCP_CRC; 696 696 if (phystat0 & B43_RX_PHYST0_SHORTPRMBL) 697 - status.flag |= RX_FLAG_SHORTPRE; 697 + status.enc_flags |= RX_ENC_FLAG_SHORTPRE; 698 698 if (macstat & B43_RX_MAC_DECERR) { 699 699 /* Decryption with the given key failed. 700 700 * Drop the packet. We also won't be able to decrypt it with
+5 -5
drivers/net/wireless/broadcom/brcm80211/brcmsmac/main.c
··· 7092 7092 rspec = brcms_c_compute_rspec(rxh, plcp); 7093 7093 if (is_mcs_rate(rspec)) { 7094 7094 rx_status->rate_idx = rspec & RSPEC_RATE_MASK; 7095 - rx_status->flag |= RX_FLAG_HT; 7095 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 7096 7096 if (rspec_is40mhz(rspec)) 7097 - rx_status->flag |= RX_FLAG_40MHZ; 7097 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 7098 7098 } else { 7099 7099 switch (rspec2rate(rspec)) { 7100 7100 case BRCM_RATE_1M: ··· 7149 7149 /* Determine short preamble and rate_idx */ 7150 7150 if (is_cck_rate(rspec)) { 7151 7151 if (rxh->PhyRxStatus_0 & PRXS0_SHORTH) 7152 - rx_status->flag |= RX_FLAG_SHORTPRE; 7152 + rx_status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 7153 7153 } else if (is_ofdm_rate(rspec)) { 7154 - rx_status->flag |= RX_FLAG_SHORTPRE; 7154 + rx_status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 7155 7155 } else { 7156 7156 brcms_err(wlc->hw->d11core, "%s: Unknown modulation\n", 7157 7157 __func__); ··· 7159 7159 } 7160 7160 7161 7161 if (plcp3_issgi(plcp[3])) 7162 - rx_status->flag |= RX_FLAG_SHORT_GI; 7162 + rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 7163 7163 7164 7164 if (rxh->RxStatus1 & RXS_DECERR) { 7165 7165 rx_status->flag |= RX_FLAG_FAILED_PLCP_CRC;
+1 -1
drivers/net/wireless/intel/iwlegacy/3945.c
··· 570 570 571 571 /* set the preamble flag if appropriate */ 572 572 if (rx_hdr->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) 573 - rx_status.flag |= RX_FLAG_SHORTPRE; 573 + rx_status.enc_flags |= RX_ENC_FLAG_SHORTPRE; 574 574 575 575 if ((unlikely(rx_stats->phy_count > 20))) { 576 576 D_DROP("dsp size out of range [0,20]: %d\n",
+4 -4
drivers/net/wireless/intel/iwlegacy/4965-mac.c
··· 728 728 729 729 /* set the preamble flag if appropriate */ 730 730 if (phy_res->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) 731 - rx_status.flag |= RX_FLAG_SHORTPRE; 731 + rx_status.enc_flags |= RX_ENC_FLAG_SHORTPRE; 732 732 733 733 /* Set up the HT phy flags */ 734 734 if (rate_n_flags & RATE_MCS_HT_MSK) 735 - rx_status.flag |= RX_FLAG_HT; 735 + rx_status.enc_flags |= RX_ENC_FLAG_HT; 736 736 if (rate_n_flags & RATE_MCS_HT40_MSK) 737 - rx_status.flag |= RX_FLAG_40MHZ; 737 + rx_status.enc_flags |= RX_ENC_FLAG_40MHZ; 738 738 if (rate_n_flags & RATE_MCS_SGI_MSK) 739 - rx_status.flag |= RX_FLAG_SHORT_GI; 739 + rx_status.enc_flags |= RX_ENC_FLAG_SHORT_GI; 740 740 741 741 if (phy_res->phy_flags & RX_RES_PHY_FLAGS_AGG_MSK) { 742 742 /* We know which subframes of an A-MPDU belong
+5 -5
drivers/net/wireless/intel/iwlwifi/dvm/rx.c
··· 873 873 874 874 /* set the preamble flag if appropriate */ 875 875 if (phy_res->phy_flags & RX_RES_PHY_FLAGS_SHORT_PREAMBLE_MSK) 876 - rx_status.flag |= RX_FLAG_SHORTPRE; 876 + rx_status.enc_flags |= RX_ENC_FLAG_SHORTPRE; 877 877 878 878 if (phy_res->phy_flags & RX_RES_PHY_FLAGS_AGG_MSK) { 879 879 /* ··· 887 887 888 888 /* Set up the HT phy flags */ 889 889 if (rate_n_flags & RATE_MCS_HT_MSK) 890 - rx_status.flag |= RX_FLAG_HT; 890 + rx_status.enc_flags |= RX_ENC_FLAG_HT; 891 891 if (rate_n_flags & RATE_MCS_HT40_MSK) 892 - rx_status.flag |= RX_FLAG_40MHZ; 892 + rx_status.enc_flags |= RX_ENC_FLAG_40MHZ; 893 893 if (rate_n_flags & RATE_MCS_SGI_MSK) 894 - rx_status.flag |= RX_FLAG_SHORT_GI; 894 + rx_status.enc_flags |= RX_ENC_FLAG_SHORT_GI; 895 895 if (rate_n_flags & RATE_MCS_GF_MSK) 896 - rx_status.flag |= RX_FLAG_HT_GF; 896 + rx_status.enc_flags |= RX_ENC_FLAG_HT_GF; 897 897 898 898 iwlagn_pass_packet_to_mac80211(priv, header, len, ampdu_status, 899 899 rxb, &rx_status);
+12 -12
drivers/net/wireless/intel/iwlwifi/mvm/rx.c
··· 410 410 411 411 /* set the preamble flag if appropriate */ 412 412 if (phy_info->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_SHORT_PREAMBLE)) 413 - rx_status->flag |= RX_FLAG_SHORTPRE; 413 + rx_status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 414 414 415 415 if (phy_info->phy_flags & cpu_to_le16(RX_RES_PHY_FLAGS_AGG)) { 416 416 /* ··· 427 427 case RATE_MCS_CHAN_WIDTH_20: 428 428 break; 429 429 case RATE_MCS_CHAN_WIDTH_40: 430 - rx_status->flag |= RX_FLAG_40MHZ; 430 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 431 431 break; 432 432 case RATE_MCS_CHAN_WIDTH_80: 433 - rx_status->vht_flag |= RX_VHT_FLAG_80MHZ; 433 + rx_status->enc_flags |= RX_ENC_FLAG_80MHZ; 434 434 break; 435 435 case RATE_MCS_CHAN_WIDTH_160: 436 - rx_status->vht_flag |= RX_VHT_FLAG_160MHZ; 436 + rx_status->enc_flags |= RX_ENC_FLAG_160MHZ; 437 437 break; 438 438 } 439 439 if (rate_n_flags & RATE_MCS_SGI_MSK) 440 - rx_status->flag |= RX_FLAG_SHORT_GI; 440 + rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 441 441 if (rate_n_flags & RATE_HT_MCS_GF_MSK) 442 - rx_status->flag |= RX_FLAG_HT_GF; 442 + rx_status->enc_flags |= RX_ENC_FLAG_HT_GF; 443 443 if (rate_n_flags & RATE_MCS_LDPC_MSK) 444 - rx_status->flag |= RX_FLAG_LDPC; 444 + rx_status->enc_flags |= RX_ENC_FLAG_LDPC; 445 445 if (rate_n_flags & RATE_MCS_HT_MSK) { 446 446 u8 stbc = (rate_n_flags & RATE_MCS_HT_STBC_MSK) >> 447 447 RATE_MCS_STBC_POS; 448 - rx_status->flag |= RX_FLAG_HT; 448 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 449 449 rx_status->rate_idx = rate_n_flags & RATE_HT_MCS_INDEX_MSK; 450 - rx_status->flag |= stbc << RX_FLAG_STBC_SHIFT; 450 + rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT; 451 451 } else if (rate_n_flags & RATE_MCS_VHT_MSK) { 452 452 u8 stbc = (rate_n_flags & RATE_MCS_VHT_STBC_MSK) >> 453 453 RATE_MCS_STBC_POS; ··· 455 455 ((rate_n_flags & RATE_VHT_MCS_NSS_MSK) >> 456 456 RATE_VHT_MCS_NSS_POS) + 1; 457 457 rx_status->rate_idx = rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK; 458 - rx_status->flag |= RX_FLAG_VHT; 459 - rx_status->flag |= stbc << RX_FLAG_STBC_SHIFT; 458 + rx_status->enc_flags |= RX_ENC_FLAG_VHT; 459 + rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT; 460 460 if (rate_n_flags & RATE_MCS_BF_MSK) 461 - rx_status->vht_flag |= RX_VHT_FLAG_BF; 461 + rx_status->enc_flags |= RX_ENC_FLAG_BF; 462 462 } else { 463 463 int rate = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags, 464 464 rx_status->band);
+12 -12
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c
··· 824 824 } 825 825 /* set the preamble flag if appropriate */ 826 826 if (phy_info & IWL_RX_MPDU_PHY_SHORT_PREAMBLE) 827 - rx_status->flag |= RX_FLAG_SHORTPRE; 827 + rx_status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 828 828 829 829 if (likely(!(phy_info & IWL_RX_MPDU_PHY_TSF_OVERLOAD))) { 830 830 rx_status->mactime = le64_to_cpu(desc->tsf_on_air_rise); ··· 958 958 case RATE_MCS_CHAN_WIDTH_20: 959 959 break; 960 960 case RATE_MCS_CHAN_WIDTH_40: 961 - rx_status->flag |= RX_FLAG_40MHZ; 961 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 962 962 break; 963 963 case RATE_MCS_CHAN_WIDTH_80: 964 - rx_status->vht_flag |= RX_VHT_FLAG_80MHZ; 964 + rx_status->enc_flags |= RX_ENC_FLAG_80MHZ; 965 965 break; 966 966 case RATE_MCS_CHAN_WIDTH_160: 967 - rx_status->vht_flag |= RX_VHT_FLAG_160MHZ; 967 + rx_status->enc_flags |= RX_ENC_FLAG_160MHZ; 968 968 break; 969 969 } 970 970 if (rate_n_flags & RATE_MCS_SGI_MSK) 971 - rx_status->flag |= RX_FLAG_SHORT_GI; 971 + rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 972 972 if (rate_n_flags & RATE_HT_MCS_GF_MSK) 973 - rx_status->flag |= RX_FLAG_HT_GF; 973 + rx_status->enc_flags |= RX_ENC_FLAG_HT_GF; 974 974 if (rate_n_flags & RATE_MCS_LDPC_MSK) 975 - rx_status->flag |= RX_FLAG_LDPC; 975 + rx_status->enc_flags |= RX_ENC_FLAG_LDPC; 976 976 if (rate_n_flags & RATE_MCS_HT_MSK) { 977 977 u8 stbc = (rate_n_flags & RATE_MCS_HT_STBC_MSK) >> 978 978 RATE_MCS_STBC_POS; 979 - rx_status->flag |= RX_FLAG_HT; 979 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 980 980 rx_status->rate_idx = rate_n_flags & RATE_HT_MCS_INDEX_MSK; 981 - rx_status->flag |= stbc << RX_FLAG_STBC_SHIFT; 981 + rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT; 982 982 } else if (rate_n_flags & RATE_MCS_VHT_MSK) { 983 983 u8 stbc = (rate_n_flags & RATE_MCS_VHT_STBC_MSK) >> 984 984 RATE_MCS_STBC_POS; ··· 986 986 ((rate_n_flags & RATE_VHT_MCS_NSS_MSK) >> 987 987 RATE_VHT_MCS_NSS_POS) + 1; 988 988 rx_status->rate_idx = rate_n_flags & RATE_VHT_MCS_RATE_CODE_MSK; 989 - rx_status->flag |= RX_FLAG_VHT; 990 - rx_status->flag |= stbc << RX_FLAG_STBC_SHIFT; 989 + rx_status->enc_flags |= RX_ENC_FLAG_VHT; 990 + rx_status->enc_flags |= stbc << RX_ENC_FLAG_STBC_SHIFT; 991 991 if (rate_n_flags & RATE_MCS_BF_MSK) 992 - rx_status->vht_flag |= RX_VHT_FLAG_BF; 992 + rx_status->enc_flags |= RX_ENC_FLAG_BF; 993 993 } else { 994 994 int rate = iwl_mvm_legacy_rate_to_mac80211_idx(rate_n_flags, 995 995 rx_status->band);
+1 -1
drivers/net/wireless/intersil/p54/txrx.c
··· 352 352 353 353 rx_status->signal = p54_rssi_to_dbm(priv, hdr->rssi); 354 354 if (hdr->rate & 0x10) 355 - rx_status->flag |= RX_FLAG_SHORTPRE; 355 + rx_status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 356 356 if (priv->hw->conf.chandef.chan->band == NL80211_BAND_5GHZ) 357 357 rx_status->rate_idx = (rate < 4) ? 0 : rate - 4; 358 358 else
+4 -4
drivers/net/wireless/mac80211_hwsim.c
··· 1194 1194 ieee80211_rate_get_vht_mcs(&info->control.rates[0]); 1195 1195 rx_status.vht_nss = 1196 1196 ieee80211_rate_get_vht_nss(&info->control.rates[0]); 1197 - rx_status.flag |= RX_FLAG_VHT; 1197 + rx_status.enc_flags |= RX_ENC_FLAG_VHT; 1198 1198 } else { 1199 1199 rx_status.rate_idx = info->control.rates[0].idx; 1200 1200 if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS) 1201 - rx_status.flag |= RX_FLAG_HT; 1201 + rx_status.enc_flags |= RX_ENC_FLAG_HT; 1202 1202 } 1203 1203 if (info->control.rates[0].flags & IEEE80211_TX_RC_40_MHZ_WIDTH) 1204 - rx_status.flag |= RX_FLAG_40MHZ; 1204 + rx_status.enc_flags |= RX_ENC_FLAG_40MHZ; 1205 1205 if (info->control.rates[0].flags & IEEE80211_TX_RC_SHORT_GI) 1206 - rx_status.flag |= RX_FLAG_SHORT_GI; 1206 + rx_status.enc_flags |= RX_ENC_FLAG_SHORT_GI; 1207 1207 /* TODO: simulate real signal strength (and optional packet loss) */ 1208 1208 rx_status.signal = -50; 1209 1209 if (info->control.vif)
+8 -8
drivers/net/wireless/marvell/mwl8k.c
··· 994 994 *noise = -rxd->noise_floor; 995 995 996 996 if (rxd->rate & MWL8K_AP_RATE_INFO_MCS_FORMAT) { 997 - status->flag |= RX_FLAG_HT; 997 + status->enc_flags |= RX_ENC_FLAG_HT; 998 998 if (rxd->rate & MWL8K_AP_RATE_INFO_40MHZ) 999 - status->flag |= RX_FLAG_40MHZ; 999 + status->enc_flags |= RX_ENC_FLAG_40MHZ; 1000 1000 status->rate_idx = MWL8K_AP_RATE_INFO_RATEID(rxd->rate); 1001 1001 } else { 1002 1002 int i; ··· 1011 1011 1012 1012 if (rxd->channel > 14) { 1013 1013 status->band = NL80211_BAND_5GHZ; 1014 - if (!(status->flag & RX_FLAG_HT)) 1014 + if (!(status->enc_flags & RX_ENC_FLAG_HT)) 1015 1015 status->rate_idx -= 5; 1016 1016 } else { 1017 1017 status->band = NL80211_BAND_2GHZ; ··· 1109 1109 status->rate_idx = MWL8K_STA_RATE_INFO_RATEID(rate_info); 1110 1110 1111 1111 if (rate_info & MWL8K_STA_RATE_INFO_SHORTPRE) 1112 - status->flag |= RX_FLAG_SHORTPRE; 1112 + status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 1113 1113 if (rate_info & MWL8K_STA_RATE_INFO_40MHZ) 1114 - status->flag |= RX_FLAG_40MHZ; 1114 + status->enc_flags |= RX_ENC_FLAG_40MHZ; 1115 1115 if (rate_info & MWL8K_STA_RATE_INFO_SHORTGI) 1116 - status->flag |= RX_FLAG_SHORT_GI; 1116 + status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 1117 1117 if (rate_info & MWL8K_STA_RATE_INFO_MCS_FORMAT) 1118 - status->flag |= RX_FLAG_HT; 1118 + status->enc_flags |= RX_ENC_FLAG_HT; 1119 1119 1120 1120 if (rxd->channel > 14) { 1121 1121 status->band = NL80211_BAND_5GHZ; 1122 - if (!(status->flag & RX_FLAG_HT)) 1122 + if (!(status->enc_flags & RX_ENC_FLAG_HT)) 1123 1123 status->rate_idx -= 5; 1124 1124 } else { 1125 1125 status->band = NL80211_BAND_2GHZ;
+6 -6
drivers/net/wireless/mediatek/mt7601u/mac.c
··· 401 401 case MT_PHY_TYPE_CCK: 402 402 if (idx >= 8) { 403 403 idx -= 8; 404 - status->flag |= RX_FLAG_SHORTPRE; 404 + status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 405 405 } 406 406 407 407 if (WARN_ON(idx >= 4)) ··· 410 410 status->rate_idx = idx; 411 411 return; 412 412 case MT_PHY_TYPE_HT_GF: 413 - status->flag |= RX_FLAG_HT_GF; 413 + status->enc_flags |= RX_ENC_FLAG_HT_GF; 414 414 /* fall through */ 415 415 case MT_PHY_TYPE_HT: 416 - status->flag |= RX_FLAG_HT; 416 + status->enc_flags |= RX_ENC_FLAG_HT; 417 417 status->rate_idx = idx; 418 418 break; 419 419 default: ··· 422 422 } 423 423 424 424 if (rate & MT_RXWI_RATE_SGI) 425 - status->flag |= RX_FLAG_SHORT_GI; 425 + status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 426 426 427 427 if (rate & MT_RXWI_RATE_STBC) 428 - status->flag |= 1 << RX_FLAG_STBC_SHIFT; 428 + status->enc_flags |= 1 << RX_ENC_FLAG_STBC_SHIFT; 429 429 430 430 if (rate & MT_RXWI_RATE_BW) 431 - status->flag |= RX_FLAG_40MHZ; 431 + status->enc_flags |= RX_ENC_FLAG_40MHZ; 432 432 } 433 433 434 434 static void
+2 -2
drivers/net/wireless/ralink/rt2x00/rt2800lib.c
··· 889 889 rt2x00_desc_read(rxwi, 1, &word); 890 890 891 891 if (rt2x00_get_field32(word, RXWI_W1_SHORT_GI)) 892 - rxdesc->flags |= RX_FLAG_SHORT_GI; 892 + rxdesc->enc_flags |= RX_ENC_FLAG_SHORT_GI; 893 893 894 894 if (rt2x00_get_field32(word, RXWI_W1_BW)) 895 - rxdesc->flags |= RX_FLAG_40MHZ; 895 + rxdesc->enc_flags |= RX_ENC_FLAG_40MHZ; 896 896 897 897 /* 898 898 * Detect RX rate, always use MCS as signal type.
+2 -1
drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
··· 825 825 rate_idx = rt2x00lib_rxdone_read_signal(rt2x00dev, &rxdesc); 826 826 if (rxdesc.rate_mode == RATE_MODE_HT_MIX || 827 827 rxdesc.rate_mode == RATE_MODE_HT_GREENFIELD) 828 - rxdesc.flags |= RX_FLAG_HT; 828 + rxdesc.enc_flags |= RX_ENC_FLAG_HT; 829 829 830 830 /* 831 831 * Check if this is a beacon, and more frames have been ··· 865 865 rx_status->rate_idx = rate_idx; 866 866 rx_status->signal = rxdesc.rssi; 867 867 rx_status->flag = rxdesc.flags; 868 + rx_status->enc_flags = rxdesc.enc_flags; 868 869 rx_status->antenna = rt2x00dev->link.ant.active.rx; 869 870 870 871 ieee80211_rx_ni(rt2x00dev->hw, entry->skb);
+1
drivers/net/wireless/ralink/rt2x00/rt2x00queue.h
··· 184 184 int flags; 185 185 int dev_flags; 186 186 u16 rate_mode; 187 + u16 enc_flags; 187 188 u8 cipher; 188 189 u8 cipher_status; 189 190
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8180/dev.c
··· 315 315 rx_status.mactime = tsft; 316 316 rx_status.flag |= RX_FLAG_MACTIME_START; 317 317 if (flags & RTL818X_RX_DESC_FLAG_SPLCP) 318 - rx_status.flag |= RX_FLAG_SHORTPRE; 318 + rx_status.enc_flags |= RX_ENC_FLAG_SHORTPRE; 319 319 if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR) 320 320 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; 321 321
+1 -1
drivers/net/wireless/realtek/rtl818x/rtl8187/dev.c
··· 389 389 rx_status.band = dev->conf.chandef.chan->band; 390 390 rx_status.flag |= RX_FLAG_MACTIME_START; 391 391 if (flags & RTL818X_RX_DESC_FLAG_SPLCP) 392 - rx_status.flag |= RX_FLAG_SHORTPRE; 392 + rx_status.enc_flags |= RX_ENC_FLAG_SHORTPRE; 393 393 if (flags & RTL818X_RX_DESC_FLAG_CRC32_ERR) 394 394 rx_status.flag |= RX_FLAG_FAILED_FCS_CRC; 395 395 memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
+5 -5
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
··· 5041 5041 u32 rxmcs) 5042 5042 { 5043 5043 if (phy_stats->sgi_en) 5044 - rx_status->flag |= RX_FLAG_SHORT_GI; 5044 + rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 5045 5045 5046 5046 if (rxmcs < DESC_RATE_6M) { 5047 5047 /* ··· 5267 5267 if (rx_desc->crc32) 5268 5268 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 5269 5269 if (rx_desc->bw) 5270 - rx_status->flag |= RX_FLAG_40MHZ; 5270 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 5271 5271 5272 5272 if (rx_desc->rxht) { 5273 - rx_status->flag |= RX_FLAG_HT; 5273 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 5274 5274 rx_status->rate_idx = rx_desc->rxmcs - DESC_RATE_MCS0; 5275 5275 } else { 5276 5276 rx_status->rate_idx = rx_desc->rxmcs; ··· 5337 5337 if (rx_desc->crc32) 5338 5338 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 5339 5339 if (rx_desc->bw) 5340 - rx_status->flag |= RX_FLAG_40MHZ; 5340 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 5341 5341 5342 5342 if (rx_desc->rxmcs >= DESC_RATE_MCS0) { 5343 - rx_status->flag |= RX_FLAG_HT; 5343 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 5344 5344 rx_status->rate_idx = rx_desc->rxmcs - DESC_RATE_MCS0; 5345 5345 } else { 5346 5346 rx_status->rate_idx = rx_desc->rxmcs;
+2 -2
drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c
··· 444 444 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 445 445 446 446 if (status->rx_is40Mhzpacket) 447 - rx_status->flag |= RX_FLAG_40MHZ; 447 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 448 448 449 449 if (status->is_ht) 450 - rx_status->flag |= RX_FLAG_HT; 450 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 451 451 452 452 rx_status->flag |= RX_FLAG_MACTIME_START; 453 453
+2 -2
drivers/net/wireless/realtek/rtlwifi/rtl8192ce/trx.c
··· 369 369 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 370 370 371 371 if (stats->rx_is40Mhzpacket) 372 - rx_status->flag |= RX_FLAG_40MHZ; 372 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 373 373 374 374 if (stats->is_ht) 375 - rx_status->flag |= RX_FLAG_HT; 375 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 376 376 377 377 rx_status->flag |= RX_FLAG_MACTIME_START; 378 378
+4 -4
drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c
··· 329 329 if (!GET_RX_DESC_SWDEC(pdesc)) 330 330 rx_status->flag |= RX_FLAG_DECRYPTED; 331 331 if (GET_RX_DESC_BW(pdesc)) 332 - rx_status->flag |= RX_FLAG_40MHZ; 332 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 333 333 if (GET_RX_DESC_RX_HT(pdesc)) 334 - rx_status->flag |= RX_FLAG_HT; 334 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 335 335 rx_status->flag |= RX_FLAG_MACTIME_START; 336 336 if (stats->decrypted) 337 337 rx_status->flag |= RX_FLAG_DECRYPTED; ··· 398 398 if (!GET_RX_DESC_SWDEC(rxdesc)) 399 399 rx_status->flag |= RX_FLAG_DECRYPTED; 400 400 if (GET_RX_DESC_BW(rxdesc)) 401 - rx_status->flag |= RX_FLAG_40MHZ; 401 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 402 402 if (GET_RX_DESC_RX_HT(rxdesc)) 403 - rx_status->flag |= RX_FLAG_HT; 403 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 404 404 /* Data rate */ 405 405 rx_status->rate_idx = rtlwifi_rate_mapping(hw, stats.is_ht, 406 406 false, stats.rate);
+2 -2
drivers/net/wireless/realtek/rtlwifi/rtl8192de/trx.c
··· 503 503 if (!GET_RX_DESC_SWDEC(pdesc)) 504 504 rx_status->flag |= RX_FLAG_DECRYPTED; 505 505 if (GET_RX_DESC_BW(pdesc)) 506 - rx_status->flag |= RX_FLAG_40MHZ; 506 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 507 507 if (GET_RX_DESC_RXHT(pdesc)) 508 - rx_status->flag |= RX_FLAG_HT; 508 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 509 509 rx_status->flag |= RX_FLAG_MACTIME_START; 510 510 if (stats->decrypted) 511 511 rx_status->flag |= RX_FLAG_DECRYPTED;
+2 -2
drivers/net/wireless/realtek/rtlwifi/rtl8192ee/trx.c
··· 394 394 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 395 395 396 396 if (status->rx_is40Mhzpacket) 397 - rx_status->flag |= RX_FLAG_40MHZ; 397 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 398 398 399 399 if (status->is_ht) 400 - rx_status->flag |= RX_FLAG_HT; 400 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 401 401 402 402 rx_status->flag |= RX_FLAG_MACTIME_START; 403 403
+2 -2
drivers/net/wireless/realtek/rtlwifi/rtl8192se/trx.c
··· 289 289 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 290 290 291 291 if (stats->rx_is40Mhzpacket) 292 - rx_status->flag |= RX_FLAG_40MHZ; 292 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 293 293 294 294 if (stats->is_ht) 295 - rx_status->flag |= RX_FLAG_HT; 295 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 296 296 297 297 rx_status->flag |= RX_FLAG_MACTIME_START; 298 298
+2 -2
drivers/net/wireless/realtek/rtlwifi/rtl8723ae/trx.c
··· 317 317 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 318 318 319 319 if (status->rx_is40Mhzpacket) 320 - rx_status->flag |= RX_FLAG_40MHZ; 320 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 321 321 322 322 if (status->is_ht) 323 - rx_status->flag |= RX_FLAG_HT; 323 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 324 324 325 325 rx_status->flag |= RX_FLAG_MACTIME_START; 326 326
+2 -2
drivers/net/wireless/realtek/rtlwifi/rtl8723be/trx.c
··· 373 373 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 374 374 375 375 if (status->rx_is40Mhzpacket) 376 - rx_status->flag |= RX_FLAG_40MHZ; 376 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 377 377 378 378 if (status->is_ht) 379 - rx_status->flag |= RX_FLAG_HT; 379 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 380 380 381 381 rx_status->flag |= RX_FLAG_MACTIME_START; 382 382
+5 -5
drivers/net/wireless/realtek/rtlwifi/rtl8821ae/trx.c
··· 520 520 rx_status->flag |= RX_FLAG_FAILED_FCS_CRC; 521 521 522 522 if (status->rx_packet_bw == HT_CHANNEL_WIDTH_20_40) 523 - rx_status->flag |= RX_FLAG_40MHZ; 523 + rx_status->enc_flags |= RX_ENC_FLAG_40MHZ; 524 524 else if (status->rx_packet_bw == HT_CHANNEL_WIDTH_80) 525 - rx_status->vht_flag |= RX_VHT_FLAG_80MHZ; 525 + rx_status->enc_flags |= RX_ENC_FLAG_80MHZ; 526 526 if (status->is_ht) 527 - rx_status->flag |= RX_FLAG_HT; 527 + rx_status->enc_flags |= RX_ENC_FLAG_HT; 528 528 if (status->is_vht) 529 - rx_status->flag |= RX_FLAG_VHT; 529 + rx_status->enc_flags |= RX_ENC_FLAG_VHT; 530 530 531 531 if (status->is_short_gi) 532 - rx_status->flag |= RX_FLAG_SHORT_GI; 532 + rx_status->enc_flags |= RX_ENC_FLAG_SHORT_GI; 533 533 534 534 rx_status->vht_nss = status->vht_nss; 535 535 rx_status->flag |= RX_FLAG_MACTIME_START;
+1 -1
drivers/net/wireless/st/cw1200/txrx.c
··· 1085 1085 hdr->band); 1086 1086 1087 1087 if (arg->rx_rate >= 14) { 1088 - hdr->flag |= RX_FLAG_HT; 1088 + hdr->enc_flags |= RX_ENC_FLAG_HT; 1089 1089 hdr->rate_idx = arg->rx_rate - 14; 1090 1090 } else if (arg->rx_rate >= 4) { 1091 1091 hdr->rate_idx = arg->rx_rate - 2;
+1 -1
drivers/net/wireless/ti/wl1251/rx.c
··· 141 141 } 142 142 143 143 if (desc->mod_pre & SHORT_PREAMBLE_BIT) 144 - status->flag |= RX_FLAG_SHORTPRE; 144 + status->enc_flags |= RX_ENC_FLAG_SHORTPRE; 145 145 } 146 146 147 147 static void wl1251_rx_body(struct wl1251 *wl,
+1 -1
drivers/net/wireless/ti/wlcore/rx.c
··· 72 72 73 73 /* 11n support */ 74 74 if (desc->rate <= wl->hw_min_ht_rate) 75 - status->flag |= RX_FLAG_HT; 75 + status->enc_flags |= RX_ENC_FLAG_HT; 76 76 77 77 /* 78 78 * Read the signal level and antenna diversity indication.
+52 -54
include/net/mac80211.h
··· 1045 1045 * (including FCS) was received. 1046 1046 * @RX_FLAG_MACTIME_PLCP_START: The timestamp passed in the RX status (@mactime 1047 1047 * field) is valid and contains the time the SYNC preamble was received. 1048 - * @RX_FLAG_SHORTPRE: Short preamble was used for this frame 1049 - * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index 1050 - * @RX_FLAG_VHT: VHT MCS was used and rate_index is MCS index 1051 - * @RX_FLAG_40MHZ: HT40 (40 MHz) was used 1052 - * @RX_FLAG_SHORT_GI: Short guard interval was used 1053 1048 * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present. 1054 1049 * Valid only for data frames (mainly A-MPDU) 1055 - * @RX_FLAG_HT_GF: This frame was received in a HT-greenfield transmission, if 1056 - * the driver fills this value it should add %IEEE80211_RADIOTAP_MCS_HAVE_FMT 1057 - * to hw.radiotap_mcs_details to advertise that fact 1058 1050 * @RX_FLAG_AMPDU_DETAILS: A-MPDU details are known, in particular the reference 1059 1051 * number (@ampdu_reference) must be populated and be a distinct number for 1060 1052 * each A-MPDU ··· 1059 1067 * is stored in the @ampdu_delimiter_crc field) 1060 1068 * @RX_FLAG_MIC_STRIPPED: The mic was stripped of this packet. Decryption was 1061 1069 * done by the hardware 1062 - * @RX_FLAG_LDPC: LDPC was used 1063 1070 * @RX_FLAG_ONLY_MONITOR: Report frame only to monitor interfaces without 1064 1071 * processing it in any regular way. 1065 1072 * This is useful if drivers offload some frames but still want to report ··· 1067 1076 * monitor interfaces. 1068 1077 * This is useful if drivers offload some frames but still want to report 1069 1078 * them for sniffing purposes. 1070 - * @RX_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 1071 - * @RX_FLAG_10MHZ: 10 MHz (half channel) was used 1072 - * @RX_FLAG_5MHZ: 5 MHz (quarter channel) was used 1073 1079 * @RX_FLAG_AMSDU_MORE: Some drivers may prefer to report separate A-MSDU 1074 1080 * subframes instead of a one huge frame for performance reasons. 1075 1081 * All, but the last MSDU from an A-MSDU should have this flag set. E.g. ··· 1094 1106 RX_FLAG_FAILED_FCS_CRC = BIT(5), 1095 1107 RX_FLAG_FAILED_PLCP_CRC = BIT(6), 1096 1108 RX_FLAG_MACTIME_START = BIT(7), 1097 - RX_FLAG_SHORTPRE = BIT(8), 1098 - RX_FLAG_HT = BIT(9), 1099 - RX_FLAG_40MHZ = BIT(10), 1100 - RX_FLAG_SHORT_GI = BIT(11), 1101 - RX_FLAG_NO_SIGNAL_VAL = BIT(12), 1102 - RX_FLAG_HT_GF = BIT(13), 1103 - RX_FLAG_AMPDU_DETAILS = BIT(14), 1104 - RX_FLAG_PN_VALIDATED = BIT(15), 1105 - RX_FLAG_DUP_VALIDATED = BIT(16), 1106 - RX_FLAG_AMPDU_LAST_KNOWN = BIT(17), 1107 - RX_FLAG_AMPDU_IS_LAST = BIT(18), 1108 - RX_FLAG_AMPDU_DELIM_CRC_ERROR = BIT(19), 1109 - RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20), 1110 - RX_FLAG_MACTIME_END = BIT(21), 1111 - RX_FLAG_VHT = BIT(22), 1112 - RX_FLAG_LDPC = BIT(23), 1113 - RX_FLAG_ONLY_MONITOR = BIT(24), 1114 - RX_FLAG_SKIP_MONITOR = BIT(25), 1115 - RX_FLAG_STBC_MASK = BIT(26) | BIT(27), 1116 - RX_FLAG_10MHZ = BIT(28), 1117 - RX_FLAG_5MHZ = BIT(29), 1118 - RX_FLAG_AMSDU_MORE = BIT(30), 1119 - RX_FLAG_RADIOTAP_VENDOR_DATA = BIT(31), 1120 - RX_FLAG_MIC_STRIPPED = BIT_ULL(32), 1121 - RX_FLAG_ALLOW_SAME_PN = BIT_ULL(33), 1122 - RX_FLAG_ICV_STRIPPED = BIT_ULL(34), 1109 + RX_FLAG_NO_SIGNAL_VAL = BIT(8), 1110 + RX_FLAG_AMPDU_DETAILS = BIT(9), 1111 + RX_FLAG_PN_VALIDATED = BIT(10), 1112 + RX_FLAG_DUP_VALIDATED = BIT(11), 1113 + RX_FLAG_AMPDU_LAST_KNOWN = BIT(12), 1114 + RX_FLAG_AMPDU_IS_LAST = BIT(13), 1115 + RX_FLAG_AMPDU_DELIM_CRC_ERROR = BIT(14), 1116 + RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(15), 1117 + RX_FLAG_MACTIME_END = BIT(16), 1118 + RX_FLAG_ONLY_MONITOR = BIT(17), 1119 + RX_FLAG_SKIP_MONITOR = BIT(18), 1120 + RX_FLAG_AMSDU_MORE = BIT(19), 1121 + RX_FLAG_RADIOTAP_VENDOR_DATA = BIT(20), 1122 + RX_FLAG_MIC_STRIPPED = BIT(21), 1123 + RX_FLAG_ALLOW_SAME_PN = BIT(22), 1124 + RX_FLAG_ICV_STRIPPED = BIT(23), 1123 1125 }; 1124 - 1125 - #define RX_FLAG_STBC_SHIFT 26 1126 1126 1127 1127 /** 1128 - * enum mac80211_rx_vht_flags - receive VHT flags 1128 + * enum mac80211_rx_encoding_flags - MCS & bandwidth flags 1129 1129 * 1130 - * These flags are used with the @vht_flag member of 1131 - * &struct ieee80211_rx_status. 1132 - * @RX_VHT_FLAG_80MHZ: 80 MHz was used 1133 - * @RX_VHT_FLAG_160MHZ: 160 MHz was used 1134 - * @RX_VHT_FLAG_BF: packet was beamformed 1130 + * @RX_ENC_FLAG_SHORTPRE: Short preamble was used for this frame 1131 + * @RX_ENC_FLAG_HT: HT MCS was used and rate_idx is MCS index 1132 + * @RX_ENC_FLAG_VHT: VHT MCS was used and rate_index is MCS index 1133 + * @RX_ENC_FLAG_40MHZ: HT40 (40 MHz) was used 1134 + * @RX_ENC_FLAG_SHORT_GI: Short guard interval was used 1135 + * @RX_ENC_FLAG_HT_GF: This frame was received in a HT-greenfield transmission, 1136 + * if the driver fills this value it should add 1137 + * %IEEE80211_RADIOTAP_MCS_HAVE_FMT 1138 + * to hw.radiotap_mcs_details to advertise that fact 1139 + * @RX_ENC_FLAG_LDPC: LDPC was used 1140 + * @RX_ENC_FLAG_STBC_MASK: STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 1141 + * @RX_ENC_FLAG_10MHZ: 10 MHz (half channel) was used 1142 + * @RX_ENC_FLAG_5MHZ: 5 MHz (quarter channel) was used 1143 + * @RX_ENC_FLAG_80MHZ: 80 MHz was used 1144 + * @RX_ENC_FLAG_160MHZ: 160 MHz was used 1145 + * @RX_ENC_FLAG_BF: packet was beamformed 1135 1146 */ 1136 - 1137 - enum mac80211_rx_vht_flags { 1138 - RX_VHT_FLAG_80MHZ = BIT(0), 1139 - RX_VHT_FLAG_160MHZ = BIT(1), 1140 - RX_VHT_FLAG_BF = BIT(2), 1147 + enum mac80211_rx_encoding_flags { 1148 + RX_ENC_FLAG_SHORTPRE = BIT(0), 1149 + RX_ENC_FLAG_HT = BIT(1), 1150 + RX_ENC_FLAG_40MHZ = BIT(2), 1151 + RX_ENC_FLAG_SHORT_GI = BIT(3), 1152 + RX_ENC_FLAG_HT_GF = BIT(4), 1153 + RX_ENC_FLAG_VHT = BIT(5), 1154 + RX_ENC_FLAG_STBC_MASK = BIT(6) | BIT(7), 1155 + RX_ENC_FLAG_LDPC = BIT(8), 1156 + RX_ENC_FLAG_10MHZ = BIT(9), 1157 + RX_ENC_FLAG_5MHZ = BIT(10), 1158 + RX_ENC_FLAG_80MHZ = BIT(11), 1159 + RX_ENC_FLAG_160MHZ = BIT(12), 1160 + RX_ENC_FLAG_BF = BIT(13), 1141 1161 }; 1162 + 1163 + #define RX_ENC_FLAG_STBC_SHIFT 6 1142 1164 1143 1165 /** 1144 1166 * struct ieee80211_rx_status - receive status ··· 1179 1181 * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) 1180 1182 * @vht_nss: number of streams (VHT only) 1181 1183 * @flag: %RX_FLAG_\* 1182 - * @vht_flag: %RX_VHT_FLAG_\* 1184 + * @enc_flags: uses bits from &enum mac80211_rx_encoding_flags 1183 1185 * @rx_flags: internal RX flags for mac80211 1184 1186 * @ampdu_reference: A-MPDU reference number, must be a different value for 1185 1187 * each A-MPDU but the same for each subframe within one A-MPDU ··· 1190 1192 u64 boottime_ns; 1191 1193 u32 device_timestamp; 1192 1194 u32 ampdu_reference; 1193 - u64 flag; 1195 + u32 flag; 1196 + u16 enc_flags; 1194 1197 u16 freq; 1195 - u8 vht_flag; 1196 1198 u8 rate_idx; 1197 1199 u8 vht_nss; 1198 1200 u8 rx_flags;
+2 -2
net/mac80211/ibss.c
··· 1014 1014 prev_rates = sta->sta.supp_rates[band]; 1015 1015 /* make sure mandatory rates are always added */ 1016 1016 scan_width = NL80211_BSS_CHAN_WIDTH_20; 1017 - if (rx_status->flag & RX_FLAG_5MHZ) 1017 + if (rx_status->enc_flags & RX_ENC_FLAG_5MHZ) 1018 1018 scan_width = NL80211_BSS_CHAN_WIDTH_5; 1019 - if (rx_status->flag & RX_FLAG_10MHZ) 1019 + if (rx_status->enc_flags & RX_ENC_FLAG_10MHZ) 1020 1020 scan_width = NL80211_BSS_CHAN_WIDTH_10; 1021 1021 1022 1022 sta->sta.supp_rates[band] = supp_rates |
+1 -1
net/mac80211/ieee80211_i.h
··· 1532 1532 return true; 1533 1533 /* can't handle HT/VHT preamble yet */ 1534 1534 if (status->flag & RX_FLAG_MACTIME_PLCP_START && 1535 - !(status->flag & (RX_FLAG_HT | RX_FLAG_VHT))) 1535 + !(status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT))) 1536 1536 return true; 1537 1537 return false; 1538 1538 }
+29 -29
net/mac80211/rx.c
··· 156 156 /* padding for RX_FLAGS if necessary */ 157 157 len = ALIGN(len, 2); 158 158 159 - if (status->flag & RX_FLAG_HT) /* HT info */ 159 + if (status->enc_flags & RX_ENC_FLAG_HT) /* HT info */ 160 160 len += 3; 161 161 162 162 if (status->flag & RX_FLAG_AMPDU_DETAILS) { ··· 164 164 len += 8; 165 165 } 166 166 167 - if (status->flag & RX_FLAG_VHT) { 167 + if (status->enc_flags & RX_ENC_FLAG_VHT) { 168 168 len = ALIGN(len, 2); 169 169 len += 12; 170 170 } ··· 329 329 *pos |= IEEE80211_RADIOTAP_F_FCS; 330 330 if (status->flag & (RX_FLAG_FAILED_FCS_CRC | RX_FLAG_FAILED_PLCP_CRC)) 331 331 *pos |= IEEE80211_RADIOTAP_F_BADFCS; 332 - if (status->flag & RX_FLAG_SHORTPRE) 332 + if (status->enc_flags & RX_ENC_FLAG_SHORTPRE) 333 333 *pos |= IEEE80211_RADIOTAP_F_SHORTPRE; 334 334 pos++; 335 335 336 336 /* IEEE80211_RADIOTAP_RATE */ 337 - if (!rate || status->flag & (RX_FLAG_HT | RX_FLAG_VHT)) { 337 + if (!rate || status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT)) { 338 338 /* 339 339 * Without rate information don't add it. If we have, 340 340 * MCS information is a separate field in radiotap, ··· 345 345 } else { 346 346 int shift = 0; 347 347 rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_RATE); 348 - if (status->flag & RX_FLAG_10MHZ) 348 + if (status->enc_flags & RX_ENC_FLAG_10MHZ) 349 349 shift = 1; 350 - else if (status->flag & RX_FLAG_5MHZ) 350 + else if (status->enc_flags & RX_ENC_FLAG_5MHZ) 351 351 shift = 2; 352 352 *pos = DIV_ROUND_UP(rate->bitrate, 5 * (1 << shift)); 353 353 } ··· 356 356 /* IEEE80211_RADIOTAP_CHANNEL */ 357 357 put_unaligned_le16(status->freq, pos); 358 358 pos += 2; 359 - if (status->flag & RX_FLAG_10MHZ) 359 + if (status->enc_flags & RX_ENC_FLAG_10MHZ) 360 360 channel_flags |= IEEE80211_CHAN_HALF; 361 - else if (status->flag & RX_FLAG_5MHZ) 361 + else if (status->enc_flags & RX_ENC_FLAG_5MHZ) 362 362 channel_flags |= IEEE80211_CHAN_QUARTER; 363 363 364 364 if (status->band == NL80211_BAND_5GHZ) 365 365 channel_flags |= IEEE80211_CHAN_OFDM | IEEE80211_CHAN_5GHZ; 366 - else if (status->flag & (RX_FLAG_HT | RX_FLAG_VHT)) 366 + else if (status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT)) 367 367 channel_flags |= IEEE80211_CHAN_DYN | IEEE80211_CHAN_2GHZ; 368 368 else if (rate && rate->flags & IEEE80211_RATE_ERP_G) 369 369 channel_flags |= IEEE80211_CHAN_OFDM | IEEE80211_CHAN_2GHZ; ··· 402 402 put_unaligned_le16(rx_flags, pos); 403 403 pos += 2; 404 404 405 - if (status->flag & RX_FLAG_HT) { 405 + if (status->enc_flags & RX_ENC_FLAG_HT) { 406 406 unsigned int stbc; 407 407 408 408 rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_MCS); 409 409 *pos++ = local->hw.radiotap_mcs_details; 410 410 *pos = 0; 411 - if (status->flag & RX_FLAG_SHORT_GI) 411 + if (status->enc_flags & RX_ENC_FLAG_SHORT_GI) 412 412 *pos |= IEEE80211_RADIOTAP_MCS_SGI; 413 - if (status->flag & RX_FLAG_40MHZ) 413 + if (status->enc_flags & RX_ENC_FLAG_40MHZ) 414 414 *pos |= IEEE80211_RADIOTAP_MCS_BW_40; 415 - if (status->flag & RX_FLAG_HT_GF) 415 + if (status->enc_flags & RX_ENC_FLAG_HT_GF) 416 416 *pos |= IEEE80211_RADIOTAP_MCS_FMT_GF; 417 - if (status->flag & RX_FLAG_LDPC) 417 + if (status->enc_flags & RX_ENC_FLAG_LDPC) 418 418 *pos |= IEEE80211_RADIOTAP_MCS_FEC_LDPC; 419 - stbc = (status->flag & RX_FLAG_STBC_MASK) >> RX_FLAG_STBC_SHIFT; 419 + stbc = (status->enc_flags & RX_ENC_FLAG_STBC_MASK) >> RX_ENC_FLAG_STBC_SHIFT; 420 420 *pos |= stbc << IEEE80211_RADIOTAP_MCS_STBC_SHIFT; 421 421 pos++; 422 422 *pos++ = status->rate_idx; ··· 449 449 *pos++ = 0; 450 450 } 451 451 452 - if (status->flag & RX_FLAG_VHT) { 452 + if (status->enc_flags & RX_ENC_FLAG_VHT) { 453 453 u16 known = local->hw.radiotap_vht_details; 454 454 455 455 rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_VHT); 456 456 put_unaligned_le16(known, pos); 457 457 pos += 2; 458 458 /* flags */ 459 - if (status->flag & RX_FLAG_SHORT_GI) 459 + if (status->enc_flags & RX_ENC_FLAG_SHORT_GI) 460 460 *pos |= IEEE80211_RADIOTAP_VHT_FLAG_SGI; 461 461 /* in VHT, STBC is binary */ 462 - if (status->flag & RX_FLAG_STBC_MASK) 462 + if (status->enc_flags & RX_ENC_FLAG_STBC_MASK) 463 463 *pos |= IEEE80211_RADIOTAP_VHT_FLAG_STBC; 464 - if (status->vht_flag & RX_VHT_FLAG_BF) 464 + if (status->enc_flags & RX_ENC_FLAG_BF) 465 465 *pos |= IEEE80211_RADIOTAP_VHT_FLAG_BEAMFORMED; 466 466 pos++; 467 467 /* bandwidth */ 468 - if (status->vht_flag & RX_VHT_FLAG_80MHZ) 468 + if (status->enc_flags & RX_ENC_FLAG_80MHZ) 469 469 *pos++ = 4; 470 - else if (status->vht_flag & RX_VHT_FLAG_160MHZ) 470 + else if (status->enc_flags & RX_ENC_FLAG_160MHZ) 471 471 *pos++ = 11; 472 - else if (status->flag & RX_FLAG_40MHZ) 472 + else if (status->enc_flags & RX_ENC_FLAG_40MHZ) 473 473 *pos++ = 1; 474 474 else /* 20 MHz */ 475 475 *pos++ = 0; ··· 477 477 *pos = (status->rate_idx << 4) | status->vht_nss; 478 478 pos += 4; 479 479 /* coding field */ 480 - if (status->flag & RX_FLAG_LDPC) 480 + if (status->enc_flags & RX_ENC_FLAG_LDPC) 481 481 *pos |= IEEE80211_RADIOTAP_CODING_LDPC_USER0; 482 482 pos++; 483 483 /* group ID */ ··· 3336 3336 status = IEEE80211_SKB_RXCB((rx->skb)); 3337 3337 3338 3338 sband = rx->local->hw.wiphy->bands[status->band]; 3339 - if (!(status->flag & RX_FLAG_HT) && 3340 - !(status->flag & RX_FLAG_VHT)) 3339 + if (!(status->enc_flags & RX_ENC_FLAG_HT) && 3340 + !(status->enc_flags & RX_ENC_FLAG_VHT)) 3341 3341 rate = &sband->bitrates[status->rate_idx]; 3342 3342 3343 3343 ieee80211_rx_cooked_monitor(rx, rate); ··· 3598 3598 return false; 3599 3599 if (!rx->sta) { 3600 3600 int rate_idx; 3601 - if (status->flag & (RX_FLAG_HT | RX_FLAG_VHT)) 3601 + if (status->enc_flags & (RX_ENC_FLAG_HT | RX_ENC_FLAG_VHT)) 3602 3602 rate_idx = 0; /* TODO: HT/VHT rates */ 3603 3603 else 3604 3604 rate_idx = status->rate_idx; ··· 3618 3618 return false; 3619 3619 if (!rx->sta) { 3620 3620 int rate_idx; 3621 - if (status->flag & RX_FLAG_HT) 3621 + if (status->enc_flags & RX_ENC_FLAG_HT) 3622 3622 rate_idx = 0; /* TODO: HT rates */ 3623 3623 else 3624 3624 rate_idx = status->rate_idx; ··· 4281 4281 * we probably can't have a valid rate here anyway. 4282 4282 */ 4283 4283 4284 - if (status->flag & RX_FLAG_HT) { 4284 + if (status->enc_flags & RX_ENC_FLAG_HT) { 4285 4285 /* 4286 4286 * rate_idx is MCS index, which can be [0-76] 4287 4287 * as documented on: ··· 4299 4299 status->rate_idx, 4300 4300 status->rate_idx)) 4301 4301 goto drop; 4302 - } else if (status->flag & RX_FLAG_VHT) { 4302 + } else if (status->enc_flags & RX_ENC_FLAG_VHT) { 4303 4303 if (WARN_ONCE(status->rate_idx > 9 || 4304 4304 !status->vht_nss || 4305 4305 status->vht_nss > 8,
+4 -4
net/mac80211/scan.c
··· 79 79 bss_meta.signal = (rx_status->signal * 100) / local->hw.max_signal; 80 80 81 81 bss_meta.scan_width = NL80211_BSS_CHAN_WIDTH_20; 82 - if (rx_status->flag & RX_FLAG_5MHZ) 82 + if (rx_status->enc_flags & RX_ENC_FLAG_5MHZ) 83 83 bss_meta.scan_width = NL80211_BSS_CHAN_WIDTH_5; 84 - if (rx_status->flag & RX_FLAG_10MHZ) 84 + if (rx_status->enc_flags & RX_ENC_FLAG_10MHZ) 85 85 bss_meta.scan_width = NL80211_BSS_CHAN_WIDTH_10; 86 86 87 87 bss_meta.chan = channel; ··· 174 174 if (beacon) { 175 175 struct ieee80211_supported_band *sband = 176 176 local->hw.wiphy->bands[rx_status->band]; 177 - if (!(rx_status->flag & RX_FLAG_HT) && 178 - !(rx_status->flag & RX_FLAG_VHT)) 177 + if (!(rx_status->enc_flags & RX_ENC_FLAG_HT) && 178 + !(rx_status->enc_flags & RX_ENC_FLAG_VHT)) 179 179 bss->beacon_rate = 180 180 &sband->bitrates[rx_status->rate_idx]; 181 181 }
+8 -8
net/mac80211/sta_info.h
··· 740 740 { 741 741 u16 r = s->rate_idx; 742 742 743 - if (s->vht_flag & RX_VHT_FLAG_80MHZ) 743 + if (s->enc_flags & RX_ENC_FLAG_80MHZ) 744 744 r |= RATE_INFO_BW_80 << STA_STATS_RATE_BW_SHIFT; 745 - else if (s->vht_flag & RX_VHT_FLAG_160MHZ) 745 + else if (s->enc_flags & RX_ENC_FLAG_160MHZ) 746 746 r |= RATE_INFO_BW_160 << STA_STATS_RATE_BW_SHIFT; 747 - else if (s->flag & RX_FLAG_40MHZ) 747 + else if (s->enc_flags & RX_ENC_FLAG_40MHZ) 748 748 r |= RATE_INFO_BW_40 << STA_STATS_RATE_BW_SHIFT; 749 - else if (s->flag & RX_FLAG_10MHZ) 749 + else if (s->enc_flags & RX_ENC_FLAG_10MHZ) 750 750 r |= RATE_INFO_BW_10 << STA_STATS_RATE_BW_SHIFT; 751 - else if (s->flag & RX_FLAG_5MHZ) 751 + else if (s->enc_flags & RX_ENC_FLAG_5MHZ) 752 752 r |= RATE_INFO_BW_5 << STA_STATS_RATE_BW_SHIFT; 753 753 else 754 754 r |= RATE_INFO_BW_20 << STA_STATS_RATE_BW_SHIFT; 755 755 756 - if (s->flag & RX_FLAG_SHORT_GI) 756 + if (s->enc_flags & RX_ENC_FLAG_SHORT_GI) 757 757 r |= STA_STATS_RATE_SGI; 758 758 759 - if (s->flag & RX_FLAG_VHT) 759 + if (s->enc_flags & RX_ENC_FLAG_VHT) 760 760 r |= STA_STATS_RATE_TYPE_VHT | (s->vht_nss << 4); 761 - else if (s->flag & RX_FLAG_HT) 761 + else if (s->enc_flags & RX_ENC_FLAG_HT) 762 762 r |= STA_STATS_RATE_TYPE_HT; 763 763 else 764 764 r |= STA_STATS_RATE_TYPE_LEGACY | (s->band << 4);
+11 -11
net/mac80211/util.c
··· 2715 2715 memset(&ri, 0, sizeof(ri)); 2716 2716 2717 2717 /* Fill cfg80211 rate info */ 2718 - if (status->flag & RX_FLAG_HT) { 2718 + if (status->enc_flags & RX_ENC_FLAG_HT) { 2719 2719 ri.mcs = status->rate_idx; 2720 2720 ri.flags |= RATE_INFO_FLAGS_MCS; 2721 - if (status->flag & RX_FLAG_40MHZ) 2721 + if (status->enc_flags & RX_ENC_FLAG_40MHZ) 2722 2722 ri.bw = RATE_INFO_BW_40; 2723 2723 else 2724 2724 ri.bw = RATE_INFO_BW_20; 2725 - if (status->flag & RX_FLAG_SHORT_GI) 2725 + if (status->enc_flags & RX_ENC_FLAG_SHORT_GI) 2726 2726 ri.flags |= RATE_INFO_FLAGS_SHORT_GI; 2727 - } else if (status->flag & RX_FLAG_VHT) { 2727 + } else if (status->enc_flags & RX_ENC_FLAG_VHT) { 2728 2728 ri.flags |= RATE_INFO_FLAGS_VHT_MCS; 2729 2729 ri.mcs = status->rate_idx; 2730 2730 ri.nss = status->vht_nss; 2731 - if (status->flag & RX_FLAG_40MHZ) 2731 + if (status->enc_flags & RX_ENC_FLAG_40MHZ) 2732 2732 ri.bw = RATE_INFO_BW_40; 2733 - else if (status->vht_flag & RX_VHT_FLAG_80MHZ) 2733 + else if (status->enc_flags & RX_ENC_FLAG_80MHZ) 2734 2734 ri.bw = RATE_INFO_BW_80; 2735 - else if (status->vht_flag & RX_VHT_FLAG_160MHZ) 2735 + else if (status->enc_flags & RX_ENC_FLAG_160MHZ) 2736 2736 ri.bw = RATE_INFO_BW_160; 2737 2737 else 2738 2738 ri.bw = RATE_INFO_BW_20; 2739 - if (status->flag & RX_FLAG_SHORT_GI) 2739 + if (status->enc_flags & RX_ENC_FLAG_SHORT_GI) 2740 2740 ri.flags |= RATE_INFO_FLAGS_SHORT_GI; 2741 2741 } else { 2742 2742 struct ieee80211_supported_band *sband; 2743 2743 int shift = 0; 2744 2744 int bitrate; 2745 2745 2746 - if (status->flag & RX_FLAG_10MHZ) { 2746 + if (status->enc_flags & RX_ENC_FLAG_10MHZ) { 2747 2747 shift = 1; 2748 2748 ri.bw = RATE_INFO_BW_10; 2749 - } else if (status->flag & RX_FLAG_5MHZ) { 2749 + } else if (status->enc_flags & RX_ENC_FLAG_5MHZ) { 2750 2750 shift = 2; 2751 2751 ri.bw = RATE_INFO_BW_5; 2752 2752 } else { ··· 2762 2762 if (status->band == NL80211_BAND_5GHZ) { 2763 2763 ts += 20 << shift; 2764 2764 mpdu_offset += 2; 2765 - } else if (status->flag & RX_FLAG_SHORTPRE) { 2765 + } else if (status->enc_flags & RX_ENC_FLAG_SHORTPRE) { 2766 2766 ts += 96; 2767 2767 } else { 2768 2768 ts += 192;