aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuuso Oikarinen <juuso.oikarinen@nokia.com>2010-02-18 06:25:51 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-02-19 15:52:46 -0500
commit8bf29b0eb3ba38c8cf55e60976f124672cda7ab2 (patch)
tree231c8d42568d7a2985f02d20abf3f71c32cea78b
parentee444cf0501183df1640cd35bebd4250989bfe99 (diff)
wl1271: Fix ad-hoc SSID update
If re-configuring the SSID while ad-hoc was already enabled, the beacon template would be properly updated, but the SSID passed in the CMD_JOIN would not - hence filtering etc would not work properly. Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Reviewed-by: Kalle Valo <kalle.valo@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_main.c23
1 files changed, 16 insertions, 7 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index 459d9a0931f4..fb1e6a8088d8 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * This file is part of wl1271 2 * This file is part of wl1271
3 * 3 *
4 * Copyright (C) 2008-2009 Nokia Corporation 4 * Copyright (C) 2008-2010 Nokia Corporation
5 * 5 *
6 * Contact: Luciano Coelho <luciano.coelho@nokia.com> 6 * Contact: Luciano Coelho <luciano.coelho@nokia.com>
7 * 7 *
@@ -1604,6 +1604,7 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1604{ 1604{
1605 enum wl1271_cmd_ps_mode mode; 1605 enum wl1271_cmd_ps_mode mode;
1606 struct wl1271 *wl = hw->priv; 1606 struct wl1271 *wl = hw->priv;
1607 bool do_join = false;
1607 int ret; 1608 int ret;
1608 1609
1609 wl1271_debug(DEBUG_MAC80211, "mac80211 bss info changed"); 1610 wl1271_debug(DEBUG_MAC80211, "mac80211 bss info changed");
@@ -1646,6 +1647,9 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1646 dev_kfree_skb(beacon); 1647 dev_kfree_skb(beacon);
1647 if (ret < 0) 1648 if (ret < 0)
1648 goto out_sleep; 1649 goto out_sleep;
1650
1651 /* Need to update the SSID (for filtering etc) */
1652 do_join = true;
1649 } 1653 }
1650 } 1654 }
1651 1655
@@ -1664,12 +1668,8 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1664 goto out_sleep; 1668 goto out_sleep;
1665 } 1669 }
1666 1670
1667 ret = wl1271_cmd_join(wl); 1671 /* Need to update the BSSID (for filtering etc) */
1668 if (ret < 0) { 1672 do_join = true;
1669 wl1271_warning("cmd join failed %d", ret);
1670 goto out_sleep;
1671 }
1672 set_bit(WL1271_FLAG_JOINED, &wl->flags);
1673 } 1673 }
1674 1674
1675 if (changed & BSS_CHANGED_ASSOC) { 1675 if (changed & BSS_CHANGED_ASSOC) {
@@ -1736,6 +1736,15 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
1736 } 1736 }
1737 } 1737 }
1738 1738
1739 if (do_join) {
1740 ret = wl1271_cmd_join(wl);
1741 if (ret < 0) {
1742 wl1271_warning("cmd join failed %d", ret);
1743 goto out_sleep;
1744 }
1745 set_bit(WL1271_FLAG_JOINED, &wl->flags);
1746 }
1747
1739out_sleep: 1748out_sleep:
1740 wl1271_ps_elp_sleep(wl); 1749 wl1271_ps_elp_sleep(wl);
1741 1750