Commit 40b359c6 authored by Juuso Oikarinen's avatar Juuso Oikarinen Committed by John W. Linville

wl1271: Fix keep-alive related command error

The firmware does not like the host configuring the keep-alive after it has
been once configured after a join-operation. Instead, it will complain about
invalid parameters, which do not break functionality, but do not look nice
in the syslog either.

This patch prevents the complaints by only configuring the keep-alive once
for an association, after the first time join is performed with the correct
bssid.
Signed-off-by: default avatarJuuso Oikarinen <juuso.oikarinen@nokia.com>
Reviewed-by: default avatarTeemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1ed95388
...@@ -1569,6 +1569,7 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1569,6 +1569,7 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
enum wl1271_cmd_ps_mode mode; enum wl1271_cmd_ps_mode mode;
struct wl1271 *wl = hw->priv; struct wl1271 *wl = hw->priv;
bool do_join = false; bool do_join = false;
bool do_keepalive = false;
int ret; int ret;
wl1271_debug(DEBUG_MAC80211, "mac80211 bss info changed"); wl1271_debug(DEBUG_MAC80211, "mac80211 bss info changed");
...@@ -1685,6 +1686,14 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1685,6 +1686,14 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
if (ret < 0) if (ret < 0)
goto out_sleep; goto out_sleep;
/*
* This is awkward. The keep-alive configs must be done
* *after* the join command, because otherwise it will
* not work, but it must only be done *once* because
* otherwise the firmware will start complaining.
*/
do_keepalive = true;
/* enable the connection monitoring feature */ /* enable the connection monitoring feature */
ret = wl1271_acx_conn_monit_params(wl, true); ret = wl1271_acx_conn_monit_params(wl, true);
if (ret < 0) if (ret < 0)
...@@ -1763,6 +1772,9 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw, ...@@ -1763,6 +1772,9 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
ret = wl1271_acx_aid(wl, wl->aid); ret = wl1271_acx_aid(wl, wl->aid);
if (ret < 0) if (ret < 0)
goto out_sleep; goto out_sleep;
}
if (do_keepalive) {
ret = wl1271_cmd_build_klv_null_data(wl); ret = wl1271_cmd_build_klv_null_data(wl);
if (ret < 0) if (ret < 0)
goto out_sleep; goto out_sleep;
......
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