Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328233
b: refs/heads/master
c: e09f2dc
h: refs/heads/master
i:
  328231: e67e0e7
v: v3
  • Loading branch information
Sujith Manoharan authored and John W. Linville committed Sep 24, 2012
1 parent 1a53a10 commit 9ef670b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 362cd03fd828af38327fb448416c07a7c7a8e3cb
refs/heads/master: e09f2dc73c5c4927cbc55d9c29bef4209c2d866d
1 change: 1 addition & 0 deletions trunk/drivers/net/wireless/ath/ath.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ struct ath_common {

bool btcoex_enabled;
bool disable_ani;
bool antenna_diversity;
};

struct sk_buff *ath_rxbuf_alloc(struct ath_common *common,
Expand Down
4 changes: 4 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/antenna.c
Original file line number Diff line number Diff line change
Expand Up @@ -776,6 +776,7 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
void ath_ant_comb_update(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath_hw_antcomb_conf div_ant_conf;
u8 lna_conf;

Expand All @@ -790,4 +791,7 @@ void ath_ant_comb_update(struct ath_softc *sc)
div_ant_conf.alt_lna_conf = lna_conf;

ath9k_hw_antdiv_comb_conf_set(ah, &div_ant_conf);

if (common->antenna_diversity)
ath9k_hw_antctrl_shared_chain_lnadiv(ah, true);
}
12 changes: 12 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ static int ath9k_btcoex_enable;
module_param_named(btcoex_enable, ath9k_btcoex_enable, int, 0444);
MODULE_PARM_DESC(btcoex_enable, "Enable wifi-BT coexistence");

static int ath9k_enable_diversity;
module_param_named(enable_diversity, ath9k_enable_diversity, int, 0444);
MODULE_PARM_DESC(enable_diversity, "Enable Antenna diversity for AR9565");

bool is_ath9k_unloaded;
/* We use the hw_value as an index into our private channel structure */

Expand Down Expand Up @@ -546,6 +550,14 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
common->debug_mask = ath9k_debug;
common->btcoex_enabled = ath9k_btcoex_enable == 1;
common->disable_ani = false;

/*
* Enable Antenna diversity only when BTCOEX is disabled
* and the user manually requests the feature.
*/
if (!common->btcoex_enabled && ath9k_enable_diversity)
common->antenna_diversity = 1;

spin_lock_init(&common->cc_lock);

spin_lock_init(&sc->sc_serial_rw);
Expand Down

0 comments on commit 9ef670b

Please sign in to comment.