Skip to content

Commit

Permalink
wlcore: do not report noise level in get survey op
Browse files Browse the repository at this point in the history
The get survey op expects the low level driver to report
the noise level for a a given channel.

The noise calculated in wlcore is (rssi-snr/2), but since
the snr reported by the FW is a derivative from the rssi
this calculation is useless, and should not be reported
to the user space.

Reporting incorrect noise, results in the wpa_supplicant
miscalculating the roaming candidate priority, thus causing
a situation where an AP with a lower rssi level would be
chosen over a better AP.

Signed-off-by: Yoni Divinsky <yoni.divinsky@ti.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Yoni Divinsky authored and Luciano Coelho committed Jun 21, 2012
1 parent bf7c46a commit add779a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/net/wireless/ti/wlcore/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4108,16 +4108,13 @@ static u64 wl1271_op_get_tsf(struct ieee80211_hw *hw,
static int wl1271_op_get_survey(struct ieee80211_hw *hw, int idx,
struct survey_info *survey)
{
struct wl1271 *wl = hw->priv;
struct ieee80211_conf *conf = &hw->conf;

if (idx != 0)
return -ENOENT;

survey->channel = conf->channel;
survey->filled = SURVEY_INFO_NOISE_DBM;
survey->noise = wl->noise;

survey->filled = 0;
return 0;
}

Expand Down

0 comments on commit add779a

Please sign in to comment.