move power_level into the per-interface data.
mac80211 configures some values (e.g. band, channel)
globally, while we configure them per-interface.
In order to make it easier to keep track of the
configured value for each value while keeping sync
with mac80211, save these values both globally
and per-vif.
Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
return ret;
/* initialize Tx power */
- ret = wl1271_acx_tx_power(wl, wlvif, wl->power_level);
+ ret = wl1271_acx_tx_power(wl, wlvif, wlvif->power_level);
if (ret < 0)
return ret;
*/
wlvif->band = wl->band;
wlvif->channel = wl->channel;
+ wlvif->power_level = wl->power_level;
INIT_WORK(&wlvif->rx_streaming_enable_work,
wl1271_rx_streaming_enable_work);
wlvif->basic_rate, true);
}
- if (conf->power_level != wl->power_level) {
+ if (conf->power_level != wlvif->power_level) {
ret = wl1271_acx_tx_power(wl, wlvif, conf->power_level);
if (ret < 0)
goto out_sleep;
wl->power_level = conf->power_level;
+ wlvif->power_level = conf->power_level;
}
out_sleep:
/* retry counter for PSM entries */
u8 psm_entry_retry;
+ /* in dBm */
+ int power_level;
+
int rssi_thold;
int last_rssi_event;