diff options
author | Kalle Valo <kalle.valo@nokia.com> | 2009-11-26 03:56:06 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-07 16:50:12 -0500 |
commit | de8df1ea489d80106ea82d4a6323e83d376913fb (patch) | |
tree | 2d84ae6ebb1d0600d2dfb5018b124a504375784a /drivers | |
parent | e84217a9fc6264fe4e73fc85cdfff185b71b7443 (diff) |
wl1251: fix bssid handling
bssid needs to be copied first in wl1251_op_bss_info_changed(), otherwise
templates will have incorrect bssid and power save will not work
correctly.
Signed-off-by: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1251_main.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1251_main.c b/drivers/net/wireless/wl12xx/wl1251_main.c index 8353139d85df..50d17fc00785 100644 --- a/drivers/net/wireless/wl12xx/wl1251_main.c +++ b/drivers/net/wireless/wl12xx/wl1251_main.c | |||
@@ -1110,6 +1110,21 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1110 | if (ret < 0) | 1110 | if (ret < 0) |
1111 | goto out; | 1111 | goto out; |
1112 | 1112 | ||
1113 | if (changed & BSS_CHANGED_BSSID) { | ||
1114 | memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN); | ||
1115 | |||
1116 | ret = wl1251_build_null_data(wl); | ||
1117 | if (ret < 0) | ||
1118 | goto out; | ||
1119 | |||
1120 | if (wl->bss_type != BSS_TYPE_IBSS) { | ||
1121 | ret = wl1251_join(wl, wl->bss_type, wl->channel, | ||
1122 | wl->beacon_int, wl->dtim_period); | ||
1123 | if (ret < 0) | ||
1124 | goto out_sleep; | ||
1125 | } | ||
1126 | } | ||
1127 | |||
1113 | if (changed & BSS_CHANGED_ASSOC) { | 1128 | if (changed & BSS_CHANGED_ASSOC) { |
1114 | if (bss_conf->assoc) { | 1129 | if (bss_conf->assoc) { |
1115 | wl->beacon_int = bss_conf->beacon_int; | 1130 | wl->beacon_int = bss_conf->beacon_int; |
@@ -1169,21 +1184,6 @@ static void wl1251_op_bss_info_changed(struct ieee80211_hw *hw, | |||
1169 | } | 1184 | } |
1170 | } | 1185 | } |
1171 | 1186 | ||
1172 | if (changed & BSS_CHANGED_BSSID) { | ||
1173 | memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN); | ||
1174 | |||
1175 | ret = wl1251_build_null_data(wl); | ||
1176 | if (ret < 0) | ||
1177 | goto out; | ||
1178 | |||
1179 | if (wl->bss_type != BSS_TYPE_IBSS) { | ||
1180 | ret = wl1251_join(wl, wl->bss_type, wl->channel, | ||
1181 | wl->beacon_int, wl->dtim_period); | ||
1182 | if (ret < 0) | ||
1183 | goto out_sleep; | ||
1184 | } | ||
1185 | } | ||
1186 | |||
1187 | if (changed & BSS_CHANGED_BEACON) { | 1187 | if (changed & BSS_CHANGED_BEACON) { |
1188 | beacon = ieee80211_beacon_get(hw, vif); | 1188 | beacon = ieee80211_beacon_get(hw, vif); |
1189 | ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data, | 1189 | ret = wl1251_cmd_template_set(wl, CMD_BEACON, beacon->data, |