Make the freq/band report in openwifi_rx_interrupt from our driver internal variable instead of Linux setting. The latter might be asynchronous and cause issue: if the received management frame has wrong freq/band info, the Linux mac80211 might reject some state or have issue according to Linux kernel doc somewhere

This commit is contained in:
Xianjun Jiao 2022-03-29 12:21:25 +02:00
parent 0dc3d33d6e
commit 9c7deabd59

View File

@ -500,8 +500,12 @@ static irqreturn_t openwifi_rx_interrupt(int irq, void *dev_id)
// def in ieee80211_rate openwifi_rates 0~11. 0~3 11b(1M~11M), 4~11 11a/g(6M~54M)
rx_status.rate_idx = wifi_rate_table_mapping[rate_idx];
rx_status.signal = signal;
rx_status.freq = dev->conf.chandef.chan->center_freq;
rx_status.band = dev->conf.chandef.chan->band;
// rx_status.freq = dev->conf.chandef.chan->center_freq;
rx_status.freq = priv->actual_rx_lo;
// rx_status.band = dev->conf.chandef.chan->band;
rx_status.band = (rx_status.freq<2500?NL80211_BAND_2GHZ:NL80211_BAND_5GHZ);
rx_status.mactime = ( ( (u64)tsft_low ) | ( ((u64)tsft_high)<<32 ) );
rx_status.flag |= RX_FLAG_MACTIME_START;
if (!fcs_ok)