|
@@ -84,6 +84,7 @@
|
|
|
#define CHANNEL_FREQ_2512 2512
|
|
|
#define CHANNEL_FREQ_5000 5000
|
|
|
#define CHANNEL_FREQ_4000 4000
|
|
|
+#define CHANNEL_FREQ_5150 5150
|
|
|
#define FREQ_MULTIPLIER_CONST_5MHZ 5
|
|
|
#define FREQ_MULTIPLIER_CONST_20MHZ 20
|
|
|
#define RADIOTAP_5G_SPECTRUM_CHANNEL 0x0100
|
|
@@ -4089,34 +4090,6 @@ qdf_nbuf_update_radiotap_he_mu_other_flags(struct mon_rx_status *rx_status,
|
|
|
#define IEEE80211_RADIOTAP_HE_MU_OTHER 25
|
|
|
uint8_t ATH_OUI[] = {0x00, 0x03, 0x7f}; /* Atheros OUI */
|
|
|
|
|
|
-/**
|
|
|
- * radiotap_num_to_freq() - Get frequency from chan number
|
|
|
- * @chan_num - Input channel number
|
|
|
- *
|
|
|
- * Return - Channel frequency in Mhz
|
|
|
- */
|
|
|
-static uint16_t radiotap_num_to_freq (uint16_t chan_num)
|
|
|
-{
|
|
|
- if (chan_num == CHANNEL_NUM_14)
|
|
|
- return CHANNEL_FREQ_2484;
|
|
|
- if (chan_num < CHANNEL_NUM_14)
|
|
|
- return CHANNEL_FREQ_2407 +
|
|
|
- (chan_num * FREQ_MULTIPLIER_CONST_5MHZ);
|
|
|
-
|
|
|
- if (chan_num < CHANNEL_NUM_27)
|
|
|
- return CHANNEL_FREQ_2512 +
|
|
|
- ((chan_num - CHANNEL_NUM_15) *
|
|
|
- FREQ_MULTIPLIER_CONST_20MHZ);
|
|
|
-
|
|
|
- if (chan_num > CHANNEL_NUM_182 &&
|
|
|
- chan_num < CHANNEL_NUM_197)
|
|
|
- return ((chan_num * FREQ_MULTIPLIER_CONST_5MHZ) +
|
|
|
- CHANNEL_FREQ_4000);
|
|
|
-
|
|
|
- return CHANNEL_FREQ_5000 +
|
|
|
- (chan_num * FREQ_MULTIPLIER_CONST_5MHZ);
|
|
|
-}
|
|
|
-
|
|
|
/**
|
|
|
* qdf_nbuf_update_radiotap_ampdu_flags() - Update radiotap header ampdu flags
|
|
|
* @rx_status: Pointer to rx_status.
|
|
@@ -4195,11 +4168,10 @@ unsigned int qdf_nbuf_update_radiotap(struct mon_rx_status *rx_status,
|
|
|
|
|
|
/* IEEE80211_RADIOTAP_CHANNEL 2 x __le16 MHz, bitmap */
|
|
|
rthdr->it_present |= (1 << IEEE80211_RADIOTAP_CHANNEL);
|
|
|
- rx_status->chan_freq = radiotap_num_to_freq(rx_status->chan_num);
|
|
|
put_unaligned_le16(rx_status->chan_freq, &rtap_buf[rtap_len]);
|
|
|
rtap_len += 2;
|
|
|
/* Channel flags. */
|
|
|
- if (rx_status->chan_num > CHANNEL_NUM_35)
|
|
|
+ if (rx_status->chan_freq > CHANNEL_FREQ_5150)
|
|
|
rx_status->chan_flags = RADIOTAP_5G_SPECTRUM_CHANNEL;
|
|
|
else
|
|
|
rx_status->chan_flags = RADIOTAP_2G_SPECTRUM_CHANNEL;
|