aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-04-01 04:38:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-04-06 16:55:12 -0400
commit40b359c61dc496508b77d1242726e40238e62128 (patch)
tree221b0fd0e38843722d04dda005c7a4bf1d14307f
parent1ed95388caf0ae41f905817e39cd7b5093bf8d7f (diff)
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: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 033cef01fd43..2494c967bb34 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1569,6 +1569,7 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1569 enum wl1271_cmd_ps_mode mode; 1569 enum wl1271_cmd_ps_mode mode;
1570 struct wl1271 *wl = hw->priv; 1570 struct wl1271 *wl = hw->priv;
1571 bool do_join = false; 1571 bool do_join = false;
1572 bool do_keepalive = false;
1572 int ret; 1573 int ret;
1573 1574
1574 wl1271_debug(DEBUG_MAC80211, "mac80211 bss info changed"); 1575 wl1271_debug(DEBUG_MAC80211, "mac80211 bss info changed");
@@ -1685,6 +1686,14 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1685 if (ret < 0) 1686 if (ret < 0)
1686 goto out_sleep; 1687 goto out_sleep;
1687 1688
1689 /*
1690 * This is awkward. The keep-alive configs must be done
1691 * *after* the join command, because otherwise it will
1692 * not work, but it must only be done *once* because
1693 * otherwise the firmware will start complaining.
1694 */
1695 do_keepalive = true;
1696
1688 /* enable the connection monitoring feature */ 1697 /* enable the connection monitoring feature */
1689 ret = wl1271_acx_conn_monit_params(wl, true); 1698 ret = wl1271_acx_conn_monit_params(wl, true);
1690 if (ret < 0) 1699 if (ret < 0)
@@ -1763,6 +1772,9 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1763 ret = wl1271_acx_aid(wl, wl->aid); 1772 ret = wl1271_acx_aid(wl, wl->aid);
1764 if (ret < 0) 1773 if (ret < 0)
1765 goto out_sleep; 1774 goto out_sleep;
1775 }
1776
1777 if (do_keepalive) {
1766 ret = wl1271_cmd_build_klv_null_data(wl); 1778 ret = wl1271_cmd_build_klv_null_data(wl);
1767 if (ret < 0) 1779 if (ret < 0)
1768 goto out_sleep; 1780 goto out_sleep;