diff options
Diffstat (limited to 'drivers/net/wireless/p54/p54common.c')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 63 |
1 files changed, 25 insertions, 38 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 71394968d450..b85785291803 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -2204,41 +2204,6 @@ out: | |||
2204 | return ret; | 2204 | return ret; |
2205 | } | 2205 | } |
2206 | 2206 | ||
2207 | static int p54_config_interface(struct ieee80211_hw *dev, | ||
2208 | struct ieee80211_vif *vif, | ||
2209 | struct ieee80211_if_conf *conf) | ||
2210 | { | ||
2211 | struct p54_common *priv = dev->priv; | ||
2212 | int ret = 0; | ||
2213 | |||
2214 | mutex_lock(&priv->conf_mutex); | ||
2215 | if (conf->changed & IEEE80211_IFCC_BSSID) { | ||
2216 | memcpy(priv->bssid, conf->bssid, ETH_ALEN); | ||
2217 | ret = p54_setup_mac(dev); | ||
2218 | if (ret) | ||
2219 | goto out; | ||
2220 | } | ||
2221 | |||
2222 | if (conf->changed & IEEE80211_IFCC_BEACON) { | ||
2223 | ret = p54_scan(dev, P54_SCAN_EXIT, 0); | ||
2224 | if (ret) | ||
2225 | goto out; | ||
2226 | ret = p54_setup_mac(dev); | ||
2227 | if (ret) | ||
2228 | goto out; | ||
2229 | ret = p54_beacon_update(dev, vif); | ||
2230 | if (ret) | ||
2231 | goto out; | ||
2232 | ret = p54_set_edcf(dev); | ||
2233 | if (ret) | ||
2234 | goto out; | ||
2235 | } | ||
2236 | |||
2237 | out: | ||
2238 | mutex_unlock(&priv->conf_mutex); | ||
2239 | return ret; | ||
2240 | } | ||
2241 | |||
2242 | static void p54_configure_filter(struct ieee80211_hw *dev, | 2207 | static void p54_configure_filter(struct ieee80211_hw *dev, |
2243 | unsigned int changed_flags, | 2208 | unsigned int changed_flags, |
2244 | unsigned int *total_flags, | 2209 | unsigned int *total_flags, |
@@ -2342,8 +2307,32 @@ static void p54_bss_info_changed(struct ieee80211_hw *dev, | |||
2342 | u32 changed) | 2307 | u32 changed) |
2343 | { | 2308 | { |
2344 | struct p54_common *priv = dev->priv; | 2309 | struct p54_common *priv = dev->priv; |
2310 | int ret; | ||
2311 | |||
2312 | mutex_lock(&priv->conf_mutex); | ||
2313 | if (changed & BSS_CHANGED_BSSID) { | ||
2314 | memcpy(priv->bssid, info->bssid, ETH_ALEN); | ||
2315 | ret = p54_setup_mac(dev); | ||
2316 | if (ret) | ||
2317 | goto out; | ||
2318 | } | ||
2319 | |||
2320 | if (changed & BSS_CHANGED_BEACON) { | ||
2321 | ret = p54_scan(dev, P54_SCAN_EXIT, 0); | ||
2322 | if (ret) | ||
2323 | goto out; | ||
2324 | ret = p54_setup_mac(dev); | ||
2325 | if (ret) | ||
2326 | goto out; | ||
2327 | ret = p54_beacon_update(dev, vif); | ||
2328 | if (ret) | ||
2329 | goto out; | ||
2330 | } | ||
2331 | /* XXX: this mimics having two callbacks... clean up */ | ||
2332 | out: | ||
2333 | mutex_unlock(&priv->conf_mutex); | ||
2345 | 2334 | ||
2346 | if (changed & BSS_CHANGED_ERP_SLOT) { | 2335 | if (changed & (BSS_CHANGED_ERP_SLOT | BSS_CHANGED_BEACON)) { |
2347 | priv->use_short_slot = info->use_short_slot; | 2336 | priv->use_short_slot = info->use_short_slot; |
2348 | p54_set_edcf(dev); | 2337 | p54_set_edcf(dev); |
2349 | } | 2338 | } |
@@ -2364,7 +2353,6 @@ static void p54_bss_info_changed(struct ieee80211_hw *dev, | |||
2364 | p54_setup_mac(dev); | 2353 | p54_setup_mac(dev); |
2365 | } | 2354 | } |
2366 | } | 2355 | } |
2367 | |||
2368 | } | 2356 | } |
2369 | 2357 | ||
2370 | static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd, | 2358 | static int p54_set_key(struct ieee80211_hw *dev, enum set_key_cmd cmd, |
@@ -2619,7 +2607,6 @@ static const struct ieee80211_ops p54_ops = { | |||
2619 | .sta_notify = p54_sta_notify, | 2607 | .sta_notify = p54_sta_notify, |
2620 | .set_key = p54_set_key, | 2608 | .set_key = p54_set_key, |
2621 | .config = p54_config, | 2609 | .config = p54_config, |
2622 | .config_interface = p54_config_interface, | ||
2623 | .bss_info_changed = p54_bss_info_changed, | 2610 | .bss_info_changed = p54_bss_info_changed, |
2624 | .configure_filter = p54_configure_filter, | 2611 | .configure_filter = p54_configure_filter, |
2625 | .conf_tx = p54_conf_tx, | 2612 | .conf_tx = p54_conf_tx, |