Commit 6135ad0e authored by Jérôme Pouiller's avatar Jérôme Pouiller Committed by Greg Kroah-Hartman
Browse files

staging: wfx: fix handling of frames without RSSI data



It seems that in the old days, the RSSI information could be missing. In
this case, in order to not pollute the RSSI stats, the frame was
dropped (!).

It is far better to mark the frame with the flag RX_FLAG_NO_SIGNAL_VAL.

In add, the problem seems now fixed in the firmware (at least, it has
not been encountered with recent firmwares).

Signed-off-by: default avatarJérôme Pouiller <jerome.pouiller@silabs.com>
Link: https://lore.kernel.org/r/20200701150707.222985-10-Jerome.Pouiller@silabs.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9aa1750
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -73,12 +73,6 @@ void wfx_rx_cb(struct wfx_vif *wvif,

	memset(hdr, 0, sizeof(*hdr));

	// FIXME: Why do we drop these frames?
	if (!arg->rcpi_rssi &&
	    (ieee80211_is_probe_resp(frame->frame_control) ||
	     ieee80211_is_beacon(frame->frame_control)))
		goto drop;

	if (arg->status == HIF_STATUS_RX_FAIL_MIC)
		hdr->flag |= RX_FLAG_MMIC_ERROR;
	else if (arg->status)
@@ -102,6 +96,10 @@ void wfx_rx_cb(struct wfx_vif *wvif,
		hdr->rate_idx = arg->rxed_rate;
	}

	if (!arg->rcpi_rssi) {
		hdr->flag |= RX_FLAG_NO_SIGNAL_VAL;
		dev_info(wvif->wdev->dev, "received frame without RSSI data\n");
	}
	hdr->signal = arg->rcpi_rssi / 2 - 110;
	hdr->antenna = 0;