Commit 097f8821 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luciano Coelho

wl12xx: always initialize AP-mode max power level

Sometimes we only get the Tx power level via op->config when the FW is
off. Record the received power level when this happens and use it to
initialize the firmware during boot.
Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 6cfa5cff
...@@ -90,7 +90,7 @@ int wl1271_acx_tx_power(struct wl1271 *wl, int power) ...@@ -90,7 +90,7 @@ int wl1271_acx_tx_power(struct wl1271 *wl, int power)
struct acx_current_tx_power *acx; struct acx_current_tx_power *acx;
int ret; int ret;
wl1271_debug(DEBUG_ACX, "acx dot11_cur_tx_pwr"); wl1271_debug(DEBUG_ACX, "acx dot11_cur_tx_pwr %d", power);
if (power < 0 || power > 25) if (power < 0 || power > 25)
return -EINVAL; return -EINVAL;
......
...@@ -455,6 +455,11 @@ static int wl1271_ap_hw_init(struct wl1271 *wl) ...@@ -455,6 +455,11 @@ static int wl1271_ap_hw_init(struct wl1271 *wl)
if (ret < 0) if (ret < 0)
return ret; return ret;
/* initialize Tx power */
ret = wl1271_acx_tx_power(wl, wl->power_level);
if (ret < 0)
return ret;
return 0; return 0;
} }
......
...@@ -2278,6 +2278,9 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -2278,6 +2278,9 @@ static int wl1271_op_config(struct ieee80211_hw *hw, u32 changed)
wl->channel = channel; wl->channel = channel;
} }
if ((changed & IEEE80211_CONF_CHANGE_POWER))
wl->power_level = conf->power_level;
goto out; goto out;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment