aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath5k/ahb.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-04-13 21:56:46 +0200
committerJohn W. Linville <linville@tuxdriver.com>2011-04-14 15:35:10 -0400
commit3a9dddea89eb2132ba919fe04cb3b44a3b1e6db7 (patch)
treeb828fc097a87e692f1db3e9c5b70c2fa9f383d46 /drivers/net/wireless/ath/ath5k/ahb.c
parent32377b6cf75247cbdd0640efb43bef992efe3b68 (diff)
downloadkernel_samsung_smdk4412-3a9dddea89eb2132ba919fe04cb3b44a3b1e6db7.zip
kernel_samsung_smdk4412-3a9dddea89eb2132ba919fe04cb3b44a3b1e6db7.tar.gz
kernel_samsung_smdk4412-3a9dddea89eb2132ba919fe04cb3b44a3b1e6db7.tar.bz2
ath5k: disable 5 GHz support for the dualband PHY chip on dual-radio AR5312
There are two variants of AR5312 dual-band devices, one single-radio and the other one dual-radio. On the dual-radio board, the first MAC only supports 5 GHz, even though it has a dual-band PHY. The 2.4 GHz part of this phy is used in pass-through mode, connecting the second MAC with the second PHY. Disable 2.4 GHz for the first MAC on an AR5312, but only if the board configuration indicates a dual-radio device. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Tested-by: Sedat Dilek <sedat.dilek@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/ahb.c')
-rw-r--r--drivers/net/wireless/ath/ath5k/ahb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c
index 1374e64..ea99827 100644
--- a/drivers/net/wireless/ath/ath5k/ahb.c
+++ b/drivers/net/wireless/ath/ath5k/ahb.c
@@ -160,6 +160,16 @@ static int ath_ahb_probe(struct platform_device *pdev)
else
reg |= AR5K_AR5312_ENABLE_WLAN1;
__raw_writel(reg, (void __iomem *) AR5K_AR5312_ENABLE);
+
+ /*
+ * On a dual-band AR5312, the multiband radio is only
+ * used as pass-through. Disable 2 GHz support in the
+ * driver for it
+ */
+ if (to_platform_device(sc->dev)->id == 0 &&
+ (bcfg->config->flags & (BD_WLAN0|BD_WLAN1)) ==
+ (BD_WLAN1|BD_WLAN0))
+ __set_bit(ATH_STAT_2G_DISABLED, sc->status);
}
ret = ath5k_init_softc(sc, &ath_ahb_bus_ops);