aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/main.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-03-02 23:46:57 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-03-05 14:39:42 -0500
commit2554935b08f87e0ce1852635720d2d3ac91fc512 (patch)
tree16d87bb673f0a9e38a0e46cf6ad9ff9f19537bd8 /drivers/net/wireless/ath9k/main.c
parentb238e90e99fe51aed14d20eae8a6a1c04ce4ca30 (diff)
ath9k: Lock config_interface() callback with a mutex
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath9k/main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index a25dcf949f36..d5b0035e9b9e 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -2318,6 +2318,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
2318 u32 rfilt = 0; 2318 u32 rfilt = 0;
2319 int error, i; 2319 int error, i;
2320 2320
2321 mutex_lock(&sc->mutex);
2322
2321 /* TODO: Need to decide which hw opmode to use for multi-interface 2323 /* TODO: Need to decide which hw opmode to use for multi-interface
2322 * cases */ 2324 * cases */
2323 if (vif->type == NL80211_IFTYPE_AP && 2325 if (vif->type == NL80211_IFTYPE_AP &&
@@ -2373,8 +2375,10 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
2373 ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq); 2375 ath9k_hw_stoptxdma(sc->sc_ah, sc->beacon.beaconq);
2374 2376
2375 error = ath_beacon_alloc(sc, 0); 2377 error = ath_beacon_alloc(sc, 0);
2376 if (error != 0) 2378 if (error != 0) {
2379 mutex_unlock(&sc->mutex);
2377 return error; 2380 return error;
2381 }
2378 2382
2379 ath_beacon_config(sc, 0); 2383 ath_beacon_config(sc, 0);
2380 } 2384 }
@@ -2393,6 +2397,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
2393 if (vif->type == NL80211_IFTYPE_ADHOC) 2397 if (vif->type == NL80211_IFTYPE_ADHOC)
2394 ath_update_chainmask(sc, 0); 2398 ath_update_chainmask(sc, 0);
2395 2399
2400 mutex_unlock(&sc->mutex);
2401
2396 return 0; 2402 return 0;
2397} 2403}
2398 2404