summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Hsu <ryanhsu@qca.qualcomm.com>2015-04-22 01:42:32 -0700
committerAnjaneeDevi Kapparapu <c_akappa@qti.qualcomm.com>2015-05-04 23:39:25 +0530
commitddf10a499240bfb88ea86a6c74e4da0ea05bf68b (patch)
treebc0eb137cd28218fdfa6e2158b613dc02fd5c65e
parent5183cbb300dd668b8098aa77d740e53b6bc874b1 (diff)
qcacld2.0: Update API cfg80211_ibss_joined for new param
cfg80211_ibss_joined() adds a new param beginning from Kernel 3.15. So update the API to accomandate the change. Change-Id: Icc6ae3b0cd2ebf26cded97811bc046d2fd274170 CRs-fixed: 827110
-rw-r--r--CORE/HDD/src/wlan_hdd_assoc.c27
1 files changed, 26 insertions, 1 deletions
diff --git a/CORE/HDD/src/wlan_hdd_assoc.c b/CORE/HDD/src/wlan_hdd_assoc.c
index 317844d5f164..e22bfb4c2a1d 100644
--- a/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/CORE/HDD/src/wlan_hdd_assoc.c
@@ -2131,7 +2131,11 @@ static void hdd_RoamIbssIndicationHandler( hdd_adapter_t *pAdapter,
if (pRoamInfo->pBssDesc)
{
struct cfg80211_bss *bss;
-
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) || defined(WITH_BACKPORTS)
+ struct ieee80211_channel *chan;
+ int chan_no;
+ unsigned int freq;
+#endif
/* we created the IBSS, notify supplicant */
hddLog(VOS_TRACE_LEVEL_INFO, "%s: %s: created ibss "
MAC_ADDRESS_STR,
@@ -2147,7 +2151,28 @@ static void hdd_RoamIbssIndicationHandler( hdd_adapter_t *pAdapter,
__func__, pAdapter->dev->name);
return;
}
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0)) || defined(WITH_BACKPORTS)
+ chan_no = pRoamInfo->pBssDesc->channelId;
+
+ if (chan_no <= 14)
+ freq = ieee80211_channel_to_frequency(chan_no,
+ IEEE80211_BAND_2GHZ);
+ else
+ freq = ieee80211_channel_to_frequency(chan_no,
+ IEEE80211_BAND_5GHZ);
+
+ chan = ieee80211_get_channel(pAdapter->wdev.wiphy, freq);
+
+ if (chan)
+ cfg80211_ibss_joined(pAdapter->dev, bss->bssid,
+ chan, GFP_KERNEL);
+ else
+ hddLog(LOGE, FL("%s: chanId: %d, can't find channel"),
+ pAdapter->dev->name,
+ (int)pRoamInfo->pBssDesc->channelId);
+#else
cfg80211_ibss_joined(pAdapter->dev, bss->bssid, GFP_KERNEL);
+#endif
cfg80211_put_bss(
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0)) || defined(WITH_BACKPORTS)
pHddCtx->wiphy,