diff options
| author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-02-05 09:37:11 -0500 |
|---|---|---|
| committer | Johannes Berg <johannes.berg@intel.com> | 2014-02-06 03:34:10 -0500 |
| commit | 1b8d242adbea881658071efc31d2c0dcf8a44fb7 (patch) | |
| tree | d04d2ec515be59df1f4391dea738e8bbc612b85c | |
| parent | 0059b2b142b9938118e1ed1ea630c527119425fe (diff) | |
mac80211: move VHT related RX_FLAG to another variable
ieee80211_rx_status.flags is full. Define a new vht_flag
variable to be able to set more VHT related flags and make
room in flags.
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Acked-by: Kalle Valo <kvalo@qca.qualcomm.com> [ath10k]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/txrx.c | 4 | ||||
| -rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/rx.c | 4 | ||||
| -rw-r--r-- | include/net/mac80211.h | 23 | ||||
| -rw-r--r-- | net/mac80211/cfg.c | 6 | ||||
| -rw-r--r-- | net/mac80211/rx.c | 9 | ||||
| -rw-r--r-- | net/mac80211/sta_info.h | 2 | ||||
| -rw-r--r-- | net/mac80211/util.c | 6 |
7 files changed, 34 insertions, 20 deletions
diff --git a/drivers/net/wireless/ath/ath10k/txrx.c b/drivers/net/wireless/ath/ath10k/txrx.c index 74f45fa6f428..27f20e0510f7 100644 --- a/drivers/net/wireless/ath/ath10k/txrx.c +++ b/drivers/net/wireless/ath/ath10k/txrx.c | |||
| @@ -204,7 +204,7 @@ static void process_rx_rates(struct ath10k *ar, struct htt_rx_info *info, | |||
| 204 | break; | 204 | break; |
| 205 | /* 80MHZ */ | 205 | /* 80MHZ */ |
| 206 | case 2: | 206 | case 2: |
| 207 | status->flag |= RX_FLAG_80MHZ; | 207 | status->vht_flag |= RX_VHT_FLAG_80MHZ; |
| 208 | } | 208 | } |
| 209 | 209 | ||
| 210 | status->flag |= RX_FLAG_VHT; | 210 | status->flag |= RX_FLAG_VHT; |
| @@ -266,7 +266,7 @@ void ath10k_process_rx(struct ath10k *ar, struct htt_rx_info *info) | |||
| 266 | status->flag & RX_FLAG_HT ? "ht" : "", | 266 | status->flag & RX_FLAG_HT ? "ht" : "", |
| 267 | status->flag & RX_FLAG_VHT ? "vht" : "", | 267 | status->flag & RX_FLAG_VHT ? "vht" : "", |
| 268 | status->flag & RX_FLAG_40MHZ ? "40" : "", | 268 | status->flag & RX_FLAG_40MHZ ? "40" : "", |
| 269 | status->flag & RX_FLAG_80MHZ ? "80" : "", | 269 | status->vht_flag & RX_VHT_FLAG_80MHZ ? "80" : "", |
| 270 | status->flag & RX_FLAG_SHORT_GI ? "sgi " : "", | 270 | status->flag & RX_FLAG_SHORT_GI ? "sgi " : "", |
| 271 | status->rate_idx, | 271 | status->rate_idx, |
| 272 | status->vht_nss, | 272 | status->vht_nss, |
diff --git a/drivers/net/wireless/iwlwifi/mvm/rx.c b/drivers/net/wireless/iwlwifi/mvm/rx.c index a85b60f7e67e..c67d6375e622 100644 --- a/drivers/net/wireless/iwlwifi/mvm/rx.c +++ b/drivers/net/wireless/iwlwifi/mvm/rx.c | |||
| @@ -364,10 +364,10 @@ int iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb, | |||
| 364 | rx_status.flag |= RX_FLAG_40MHZ; | 364 | rx_status.flag |= RX_FLAG_40MHZ; |
| 365 | break; | 365 | break; |
| 366 | case RATE_MCS_CHAN_WIDTH_80: | 366 | case RATE_MCS_CHAN_WIDTH_80: |
| 367 | rx_status.flag |= RX_FLAG_80MHZ; | 367 | rx_status.vht_flag |= RX_VHT_FLAG_80MHZ; |
| 368 | break; | 368 | break; |
| 369 | case RATE_MCS_CHAN_WIDTH_160: | 369 | case RATE_MCS_CHAN_WIDTH_160: |
| 370 | rx_status.flag |= RX_FLAG_160MHZ; | 370 | rx_status.vht_flag |= RX_VHT_FLAG_160MHZ; |
| 371 | break; | 371 | break; |
| 372 | } | 372 | } |
| 373 | if (rate_n_flags & RATE_MCS_SGI_MSK) | 373 | if (rate_n_flags & RATE_MCS_SGI_MSK) |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 452eb594dcef..a119da52665f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
| @@ -808,9 +808,6 @@ ieee80211_tx_info_clear_status(struct ieee80211_tx_info *info) | |||
| 808 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index | 808 | * @RX_FLAG_HT: HT MCS was used and rate_idx is MCS index |
| 809 | * @RX_FLAG_VHT: VHT MCS was used and rate_index is MCS index | 809 | * @RX_FLAG_VHT: VHT MCS was used and rate_index is MCS index |
| 810 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used | 810 | * @RX_FLAG_40MHZ: HT40 (40 MHz) was used |
| 811 | * @RX_FLAG_80MHZ: 80 MHz was used | ||
| 812 | * @RX_FLAG_80P80MHZ: 80+80 MHz was used | ||
| 813 | * @RX_FLAG_160MHZ: 160 MHz was used | ||
| 814 | * @RX_FLAG_SHORT_GI: Short guard interval was used | 811 | * @RX_FLAG_SHORT_GI: Short guard interval was used |
| 815 | * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present. | 812 | * @RX_FLAG_NO_SIGNAL_VAL: The signal strength value is not present. |
| 816 | * Valid only for data frames (mainly A-MPDU) | 813 | * Valid only for data frames (mainly A-MPDU) |
| @@ -866,9 +863,6 @@ enum mac80211_rx_flags { | |||
| 866 | RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20), | 863 | RX_FLAG_AMPDU_DELIM_CRC_KNOWN = BIT(20), |
| 867 | RX_FLAG_MACTIME_END = BIT(21), | 864 | RX_FLAG_MACTIME_END = BIT(21), |
| 868 | RX_FLAG_VHT = BIT(22), | 865 | RX_FLAG_VHT = BIT(22), |
| 869 | RX_FLAG_80MHZ = BIT(23), | ||
| 870 | RX_FLAG_80P80MHZ = BIT(24), | ||
| 871 | RX_FLAG_160MHZ = BIT(25), | ||
| 872 | RX_FLAG_STBC_MASK = BIT(26) | BIT(27), | 866 | RX_FLAG_STBC_MASK = BIT(26) | BIT(27), |
| 873 | RX_FLAG_10MHZ = BIT(28), | 867 | RX_FLAG_10MHZ = BIT(28), |
| 874 | RX_FLAG_5MHZ = BIT(29), | 868 | RX_FLAG_5MHZ = BIT(29), |
| @@ -878,6 +872,21 @@ enum mac80211_rx_flags { | |||
| 878 | #define RX_FLAG_STBC_SHIFT 26 | 872 | #define RX_FLAG_STBC_SHIFT 26 |
| 879 | 873 | ||
| 880 | /** | 874 | /** |
| 875 | * enum mac80211_rx_vht_flags - receive VHT flags | ||
| 876 | * | ||
| 877 | * These flags are used with the @vht_flag member of | ||
| 878 | * &struct ieee80211_rx_status. | ||
| 879 | * @RX_VHT_FLAG_80MHZ: 80 MHz was used | ||
| 880 | * @RX_VHT_FLAG_80P80MHZ: 80+80 MHz was used | ||
| 881 | * @RX_VHT_FLAG_160MHZ: 160 MHz was used | ||
| 882 | */ | ||
| 883 | enum mac80211_rx_vht_flags { | ||
| 884 | RX_VHT_FLAG_80MHZ = BIT(0), | ||
| 885 | RX_VHT_FLAG_80P80MHZ = BIT(1), | ||
| 886 | RX_VHT_FLAG_160MHZ = BIT(2), | ||
| 887 | }; | ||
| 888 | |||
| 889 | /** | ||
| 881 | * struct ieee80211_rx_status - receive status | 890 | * struct ieee80211_rx_status - receive status |
| 882 | * | 891 | * |
| 883 | * The low-level driver should provide this information (the subset | 892 | * The low-level driver should provide this information (the subset |
| @@ -902,6 +911,7 @@ enum mac80211_rx_flags { | |||
| 902 | * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) | 911 | * HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT) |
| 903 | * @vht_nss: number of streams (VHT only) | 912 | * @vht_nss: number of streams (VHT only) |
| 904 | * @flag: %RX_FLAG_* | 913 | * @flag: %RX_FLAG_* |
| 914 | * @vht_flag: %RX_VHT_FLAG_* | ||
| 905 | * @rx_flags: internal RX flags for mac80211 | 915 | * @rx_flags: internal RX flags for mac80211 |
| 906 | * @ampdu_reference: A-MPDU reference number, must be a different value for | 916 | * @ampdu_reference: A-MPDU reference number, must be a different value for |
| 907 | * each A-MPDU but the same for each subframe within one A-MPDU | 917 | * each A-MPDU but the same for each subframe within one A-MPDU |
| @@ -913,6 +923,7 @@ struct ieee80211_rx_status { | |||
| 913 | u32 ampdu_reference; | 923 | u32 ampdu_reference; |
| 914 | u32 flag; | 924 | u32 flag; |
| 915 | u16 freq; | 925 | u16 freq; |
| 926 | u8 vht_flag; | ||
| 916 | u8 rate_idx; | 927 | u8 rate_idx; |
| 917 | u8 vht_nss; | 928 | u8 vht_nss; |
| 918 | u8 rx_flags; | 929 | u8 rx_flags; |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 8192093f1e8b..6973ccdd230b 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
| @@ -451,11 +451,11 @@ void sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo) | |||
| 451 | rinfo->flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; | 451 | rinfo->flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; |
| 452 | if (sta->last_rx_rate_flag & RX_FLAG_SHORT_GI) | 452 | if (sta->last_rx_rate_flag & RX_FLAG_SHORT_GI) |
| 453 | rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI; | 453 | rinfo->flags |= RATE_INFO_FLAGS_SHORT_GI; |
| 454 | if (sta->last_rx_rate_flag & RX_FLAG_80MHZ) | 454 | if (sta->last_rx_rate_vht_flag & RX_VHT_FLAG_80MHZ) |
| 455 | rinfo->flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH; | 455 | rinfo->flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH; |
| 456 | if (sta->last_rx_rate_flag & RX_FLAG_80P80MHZ) | 456 | if (sta->last_rx_rate_vht_flag & RX_VHT_FLAG_80P80MHZ) |
| 457 | rinfo->flags |= RATE_INFO_FLAGS_80P80_MHZ_WIDTH; | 457 | rinfo->flags |= RATE_INFO_FLAGS_80P80_MHZ_WIDTH; |
| 458 | if (sta->last_rx_rate_flag & RX_FLAG_160MHZ) | 458 | if (sta->last_rx_rate_vht_flag & RX_VHT_FLAG_160MHZ) |
| 459 | rinfo->flags |= RATE_INFO_FLAGS_160_MHZ_WIDTH; | 459 | rinfo->flags |= RATE_INFO_FLAGS_160_MHZ_WIDTH; |
| 460 | } | 460 | } |
| 461 | 461 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index b86330138d67..e81cab3ca157 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
| @@ -321,7 +321,7 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | |||
| 321 | 321 | ||
| 322 | rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_VHT); | 322 | rthdr->it_present |= cpu_to_le32(1 << IEEE80211_RADIOTAP_VHT); |
| 323 | /* known field - how to handle 80+80? */ | 323 | /* known field - how to handle 80+80? */ |
| 324 | if (status->flag & RX_FLAG_80P80MHZ) | 324 | if (status->vht_flag & RX_VHT_FLAG_80P80MHZ) |
| 325 | known &= ~IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH; | 325 | known &= ~IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH; |
| 326 | put_unaligned_le16(known, pos); | 326 | put_unaligned_le16(known, pos); |
| 327 | pos += 2; | 327 | pos += 2; |
| @@ -330,11 +330,11 @@ ieee80211_add_rx_radiotap_header(struct ieee80211_local *local, | |||
| 330 | *pos |= IEEE80211_RADIOTAP_VHT_FLAG_SGI; | 330 | *pos |= IEEE80211_RADIOTAP_VHT_FLAG_SGI; |
| 331 | pos++; | 331 | pos++; |
| 332 | /* bandwidth */ | 332 | /* bandwidth */ |
| 333 | if (status->flag & RX_FLAG_80MHZ) | 333 | if (status->vht_flag & RX_VHT_FLAG_80MHZ) |
| 334 | *pos++ = 4; | 334 | *pos++ = 4; |
| 335 | else if (status->flag & RX_FLAG_80P80MHZ) | 335 | else if (status->vht_flag & RX_VHT_FLAG_80P80MHZ) |
| 336 | *pos++ = 0; /* marked not known above */ | 336 | *pos++ = 0; /* marked not known above */ |
| 337 | else if (status->flag & RX_FLAG_160MHZ) | 337 | else if (status->vht_flag & RX_VHT_FLAG_160MHZ) |
| 338 | *pos++ = 11; | 338 | *pos++ = 11; |
| 339 | else if (status->flag & RX_FLAG_40MHZ) | 339 | else if (status->flag & RX_FLAG_40MHZ) |
| 340 | *pos++ = 1; | 340 | *pos++ = 1; |
| @@ -1218,6 +1218,7 @@ ieee80211_rx_h_sta_process(struct ieee80211_rx_data *rx) | |||
| 1218 | if (ieee80211_is_data(hdr->frame_control)) { | 1218 | if (ieee80211_is_data(hdr->frame_control)) { |
| 1219 | sta->last_rx_rate_idx = status->rate_idx; | 1219 | sta->last_rx_rate_idx = status->rate_idx; |
| 1220 | sta->last_rx_rate_flag = status->flag; | 1220 | sta->last_rx_rate_flag = status->flag; |
| 1221 | sta->last_rx_rate_vht_flag = status->vht_flag; | ||
| 1221 | sta->last_rx_rate_vht_nss = status->vht_nss; | 1222 | sta->last_rx_rate_vht_nss = status->vht_nss; |
| 1222 | } | 1223 | } |
| 1223 | } | 1224 | } |
diff --git a/net/mac80211/sta_info.h b/net/mac80211/sta_info.h index d77ff7090630..d4d85de0d75d 100644 --- a/net/mac80211/sta_info.h +++ b/net/mac80211/sta_info.h | |||
| @@ -261,6 +261,7 @@ struct ieee80211_tx_latency_stat { | |||
| 261 | * "the" transmit rate | 261 | * "the" transmit rate |
| 262 | * @last_rx_rate_idx: rx status rate index of the last data packet | 262 | * @last_rx_rate_idx: rx status rate index of the last data packet |
| 263 | * @last_rx_rate_flag: rx status flag of the last data packet | 263 | * @last_rx_rate_flag: rx status flag of the last data packet |
| 264 | * @last_rx_rate_vht_flag: rx status vht flag of the last data packet | ||
| 264 | * @last_rx_rate_vht_nss: rx status nss of last data packet | 265 | * @last_rx_rate_vht_nss: rx status nss of last data packet |
| 265 | * @lock: used for locking all fields that require locking, see comments | 266 | * @lock: used for locking all fields that require locking, see comments |
| 266 | * in the header file. | 267 | * in the header file. |
| @@ -397,6 +398,7 @@ struct sta_info { | |||
| 397 | struct ieee80211_tx_rate last_tx_rate; | 398 | struct ieee80211_tx_rate last_tx_rate; |
| 398 | int last_rx_rate_idx; | 399 | int last_rx_rate_idx; |
| 399 | u32 last_rx_rate_flag; | 400 | u32 last_rx_rate_flag; |
| 401 | u32 last_rx_rate_vht_flag; | ||
| 400 | u8 last_rx_rate_vht_nss; | 402 | u8 last_rx_rate_vht_nss; |
| 401 | u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]; | 403 | u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]; |
| 402 | 404 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index caa0cd4f1926..d842af5c8a95 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
| @@ -2298,11 +2298,11 @@ u64 ieee80211_calculate_rx_timestamp(struct ieee80211_local *local, | |||
| 2298 | ri.nss = status->vht_nss; | 2298 | ri.nss = status->vht_nss; |
| 2299 | if (status->flag & RX_FLAG_40MHZ) | 2299 | if (status->flag & RX_FLAG_40MHZ) |
| 2300 | ri.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; | 2300 | ri.flags |= RATE_INFO_FLAGS_40_MHZ_WIDTH; |
| 2301 | if (status->flag & RX_FLAG_80MHZ) | 2301 | if (status->vht_flag & RX_VHT_FLAG_80MHZ) |
| 2302 | ri.flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH; | 2302 | ri.flags |= RATE_INFO_FLAGS_80_MHZ_WIDTH; |
| 2303 | if (status->flag & RX_FLAG_80P80MHZ) | 2303 | if (status->vht_flag & RX_VHT_FLAG_80P80MHZ) |
| 2304 | ri.flags |= RATE_INFO_FLAGS_80P80_MHZ_WIDTH; | 2304 | ri.flags |= RATE_INFO_FLAGS_80P80_MHZ_WIDTH; |
| 2305 | if (status->flag & RX_FLAG_160MHZ) | 2305 | if (status->vht_flag & RX_VHT_FLAG_160MHZ) |
| 2306 | ri.flags |= RATE_INFO_FLAGS_160_MHZ_WIDTH; | 2306 | ri.flags |= RATE_INFO_FLAGS_160_MHZ_WIDTH; |
| 2307 | if (status->flag & RX_FLAG_SHORT_GI) | 2307 | if (status->flag & RX_FLAG_SHORT_GI) |
| 2308 | ri.flags |= RATE_INFO_FLAGS_SHORT_GI; | 2308 | ri.flags |= RATE_INFO_FLAGS_SHORT_GI; |
