summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Xu <pxu@qca.qualcomm.com>2015-01-16 15:35:47 -0800
committerAkash Patel <c_akashp@qca.qualcomm.com>2015-01-19 12:36:56 -0800
commitd3b3a608624edc8b9b6ce55efb80ead585e6bacb (patch)
tree4928b014697667923206f4ff3d9a4aca64603deb
parent9da94797c937d15aac236b36de6e27eed4c3ef4a (diff)
qca-cld:hdd: Fix compilation error for different kernel version
Fix a compilation error due to different kernel version when getting channel type from channel information. Change-Id: Ic34aaf5c0f100a5de0381c7682a33120eda73d24 CRs-fixed: 781261
-rw-r--r--CORE/HDD/src/wlan_hdd_cfg80211.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 2aaa921f6ac3..413bd51ece1d 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -7747,7 +7747,9 @@ static int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
)
{
beacon_data_t *old, *new;
- enum nl80211_channel_type channel_type;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+ enum nl80211_channel_type channel_type;
+#endif
old = pAdapter->sessionCtx.ap.beacon;
@@ -7764,10 +7766,12 @@ static int wlan_hdd_cfg80211_start_ap(struct wiphy *wiphy,
}
pAdapter->sessionCtx.ap.beacon = new;
- if (params->chandef.width < NL80211_CHAN_WIDTH_80)
- channel_type = cfg80211_get_chandef_type(&(params->chandef));
- else
- channel_type = NL80211_CHAN_HT40PLUS;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+ if (params->chandef.width < NL80211_CHAN_WIDTH_80)
+ channel_type = cfg80211_get_chandef_type(&(params->chandef));
+ else
+ channel_type = NL80211_CHAN_HT40PLUS;
+#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
wlan_hdd_cfg80211_set_channel(wiphy, dev,