aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis R. Rodriguez <lrodriguez@atheros.com>2009-09-09 18:05:00 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-10-07 16:39:23 -0400
commit269ad8120b2e1f01a7bcea4bdb175142a0e62171 (patch)
treecf50b71cd3d2573d2894f3d0a3c551e1ab03cf93
parent766ec4a9a813ae262b61842020f150f865c1b10a (diff)
ath9k: simplify ath_btcoex_bt_stomp()
The second argument is always the hardware bt coex struct, so remove it, and rename the function on the path with a ath9k_ prefix. Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index a096e4c8e49a..0788a2724416 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1332,47 +1332,48 @@ static void ath_detect_bt_priority(struct ath_softc *sc)
1332 } 1332 }
1333} 1333}
1334 1334
1335static void ath_btcoex_set_weight(struct ath_btcoex_hw *btcoex_hw, 1335static void ath9k_hw_btcoex_set_weight(struct ath_hw *ah,
1336 u32 bt_weight, 1336 u32 bt_weight,
1337 u32 wlan_weight) 1337 u32 wlan_weight)
1338{ 1338{
1339 struct ath_btcoex_hw *btcoex_hw = &ah->btcoex_hw;
1340
1339 btcoex_hw->bt_coex_weights = SM(bt_weight, AR_BTCOEX_BT_WGHT) | 1341 btcoex_hw->bt_coex_weights = SM(bt_weight, AR_BTCOEX_BT_WGHT) |
1340 SM(wlan_weight, AR_BTCOEX_WL_WGHT); 1342 SM(wlan_weight, AR_BTCOEX_WL_WGHT);
1341} 1343}
1342 1344
1343static void ath9k_hw_btcoex_init_weight(struct ath_hw *ah) 1345static void ath9k_hw_btcoex_init_weight(struct ath_hw *ah)
1344{ 1346{
1345 ath_btcoex_set_weight(&ah->btcoex_hw, AR_BT_COEX_WGHT, 1347 ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT, AR_STOMP_LOW_WLAN_WGHT);
1346 AR_STOMP_LOW_WLAN_WGHT);
1347} 1348}
1348 1349
1349/* 1350/*
1350 * Configures appropriate weight based on stomp type. 1351 * Configures appropriate weight based on stomp type.
1351 */ 1352 */
1352static void ath_btcoex_bt_stomp(struct ath_softc *sc, 1353static void ath9k_btcoex_bt_stomp(struct ath_softc *sc,
1353 struct ath_btcoex_hw *btcoex_hw, 1354 enum ath_stomp_type stomp_type)
1354 int stomp_type)
1355{ 1355{
1356 struct ath_hw *ah = sc->sc_ah;
1356 1357
1357 switch (stomp_type) { 1358 switch (stomp_type) {
1358 case ATH_BTCOEX_STOMP_ALL: 1359 case ATH_BTCOEX_STOMP_ALL:
1359 ath_btcoex_set_weight(btcoex_hw, AR_BT_COEX_WGHT, 1360 ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
1360 AR_STOMP_ALL_WLAN_WGHT); 1361 AR_STOMP_ALL_WLAN_WGHT);
1361 break; 1362 break;
1362 case ATH_BTCOEX_STOMP_LOW: 1363 case ATH_BTCOEX_STOMP_LOW:
1363 ath_btcoex_set_weight(btcoex_hw, AR_BT_COEX_WGHT, 1364 ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
1364 AR_STOMP_LOW_WLAN_WGHT); 1365 AR_STOMP_LOW_WLAN_WGHT);
1365 break; 1366 break;
1366 case ATH_BTCOEX_STOMP_NONE: 1367 case ATH_BTCOEX_STOMP_NONE:
1367 ath_btcoex_set_weight(btcoex_hw, AR_BT_COEX_WGHT, 1368 ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT,
1368 AR_STOMP_NONE_WLAN_WGHT); 1369 AR_STOMP_NONE_WLAN_WGHT);
1369 break; 1370 break;
1370 default: 1371 default:
1371 DPRINTF(sc->sc_ah, ATH_DBG_BTCOEX, "Invalid Stomptype\n"); 1372 DPRINTF(ah, ATH_DBG_BTCOEX, "Invalid Stomptype\n");
1372 break; 1373 break;
1373 } 1374 }
1374 1375
1375 ath9k_hw_btcoex_enable(sc->sc_ah); 1376 ath9k_hw_btcoex_enable(ah);
1376} 1377}
1377 1378
1378/* 1379/*
@@ -1385,13 +1386,12 @@ static void ath_btcoex_period_timer(unsigned long data)
1385 struct ath_softc *sc = (struct ath_softc *) data; 1386 struct ath_softc *sc = (struct ath_softc *) data;
1386 struct ath_hw *ah = sc->sc_ah; 1387 struct ath_hw *ah = sc->sc_ah;
1387 struct ath_btcoex *btcoex = &sc->btcoex; 1388 struct ath_btcoex *btcoex = &sc->btcoex;
1388 struct ath_btcoex_hw *btcoex_hw= &ah->btcoex_hw;
1389 1389
1390 ath_detect_bt_priority(sc); 1390 ath_detect_bt_priority(sc);
1391 1391
1392 spin_lock_bh(&btcoex->btcoex_lock); 1392 spin_lock_bh(&btcoex->btcoex_lock);
1393 1393
1394 ath_btcoex_bt_stomp(sc, btcoex_hw, btcoex->bt_stomp_type); 1394 ath9k_btcoex_bt_stomp(sc, btcoex->bt_stomp_type);
1395 1395
1396 spin_unlock_bh(&btcoex->btcoex_lock); 1396 spin_unlock_bh(&btcoex->btcoex_lock);
1397 1397
@@ -1420,16 +1420,15 @@ static void ath_btcoex_no_stomp_timer(void *arg)
1420 struct ath_softc *sc = (struct ath_softc *)arg; 1420 struct ath_softc *sc = (struct ath_softc *)arg;
1421 struct ath_hw *ah = sc->sc_ah; 1421 struct ath_hw *ah = sc->sc_ah;
1422 struct ath_btcoex *btcoex = &sc->btcoex; 1422 struct ath_btcoex *btcoex = &sc->btcoex;
1423 struct ath_btcoex_hw *btcoex_hw= &ah->btcoex_hw;
1424 1423
1425 DPRINTF(ah, ATH_DBG_BTCOEX, "no stomp timer running \n"); 1424 DPRINTF(ah, ATH_DBG_BTCOEX, "no stomp timer running \n");
1426 1425
1427 spin_lock_bh(&btcoex->btcoex_lock); 1426 spin_lock_bh(&btcoex->btcoex_lock);
1428 1427
1429 if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW) 1428 if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_LOW)
1430 ath_btcoex_bt_stomp(sc, btcoex_hw, ATH_BTCOEX_STOMP_NONE); 1429 ath9k_btcoex_bt_stomp(sc, ATH_BTCOEX_STOMP_NONE);
1431 else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL) 1430 else if (btcoex->bt_stomp_type == ATH_BTCOEX_STOMP_ALL)
1432 ath_btcoex_bt_stomp(sc, btcoex_hw, ATH_BTCOEX_STOMP_LOW); 1431 ath9k_btcoex_bt_stomp(sc, ATH_BTCOEX_STOMP_LOW);
1433 1432
1434 spin_unlock_bh(&btcoex->btcoex_lock); 1433 spin_unlock_bh(&btcoex->btcoex_lock);
1435} 1434}