diff options
author | Sujith Manoharan <c_manoha@qualcomm.com> | 2012-09-15 22:36:56 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-09-24 14:59:11 -0400 |
commit | e09f2dc73c5c4927cbc55d9c29bef4209c2d866d (patch) | |
tree | d7c64285178dcf6710f925aed881c7276bf3c1ba /drivers/net/wireless/ath/ath9k/init.c | |
parent | 362cd03fd828af38327fb448416c07a7c7a8e3cb (diff) |
ath9k: Add a module parameter to enable diversity
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 706255222598..fad3ccd5cd91 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -46,6 +46,10 @@ static int ath9k_btcoex_enable; | |||
46 | module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444); | 46 | module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444); |
47 | MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence"); | 47 | MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence"); |
48 | 48 | ||
49 | static int ath9k_enable_diversity; | ||
50 | module_param_named(enable_diversity, ath9k_enable_diversity, int, 0444); | ||
51 | MODULE_PARM_DESC(enable_diversity, "Enable Antenna diversity for AR9565"); | ||
52 | |||
49 | bool is_ath9k_unloaded; | 53 | bool is_ath9k_unloaded; |
50 | /* We use the hw_value as an index into our private channel structure */ | 54 | /* We use the hw_value as an index into our private channel structure */ |
51 | 55 | ||
@@ -546,6 +550,14 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc, | |||
546 | common->debug_mask = ath9k_debug; | 550 | common->debug_mask = ath9k_debug; |
547 | common->btcoex_enabled = ath9k_btcoex_enable == 1; | 551 | common->btcoex_enabled = ath9k_btcoex_enable == 1; |
548 | common->disable_ani = false; | 552 | common->disable_ani = false; |
553 | |||
554 | /* | ||
555 | * Enable Antenna diversity only when BTCOEX is disabled | ||
556 | * and the user manually requests the feature. | ||
557 | */ | ||
558 | if (!common->btcoex_enabled && ath9k_enable_diversity) | ||
559 | common->antenna_diversity = 1; | ||
560 | |||
549 | spin_lock_init(&common->cc_lock); | 561 | spin_lock_init(&common->cc_lock); |
550 | 562 | ||
551 | spin_lock_init(&sc->sc_serial_rw); | 563 | spin_lock_init(&sc->sc_serial_rw); |