aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>2011-06-15 11:24:22 +0200
committerPhilippe LANGLAIS <philippe.langlais@stericsson.com>2011-06-22 11:32:16 +0200
commitb40bde281a6ef70959f9cf94777e9d4964955196 (patch)
treea142078b4f4f7d45101540e9da5cc9dd54f9e8c6 /drivers
parent580fcd99299c64daf40293b27a1308b6b8070473 (diff)
cw1200: New option for 5GHz support.
5GHz band support is disabled by default in the driver. Use CW1200_5GHZ_SUPPORT kernel option to explicitly enable it if your hardware supports 5GHz band. Change-Id: I21c30ebd277ab19fcd92380f806111f2db668d0f Signed-off-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/25623 Reviewed-by: Philippe LANGLAIS <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/cw1200/Kconfig7
-rw-r--r--drivers/staging/cw1200/main.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/staging/cw1200/Kconfig b/drivers/staging/cw1200/Kconfig
index 8be1b909f6d..5c6f18267e1 100644
--- a/drivers/staging/cw1200/Kconfig
+++ b/drivers/staging/cw1200/Kconfig
@@ -35,7 +35,14 @@ config CW1200_FIRMWARE_DOES_NOT_SUPPORT_KEEPALIVE
or you suspect problems with the implementation.
Please finalize software the software keep-alive functionality in
that case.
+ If unsure, say N.
+config CW1200_5GHZ_SUPPORT
+ bool "5GHz band support"
+ depends on CW1200
+ help
+ Say Y if your device supports 5GHz band. Should be disabled for
+ CW1100 silicon.
If unsure, say N.
menu "Driver debug features"
diff --git a/drivers/staging/cw1200/main.c b/drivers/staging/cw1200/main.c
index e22fbf2e22e..7aef0ea1c60 100644
--- a/drivers/staging/cw1200/main.c
+++ b/drivers/staging/cw1200/main.c
@@ -124,6 +124,7 @@ static struct ieee80211_channel cw1200_2ghz_chantable[] = {
CHAN2G(14, 2484, 0),
};
+#ifdef CONFIG_CW1200_5GHZ_SUPPORT
static struct ieee80211_channel cw1200_5ghz_chantable[] = {
CHAN5G(34, 0), CHAN5G(36, 0),
CHAN5G(38, 0), CHAN5G(40, 0),
@@ -145,6 +146,7 @@ static struct ieee80211_channel cw1200_5ghz_chantable[] = {
CHAN5G(208, 0), CHAN5G(212, 0),
CHAN5G(216, 0),
};
+#endif /* CONFIG_CW1200_5GHZ_SUPPORT */
static struct ieee80211_supported_band cw1200_band_2ghz = {
.channels = cw1200_2ghz_chantable,
@@ -169,6 +171,7 @@ static struct ieee80211_supported_band cw1200_band_2ghz = {
},
};
+#ifdef CONFIG_CW1200_5GHZ_SUPPORT
static struct ieee80211_supported_band cw1200_band_5ghz = {
.channels = cw1200_5ghz_chantable,
.n_channels = ARRAY_SIZE(cw1200_5ghz_chantable),
@@ -191,6 +194,7 @@ static struct ieee80211_supported_band cw1200_band_5ghz = {
},
},
};
+#endif /* CONFIG_CW1200_5GHZ_SUPPORT */
static const struct ieee80211_ops cw1200_ops = {
.start = cw1200_start,
@@ -273,7 +277,9 @@ struct ieee80211_hw *cw1200_init_common(size_t priv_data_len)
hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
hw->wiphy->bands[IEEE80211_BAND_2GHZ] = &cw1200_band_2ghz;
+#ifdef CONFIG_CW1200_5GHZ_SUPPORT
hw->wiphy->bands[IEEE80211_BAND_5GHZ] = &cw1200_band_5ghz;
+#endif /* CONFIG_CW1200_5GHZ_SUPPORT */
hw->wiphy->max_scan_ssids = 2;
hw->wiphy->max_scan_ie_len = IEEE80211_MAX_DATA_LEN;