wlan: Update APIs for 3.10 kernel
Some CFG/NL80211 APIs are changed during the kernel update to 3.10
version. Update the corresponding APIs in host driver to fix the
compilation errors.
Change-Id: I077064eafc14f2dacf1b76a785d6a272a5117e6e
CRs-Fixed: 531214
diff --git a/CORE/HDD/src/wlan_hdd_cfg80211.c b/CORE/HDD/src/wlan_hdd_cfg80211.c
index 936b47a..2c82d2f 100644
--- a/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -2388,7 +2388,12 @@
}
pAdapter->sessionCtx.ap.beacon = new;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
- wlan_hdd_cfg80211_set_channel(wiphy, dev, params->channel, params->channel_type);
+ wlan_hdd_cfg80211_set_channel(wiphy, dev,
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
+ params->channel, params->channel_type);
+#else
+ params->chandef.chan, cfg80211_get_chandef_type(&(params->chandef)));
+#endif
#endif
status = wlan_hdd_cfg80211_start_bss(pAdapter, ¶ms->beacon, params->ssid,
params->ssid_len, params->hidden_ssid);
@@ -4142,7 +4147,11 @@
}
else
{
- cfg80211_put_bss(bss_status);
+ cfg80211_put_bss(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
+ wiphy,
+#endif
+ bss_status);
}
pScanResult = sme_ScanResultGetNext(hHal, pResult);
@@ -6019,7 +6028,12 @@
}
/* Set Channel */
- if (NULL != params->channel)
+ if (NULL !=
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+ params->chandef.chan)
+#else
+ params->channel)
+#endif
{
u8 channelNum;
v_U32_t numChans = WNI_CFG_VALID_CHANNEL_LIST_LEN;
@@ -6029,8 +6043,12 @@
/* Get channel number */
channelNum =
- ieee80211_frequency_to_channel(params->channel->center_freq);
-
+ ieee80211_frequency_to_channel(
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0))
+ params->chandef.chan->center_freq);
+#else
+ params->channel->center_freq);
+#endif
if (0 != ccmCfgGetStr(hHal, WNI_CFG_VALID_CHANNEL_LIST,
validChan, &numChans))
@@ -6270,6 +6288,9 @@
* This function is used to set the txpower
*/
static int wlan_hdd_cfg80211_set_txpower(struct wiphy *wiphy,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
+ struct wireless_dev *wdev,
+#endif
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,35)
enum tx_power_setting type,
#else
@@ -6338,7 +6359,11 @@
* FUNCTION: wlan_hdd_cfg80211_get_txpower
* This function is used to read the txpower
*/
-static int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy, int *dbm)
+static int wlan_hdd_cfg80211_get_txpower(struct wiphy *wiphy,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,8,0)
+ struct wireless_dev *wdev,
+#endif
+ int *dbm)
{
hdd_adapter_t *pAdapter;