mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
wil6210: drop RX probe reponses with low SNR
FW now reports SNR for RX management frames. Drop probe responses with SNR lower than the configured threshold. Change-Id: Ife1863b07aebe5cb6097420290c0c10b590c2da1 Signed-off-by: Dedy Lansky <dlansky@codeaurora.org> CRs-Fixed: 2143032 Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org> [liord@codeaurora.org: fix merge conflicts] Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
This commit is contained in:
parent
abc9fe894f
commit
7ce702f31b
2 changed files with 9 additions and 4 deletions
|
|
@ -826,7 +826,7 @@ static void wmi_evt_rx_mgmt(struct wil6210_vif *vif, int id, void *d, int len)
|
|||
s32 signal;
|
||||
__le16 fc;
|
||||
u32 d_len;
|
||||
u16 d_status;
|
||||
s16 snr;
|
||||
|
||||
if (flen < 0) {
|
||||
wil_err(wil, "MGMT Rx: short event, len %d\n", len);
|
||||
|
|
@ -848,13 +848,13 @@ static void wmi_evt_rx_mgmt(struct wil6210_vif *vif, int id, void *d, int len)
|
|||
signal = 100 * data->info.rssi;
|
||||
else
|
||||
signal = data->info.sqi;
|
||||
d_status = le16_to_cpu(data->info.status);
|
||||
snr = le16_to_cpu(data->info.snr); /* 1/4 dB units */
|
||||
fc = rx_mgmt_frame->frame_control;
|
||||
|
||||
wil_dbg_wmi(wil, "MGMT Rx: channel %d MCS %d RSSI %d SQI %d%%\n",
|
||||
data->info.channel, data->info.mcs, data->info.rssi,
|
||||
data->info.sqi);
|
||||
wil_dbg_wmi(wil, "status 0x%04x len %d fc 0x%04x\n", d_status, d_len,
|
||||
wil_dbg_wmi(wil, "snr %ddB len %d fc 0x%04x\n", snr / 4, d_len,
|
||||
le16_to_cpu(fc));
|
||||
wil_dbg_wmi(wil, "qid %d mid %d cid %d\n",
|
||||
data->info.qid, data->info.mid, data->info.cid);
|
||||
|
|
@ -888,6 +888,11 @@ static void wmi_evt_rx_mgmt(struct wil6210_vif *vif, int id, void *d, int len)
|
|||
|
||||
wil_dbg_wmi(wil, "Capability info : 0x%04x\n", cap);
|
||||
|
||||
if (wil->snr_thresh.enabled && snr < wil->snr_thresh.omni) {
|
||||
wil_dbg_wmi(wil, "snr below threshold. dropping\n");
|
||||
return;
|
||||
}
|
||||
|
||||
bss = cfg80211_inform_bss_frame_data(wiphy, &bss_data,
|
||||
rx_mgmt_frame,
|
||||
d_len, GFP_KERNEL);
|
||||
|
|
|
|||
|
|
@ -2426,7 +2426,7 @@ struct wmi_rx_mgmt_info {
|
|||
u8 range;
|
||||
u8 sqi;
|
||||
__le16 stype;
|
||||
__le16 status;
|
||||
__le16 snr;
|
||||
__le32 len;
|
||||
/* Not resolved when == 0xFFFFFFFF == > Broadcast to all MIDS */
|
||||
u8 qid;
|
||||
|
|
|
|||
Loading…
Reference in a new issue