Commit bfbb23eb authored by Gary Bisson's avatar Gary Bisson
Browse files

Update API to build against 4.1 kernel


Signed-off-by: default avatarGary Bisson <gary.bisson@boundarydevices.com>
parent 32d12fb4
......@@ -354,8 +354,11 @@ epping_adapter_t *epping_add_adapter(epping_context_t *pEpping_ctx,
{
struct net_device *dev;
epping_adapter_t *pAdapter;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
dev = alloc_netdev(sizeof(epping_adapter_t), "wifi%d", ether_setup);
#else
dev = alloc_netdev(sizeof(epping_adapter_t), "wifi%d", NET_NAME_UNKNOWN, ether_setup);
#endif
if (dev == NULL) {
EPPING_LOG(VOS_TRACE_LEVEL_FATAL,
"%s: Cannot allocate epping_adapter_t\n", __func__);
......
......@@ -838,8 +838,13 @@ void hdd_select_cbmode( hdd_adapter_t *pAdapter,v_U8_t operationChannel);
v_U8_t* wlan_hdd_cfg80211_get_ie_ptr(v_U8_t *pIes, int length, v_U8_t eid);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
struct net_device *dev, u8 *mac);
#else
int wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
struct net_device *dev, struct station_del_parameters *params);
#endif
#if defined(QCA_WIFI_2_0) && defined(QCA_WIFI_FTM) \
&& !defined(QCA_WIFI_ISOC) && defined(CONFIG_NL80211_TESTMODE)
......@@ -858,9 +863,16 @@ int wlan_hdd_send_avoid_freq_event(hdd_context_t *pHddCtx,
#endif
#ifdef FEATURE_WLAN_EXTSCAN
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
void wlan_hdd_cfg80211_extscan_callback(void *ctx,
const tANI_U16 evType,
void *pMsg);
#else
void wlan_hdd_cfg80211_extscan_callback(void *ctx,
const tANI_U16 evType,
void *pAdter,
void *pMsg);
#endif //#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
#endif /* FEATURE_WLAN_EXTSCAN */
struct cfg80211_bss* wlan_hdd_cfg80211_update_bss_list(
......
......@@ -166,8 +166,13 @@ int wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct net_device *dev,
const u8 *buf, size_t len, u64 *cookie );
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
struct wireless_dev* wlan_hdd_add_virtual_intf(
struct wiphy *wiphy, const char *name,
unsigned char name_assign_type,
enum nl80211_iftype type,
u32 *flags, struct vif_params *params );
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
struct wireless_dev* wlan_hdd_add_virtual_intf(
struct wiphy *wiphy, const char *name,
enum nl80211_iftype type,
......
......@@ -1884,6 +1884,10 @@ static void hdd_RoamIbssIndicationHandler( hdd_adapter_t *pAdapter,
eRoamCmdStatus roamStatus,
eCsrRoamResult roamResult )
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
struct ieee80211_channel *chan;
#endif
hddLog(VOS_TRACE_LEVEL_INFO, "%s: %s: id %d, status %d, result %d",
__func__, pAdapter->dev->name, roamId, roamStatus, roamResult);
......@@ -1937,7 +1941,12 @@ static void hdd_RoamIbssIndicationHandler( hdd_adapter_t *pAdapter,
return;
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
cfg80211_ibss_joined(pAdapter->dev, bss->bssid, GFP_KERNEL);
#else
chan = ieee80211_get_channel(pAdapter->wdev.wiphy, (int) pRoamInfo->pBssDesc->channelId);
cfg80211_ibss_joined(pAdapter->dev, bss->bssid, chan, GFP_KERNEL);
#endif
cfg80211_put_bss(
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,9,0))
pHddCtx->wiphy,
......
This diff is collapsed.
......@@ -707,8 +707,12 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
v_BOOL_t bWPSState;
v_BOOL_t bAuthRequired = TRUE;
tpSap_AssocMacAddr pAssocStasArray = NULL;
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
char unknownSTAEvent[IW_CUSTOM_MAX+1];
char maxAssocExceededEvent[IW_CUSTOM_MAX+1];
#else
char maxAssocExceeded_unknownSTAEvent[IW_CUSTOM_MAX+1]; //combined to avoid not stack memory compiler error
#endif
v_BYTE_t we_custom_start_event[64];
char *startBssEvent;
hdd_context_t *pHddCtx;
......@@ -1163,7 +1167,7 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
staInfo.assoc_req_ies =
(const u8 *)&pSapEvent->sapevt.sapStationAssocReassocCompleteEvent.ies[0];
staInfo.assoc_req_ies_len = iesLen;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,31))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,31)) && (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
staInfo.filled |= STATION_INFO_ASSOC_REQ_IES;
#endif
cfg80211_new_sta(dev,
......@@ -1383,7 +1387,11 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
TRUE : FALSE );
return VOS_STATUS_SUCCESS;
case eSAP_UNKNOWN_STA_JOIN:
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
snprintf(unknownSTAEvent, IW_CUSTOM_MAX, "JOIN_UNKNOWN_STA-%02x:%02x:%02x:%02x:%02x:%02x",
#else
snprintf(maxAssocExceeded_unknownSTAEvent, IW_CUSTOM_MAX, "JOIN_UNKNOWN_STA-%02x:%02x:%02x:%02x:%02x:%02x",
#endif
pSapEvent->sapevt.sapUnknownSTAJoin.macaddr.bytes[0],
pSapEvent->sapevt.sapUnknownSTAJoin.macaddr.bytes[1],
pSapEvent->sapevt.sapUnknownSTAJoin.macaddr.bytes[2],
......@@ -1391,14 +1399,25 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
pSapEvent->sapevt.sapUnknownSTAJoin.macaddr.bytes[4],
pSapEvent->sapevt.sapUnknownSTAJoin.macaddr.bytes[5]);
we_event = IWEVCUSTOM; /* Discovered a new node (AP mode). */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
wrqu.data.pointer = unknownSTAEvent;
wrqu.data.length = strlen(unknownSTAEvent);
we_custom_event_generic = (v_BYTE_t *)unknownSTAEvent;
hddLog(LOGE,"%s", unknownSTAEvent);
#else
wrqu.data.pointer = maxAssocExceeded_unknownSTAEvent;
wrqu.data.length = strlen(maxAssocExceeded_unknownSTAEvent);
we_custom_event_generic = (v_BYTE_t *)maxAssocExceeded_unknownSTAEvent;//unknownSTAEvent;
hddLog(LOGE,"%s", maxAssocExceeded_unknownSTAEvent);
#endif
break;
case eSAP_MAX_ASSOC_EXCEEDED:
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
snprintf(maxAssocExceededEvent, IW_CUSTOM_MAX, "Peer %02x:%02x:%02x:%02x:%02x:%02x denied"
#else
snprintf(maxAssocExceeded_unknownSTAEvent, IW_CUSTOM_MAX, "Peer %02x:%02x:%02x:%02x:%02x:%02x denied"
#endif
" assoc due to Maximum Mobile Hotspot connections reached. Please disconnect"
" one or more devices to enable the new device connection",
pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[0],
......@@ -1408,10 +1427,17 @@ VOS_STATUS hdd_hostapd_SAPEventCB( tpSap_Event pSapEvent, v_PVOID_t usrDataForCa
pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[4],
pSapEvent->sapevt.sapMaxAssocExceeded.macaddr.bytes[5]);
we_event = IWEVCUSTOM; /* Discovered a new node (AP mode). */
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
wrqu.data.pointer = maxAssocExceededEvent;
wrqu.data.length = strlen(maxAssocExceededEvent);
we_custom_event_generic = (v_BYTE_t *)maxAssocExceededEvent;
hddLog(LOG1,"%s", maxAssocExceededEvent);
#else
wrqu.data.pointer = maxAssocExceeded_unknownSTAEvent;
wrqu.data.length = strlen(maxAssocExceeded_unknownSTAEvent);
we_custom_event_generic = (v_BYTE_t *)maxAssocExceeded_unknownSTAEvent;
hddLog(LOG1,"%s", maxAssocExceeded_unknownSTAEvent);
#endif
break;
case eSAP_STA_ASSOC_IND:
return VOS_STATUS_SUCCESS;
......@@ -5497,8 +5523,11 @@ hdd_adapter_t* hdd_wlan_create_ap_dev( hdd_context_t *pHddCtx, tSirMacAddr macAd
hddLog(VOS_TRACE_LEVEL_DEBUG, "%s: iface_name = %s", __func__, iface_name);
pWlanHostapdDev = alloc_netdev_mq(sizeof(hdd_adapter_t), iface_name, ether_setup, NUM_TX_QUEUES);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pWlanHostapdDev = alloc_netdev_mq(sizeof(hdd_adapter_t), iface_name, ether_setup, NUM_TX_QUEUES);
#else
pWlanHostapdDev = alloc_netdev_mq(sizeof(hdd_adapter_t), iface_name, NET_NAME_UNKNOWN, ether_setup, NUM_TX_QUEUES);
#endif
if (pWlanHostapdDev != NULL)
{
pHostapdAdapter = netdev_priv(pWlanHostapdDev);
......
......@@ -270,15 +270,13 @@ static void wlan_hdd_restart_deinit(hdd_context_t *pHddCtx);
void wlan_hdd_restart_timer_cb(v_PVOID_t usrDataForCallback);
void hdd_set_wlan_suspend_mode(bool suspend);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
v_U16_t hdd_select_queue(struct net_device *dev,
struct sk_buff *skb
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
, void *accel_priv
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
, select_queue_fallback_t fallback
struct sk_buff *skb, void *accel_priv, select_queue_fallback_t fallback);
#else
v_U16_t hdd_select_queue(struct net_device *dev,
struct sk_buff *skb);
#endif
);
#ifdef WLAN_FEATURE_PACKET_FILTERING
static void hdd_set_multicast_list(struct net_device *dev);
......@@ -7949,7 +7947,11 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
/*
* cfg80211 initialization and registration....
*/
pWlanDev = alloc_netdev_mq(sizeof( hdd_adapter_t ), name, ether_setup, NUM_TX_QUEUES);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pWlanDev = alloc_netdev_mq(sizeof(hdd_adapter_t), name, ether_setup, NUM_TX_QUEUES);
#else
pWlanDev = alloc_netdev_mq(sizeof(hdd_adapter_t), name, NET_NAME_UNKNOWN, ether_setup, NUM_TX_QUEUES);
#endif
if(pWlanDev != NULL)
{
......@@ -10300,15 +10302,13 @@ static void hdd_set_multicast_list(struct net_device *dev)
\return - ac, Queue Index/access category corresponding to UP in IP header
--------------------------------------------------------------------------*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
v_U16_t hdd_select_queue(struct net_device *dev,
struct sk_buff *skb
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
, void *accel_priv
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
, select_queue_fallback_t fallback
struct sk_buff *skb, void *accel_priv, select_queue_fallback_t fallback)
#else
v_U16_t hdd_select_queue(struct net_device *dev,
struct sk_buff *skb)
#endif
)
{
return hdd_wmm_select_queue(dev, skb);
}
......
......@@ -1102,7 +1102,12 @@ void hdd_remainChanReadyHandler( hdd_adapter_t *pAdapter )
if(pRemainChanCtx->action_pkt_buff.frame_length != 0)
{
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
cfg80211_rx_mgmt( pAdapter->dev->ieee80211_ptr, pRemainChanCtx->action_pkt_buff.freq, 0,
pRemainChanCtx->action_pkt_buff.frame_ptr,
pRemainChanCtx->action_pkt_buff.frame_length,
0);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
cfg80211_rx_mgmt( pAdapter->dev->ieee80211_ptr, pRemainChanCtx->action_pkt_buff.freq, 0,
pRemainChanCtx->action_pkt_buff.frame_ptr,
pRemainChanCtx->action_pkt_buff.frame_length,
......@@ -2193,7 +2198,21 @@ struct net_device* __wlan_hdd_add_virtual_intf(
#endif
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
struct wireless_dev* wlan_hdd_add_virtual_intf(
struct wiphy *wiphy, const char *name,
unsigned char name_assign_type,
enum nl80211_iftype type,
u32 *flags, struct vif_params *params )
{
struct wireless_dev* wdev;
vos_ssr_protect(__func__);
wdev = __wlan_hdd_add_virtual_intf(wiphy, name, type, flags, params);
vos_ssr_unprotect(__func__);
return wdev;
}
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0))
struct wireless_dev* wlan_hdd_add_virtual_intf(
struct wiphy *wiphy, const char *name,
enum nl80211_iftype type,
......@@ -2629,7 +2648,12 @@ void hdd_indicateMgmtFrame( hdd_adapter_t *pAdapter,
//Indicate Frame Over Normal Interface
hddLog( LOG1, FL("Indicate Frame over NL80211 Interface"));
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,1,0))
cfg80211_rx_mgmt( pAdapter->dev->ieee80211_ptr, pRemainChanCtx->action_pkt_buff.freq, 0,
pRemainChanCtx->action_pkt_buff.frame_ptr,
pRemainChanCtx->action_pkt_buff.frame_length,
0 );
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
cfg80211_rx_mgmt( pAdapter->dev->ieee80211_ptr, freq, 0,
pbFrames, nFrameLength,
0, GFP_ATOMIC );
......
......@@ -549,14 +549,12 @@ int hdd_mon_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
skb->protocol = htons(HDD_ETHERTYPE_802_1_X);
hdd_hostapd_select_queue(pPgBkAdapter->dev, skb
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
, NULL
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
, NULL
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
hdd_hostapd_select_queue(pPgBkAdapter->dev, skb,
NULL, NULL);
#else
hdd_hostapd_select_queue(pPgBkAdapter->dev, skb);
#endif
);
return hdd_softap_hard_start_xmit( skb, pPgBkAdapter->dev );
}
else
......
......@@ -1865,15 +1865,13 @@ v_VOID_t hdd_wmm_classify_pkt ( hdd_adapter_t* pAdapter,
@return : Qdisc queue index
===========================================================================*/
v_U16_t hdd_hostapd_select_queue(struct net_device * dev,
struct sk_buff *skb
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
, void *accel_priv
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
, select_queue_fallback_t fallback
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 14, 0))
v_U16_t hdd_hostapd_select_queue(struct net_device * dev, struct sk_buff *skb,
void *accel_priv, select_queue_fallback_t fallback)
#else
v_U16_t hdd_hostapd_select_queue(struct net_device * dev, struct sk_buff *skb)
#endif
)
{
WLANTL_ACEnumType ac;
sme_QosWmmUpType up = SME_QOS_WMM_UP_BE;
......
......@@ -160,9 +160,16 @@ static inline void spin_unlock_dpc(spinlock_t *lock)
typedef unsigned long TQUEUE_ARG;
#define mark_bh(a)
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
#define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
f(ctl_table *ctl, int write, void *buffer, \
size_t *lenp, loff_t *ppos)
#else
#define ATH_SYSCTL_DECL(f, ctl, write, filp, buffer, lenp, ppos) \
f(struct ctl_table *ctl, int write, void *buffer, \
size_t *lenp, loff_t *ppos)
#endif
#define ATH_SYSCTL_PROC_DOINTVEC(ctl, write, filp, buffer, lenp, ppos) \
proc_dointvec(ctl, write, buffer, lenp, ppos)
#define ATH_SYSCTL_PROC_DOSTRING(ctl, write, filp, buffer, lenp, ppos) \
......
......@@ -2165,8 +2165,12 @@ static int wma_extscan_start_stop_event_handler(void *handle,
vos_mem_free(extscan_ind);
return -EINVAL;
}
pMac->sme.pExtScanIndCb(pMac->hHdd,
event_type, extscan_ind);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pMac->sme.pExtScanIndCb(pMac->hHdd, event_type, extscan_ind);
#else
pMac->sme.pExtScanIndCb(pMac->hHdd, event_type, NULL,extscan_ind);
#endif
WMA_LOGD("%s: sending event to umac for requestid %x"
"with status %d", __func__,
extscan_ind->requestId, extscan_ind->status);
......@@ -2220,9 +2224,11 @@ static int wma_extscan_operations_event_handler(void *handle,
vos_mem_free(oprn_ind);
return -EINVAL;
}
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND,
oprn_ind);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pMac->sme.pExtScanIndCb(pMac->hHdd,eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND, oprn_ind);
#else
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_SCAN_PROGRESS_EVENT_IND, NULL, oprn_ind);
#endif
WMA_LOGD("%s: sending scan progress event to hdd",
__func__);
vos_mem_free(oprn_ind);
......@@ -2262,9 +2268,11 @@ static int wma_extscan_table_usage_event_handler (void *handle,
tbl_usg_ind->requestId = event->request_id;
tbl_usg_ind->numResultsAvailable = event->maximum_entries;
 
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND,
tbl_usg_ind);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND, tbl_usg_ind);
#else
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_SCAN_RES_AVAILABLE_IND, NULL, tbl_usg_ind);
#endif
WMA_LOGD("%s: sending scan_res available event to hdd",
__func__);
vos_mem_free(tbl_usg_ind);
......@@ -2323,9 +2331,11 @@ static int wma_extscan_capabilities_event_handler (void *handle,
dest_capab->maxHotlistAPs,
dest_capab->scanCacheSize);
 
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_GET_CAPABILITIES_IND,
dest_capab);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_GET_CAPABILITIES_IND, dest_capab);
#else
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_GET_CAPABILITIES_IND, NULL, dest_capab);
#endif
WMA_LOGD("%s: sending capabilities event to hdd", __func__);
vos_mem_free(dest_capab);
return 0;
......@@ -2398,9 +2408,11 @@ static int wma_extscan_hotlist_match_event_handler(void *handle,
dest_ap++;
src_hotlist++;
}
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_HOTLIST_MATCH_IND,
dest_hotlist);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_HOTLIST_MATCH_IND, dest_hotlist);
#else
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_HOTLIST_MATCH_IND, NULL, dest_hotlist);
#endif
WMA_LOGD("%s: sending hotlist match event to hdd", __func__);
vos_mem_free(dest_hotlist);
return 0;
......@@ -2478,9 +2490,11 @@ static int wma_extscan_cached_results_event_handler(void *handle,
dest_ap++;
src_hotlist++;
}
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_CACHED_RESULTS_IND,
dest_cachelist);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_CACHED_RESULTS_IND, dest_cachelist);
#else
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_CACHED_RESULTS_IND, NULL, dest_cachelist);
#endif
WMA_LOGD("%s: sending cached results event", __func__);
vos_mem_free(dest_cachelist);
return 0;
......@@ -2565,9 +2579,11 @@ static int wma_extscan_change_results_event_handler(void *handle,
dest_chglist->moreData = moredata;
dest_chglist->numResults = event->total_entries;
 
pMac->sme.pExtScanIndCb(pMac->hHdd,
eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND,
dest_chglist);
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND, dest_chglist);
#else
pMac->sme.pExtScanIndCb(pMac->hHdd, eSIR_EXTSCAN_SIGNIFICANT_WIFI_CHANGE_RESULTS_IND, NULL, dest_chglist);
#endif
WMA_LOGD("%s: sending change monitor results", __func__);
vos_mem_free(dest_chglist);
return 0;
......
......@@ -44,6 +44,7 @@
/*--------------------------------------------------------------------------
Include Files
------------------------------------------------------------------------*/
#include <linux/version.h>
#include "vos_status.h"
#include "vos_lock.h"
#include "vos_trace.h"
......@@ -177,7 +178,11 @@ typedef struct tagSmeStruct
void (*pget_rssi_ind_cb) (struct sir_rssi_resp *param, void *pcontext);
void *pget_rssi_cb_context;
#ifdef FEATURE_WLAN_EXTSCAN
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
void (*pExtScanIndCb) (void *, const tANI_U16, void *);
#else
void (*pExtScanIndCb) (void *, const tANI_U16, void *, void *);
#endif //#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
#endif /* FEATURE_WLAN_EXTSCAN */
#ifdef WLAN_FEATURE_NAN
void (*nanCallback) (void*, tSirNanEvent*);
......
......@@ -3931,9 +3931,13 @@ eHalStatus sme_getCachedResults (tHalHandle hHal,
\param pExtScanIndCb
\- return void
-------------------------------------------------------------------------*/
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
eHalStatus sme_ExtScanRegisterCallback (tHalHandle hHal,
void (*pExtScanIndCb)(void *, const tANI_U16, void *));
#else
eHalStatus sme_ExtScanRegisterCallback (tHalHandle hHal,
void (*pExtScanIndCb)(void *, const tANI_U16, void *, void *));
#endif //#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
#endif /* FEATURE_WLAN_EXTSCAN */
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
......
......@@ -13919,9 +13919,13 @@ eHalStatus sme_getCachedResults (tHalHandle hHal,
}
return status;
}
#if (LINUX_VERSION_CODE < KERNEL_VERSION(4,1,0))
eHalStatus sme_ExtScanRegisterCallback (tHalHandle hHal,
void (*pExtScanIndCb)(void *, const tANI_U16, void *))
#else
eHalStatus sme_ExtScanRegisterCallback (tHalHandle hHal,
void (*pExtScanIndCb)(void *, const tANI_U16, void *, void *))
#endif //#if (LINUX_VERSION_CODE > KERNEL_VERSION(4,1,0))
{
eHalStatus status = eHAL_STATUS_SUCCESS;
tpAniSirGlobal pMac = PMAC_STRUCT(hHal);
......
......@@ -576,7 +576,10 @@ pktlog_read(struct file *file, char *buf, size_t nbytes, loff_t *ppos)
int rem_len;
int start_offset, end_offset;
int fold_offset, ppos_data, cur_rd_offset;
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) //KERNEL_VERSION(4,1,0)
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
PDE_DATA(file->f_path.dentry->d_inode);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
PDE_DATA(file->f_dentry->d_inode);
#else
......@@ -817,7 +820,10 @@ static struct vm_operations_struct pktlog_vmops = {
static int pktlog_mmap(struct file *file, struct vm_area_struct *vma)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,0) //KERNEL_VERSION(4,1,0)
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
PDE_DATA(file->f_path.dentry->d_inode);
#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
struct ath_pktlog_info *pl_info = (struct ath_pktlog_info *)
PDE_DATA(file->f_dentry->d_inode);
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment