summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/phy.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-06-07 15:13:46 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-06-07 15:13:46 -0400
commit9d88477c41904127ab9ae1f3b5b4a39bf6474043 (patch)
treef50d5185ac89a9fd76d7cb087b952d5c55d5063b /drivers/net/wireless/ath/ath5k/phy.c
parent11b7c60988e5fbabb4e150612931cc068559af16 (diff)
parent35dd0509b21e4b5bab36b9eb80c8dab0322f5007 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-core.h
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/phy.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/phy.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/phy.c b/drivers/net/wireless/ath/ath5k/phy.c
index 2b3f7a7aded..34ba576d274 100644
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1793,6 +1793,13 @@ ath5k_hw_set_antenna_mode(struct ath5k_hw *ah, u8 ant_mode)
u8 def_ant, tx_ant, ee_mode;
u32 sta_id1 = 0;
+ /* if channel is not initialized yet we can't set the antennas
+ * so just store the mode. it will be set on the next reset */
+ if (channel == NULL) {
+ ah->ah_ant_mode = ant_mode;
+ return;
+ }
+
def_ant = ah->ah_def_ant;
switch (channel->hw_value & CHANNEL_MODES) {