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sbCBvdXQgdGhlIGFjdHVhbCBwcm9jZXNzaW5nDQo+IGludG8gYSBoZWxwZXIgZnVu
Y3Rpb24sIGFuZCB0aGVuIGFib3J0IHRoYXQgZnVuY3Rpb24gZWFybHkgaWYgdGhlDQo+IE5PX1NJ
R05BTF9WQUwgZmxhZyBpcyBzZXQuDQo+IA0KDQpTaW5jZSBJIGFtIHdvcmtpbmcgb24gYW4gb2xk
ZXIgdmVyc2lvbiBvZiBtYWM4MDIxMSwgSSB3YXMgYWltaW5nIHRvDQprZWVwIGNoYW5nZXMgbWlu
aW1hbCB0byBhdm9pZCBicmVha2luZyBzb21ldGhpbmcgSSBjb3VsZCBub3QgdGVzdC4uLg0KSSds
bCBoYXZlIGEgbG9vayB0byB5b3VyIHN1Z2dlc3Rpb24uDQoNCj4gam9oYW5uZXMNCg==
On Wed, 2018-02-14 at 13:51 +0000, Jean Pierre TOSONI wrote:
> When the low-level driver returns an invalid RSSI indication,
> set the signal value to 0 as an indication to the upper layer.
>
> Also, skip average level computation if signal is invalid.
Thanks for the patch!
> /* Track average RSSI from the Beacon frames of the current AP */
> + if (rx_status->flag & RX_FLAG_NO_SIGNAL_VAL)
> + goto skip_signal_processing;
> if (ifmgd->flags & IEEE80211_STA_RESET_SIGNAL_AVE) {
> ifmgd->flags &= ~IEEE80211_STA_RESET_SIGNAL_AVE;
> ewma_beacon_signal_init(&ifmgd->ave_beacon_signal);
> @@ -3454,6 +3456,7 @@ static void ieee80211_rx_mgmt_beacon(struct ieee80211_sub_if_data *sdata,
> sig, GFP_KERNEL);
> }
> }
> +skip_signal_processing:
Can't say I like this - how about we pull out the actual processing
into a helper function, and then abort that function early if the
NO_SIGNAL_VAL flag is set.
johannes