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

Update API to build against 3.14 kernel



The '#if 0' code removal are due to the fact this code is usually
used with a kernel whose cfg80211 has been modified to include
new features. Since we use standard mainline cfg80211, bypass those
calls.
Signed-off-by: default avatarGary Bisson <gary.bisson@boundarydevices.com>
parent 061939c9
......@@ -137,7 +137,11 @@ void hdd_sendActionCnf( hdd_adapter_t *pAdapter, tANI_BOOLEAN actionSendSuccess
int wlan_hdd_check_remain_on_channel(hdd_adapter_t *pAdapter);
void wlan_hdd_cancel_existing_remain_on_channel(hdd_adapter_t *pAdapter);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
u64 *cookie );
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
int wlan_hdd_mgmt_tx( struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan, bool offchan,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
......
......@@ -266,9 +266,15 @@ v_U16_t hdd_wmm_select_queue(struct net_device * dev, struct sk_buff *skb);
@return : Qdisc queue index
===========================================================================*/
v_U16_t hdd_hostapd_select_queue(struct net_device * dev, struct sk_buff *skb);
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
#endif
);
/**============================================================================
@brief hdd_wmm_classify_pkt() - Function which will classify an OS packet
......
......@@ -67,6 +67,9 @@
#ifdef IPA_OFFLOAD
#include <wlan_hdd_ipa.h>
#endif
#include <compat-qcacld.h>
v_BOOL_t mibIsDot11DesiredBssTypeInfrastructure( hdd_adapter_t *pAdapter );
struct ether_addr
......
......@@ -109,6 +109,8 @@
#endif
#include "wlan_hdd_mdns_offload.h"
 
#include <compat-qcacld.h>
#define g_mode_rates_size (12)
#define a_mode_rates_size (8)
#define FREQ_BASE_80211G (2407)
......@@ -3551,6 +3553,15 @@ int wlan_hdd_cfg80211_update_band(struct wiphy *wiphy, eCsrBand eBand)
}
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
static const struct wiphy_wowlan_support cfg80211_wowlan_support={
.flags = WIPHY_WOWLAN_MAGIC_PKT,
.n_patterns = WOWL_MAX_PTRNS_ALLOWED,
.pattern_min_len = 1,
.pattern_max_len = WOWL_PTRN_MAX_SIZE,
};
#endif
/*
* FUNCTION: wlan_hdd_cfg80211_init
* This function is called by hdd_wlan_startup()
......@@ -3580,7 +3591,11 @@ int wlan_hdd_cfg80211_init(struct device *dev,
 
/* This will disable updating of NL channels from passive to
* active if a beacon is received on passive channel. */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
wiphy->regulatory_flags |= REGULATORY_DISABLE_BEACON_HINTS;
#else
wiphy->flags |= WIPHY_FLAG_DISABLE_BEACON_HINTS;
#endif
 
 
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
......@@ -3591,13 +3606,22 @@ int wlan_hdd_cfg80211_init(struct device *dev,
| WIPHY_FLAG_4ADDR_STATION
#endif
| WIPHY_FLAG_OFFCHAN_TX;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
wiphy->regulatory_flags |= REGULATORY_COUNTRY_IE_IGNORE;
#else
wiphy->country_ie_pref = NL80211_COUNTRY_IE_IGNORE_CORE;
#endif
#endif
 
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
wiphy->wowlan = &cfg80211_wowlan_support;
#else
wiphy->wowlan.flags = WIPHY_WOWLAN_MAGIC_PKT;
wiphy->wowlan.n_patterns = WOWL_MAX_PTRNS_ALLOWED;
wiphy->wowlan.pattern_min_len = 1;
wiphy->wowlan.pattern_max_len = WOWL_PTRN_MAX_SIZE;
#endif
 
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_ESE) || defined(FEATURE_WLAN_LFR)
if (pCfg->isFastTransitionEnabled
......@@ -3749,9 +3773,9 @@ int wlan_hdd_cfg80211_init(struct device *dev,
wiphy->flags |= WIPHY_FLAG_DFS_OFFLOAD;
}
#endif
#if 0
wiphy->max_ap_assoc_sta = pCfg->maxNumberOfPeers;
#endif
#ifdef QCA_HT_2040_COEX
if (pCfg->ht2040CoexEnabled)
wiphy->features |= NL80211_FEATURE_AP_MODE_CHAN_WIDTH_CHANGE;
......@@ -3786,7 +3810,9 @@ int wlan_hdd_cfg80211_init(struct device *dev,
void wlan_hdd_update_wiphy(struct wiphy *wiphy,
hdd_config_t *pCfg)
{
#if 0
wiphy->max_ap_assoc_sta = pCfg->maxNumberOfPeers;
#endif
}
 
/* In this function we are registering wiphy. */
......@@ -3863,7 +3889,11 @@ void wlan_hdd_cfg80211_update_reg_info(struct wiphy *wiphy)
struct ieee80211_supported_band *band = wiphy->bands[IEEE80211_BAND_5GHZ];
// Mark UNII -1 band channel as passive
if (WLAN_HDD_CHANNEL_IN_UNII_1_BAND(band->channels[j].center_freq))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
band->channels[j].flags |= IEEE80211_CHAN_NO_IR;
#else
band->channels[j].flags |= IEEE80211_CHAN_PASSIVE_SCAN;
#endif
}
}
}
......@@ -12334,7 +12364,7 @@ static int __wlan_hdd_cfg80211_sched_scan_start(struct wiphy *wiphy,
/*Copying list of valid channel into request */
memcpy(pPnoRequest->aNetworks[i].aChannels, valid_ch, num_ch);
pPnoRequest->aNetworks[i].ucChannelCount = num_ch;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) && defined (QCA_WIFI_2_0)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)) && defined (QCA_WIFI_2_0) && 0
pPnoRequest->aNetworks[i].rssiThreshold =
request->match_sets[i].rssi_thold;
#else
......@@ -13634,7 +13664,12 @@ static int __wlan_hdd_cfg80211_testmode(struct wiphy *wiphy,
return err;
}
 
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
static int wlan_hdd_cfg80211_testmode(struct wiphy *wiphy, struct wireless_dev *wdev,
void *data, int len)
#else
static int wlan_hdd_cfg80211_testmode(struct wiphy *wiphy, void *data, int len)
#endif
{
int ret;
 
......
......@@ -79,6 +79,8 @@
#include <wlan_hdd_cfg80211.h>
#include <net/addrconf.h>
#include <compat-qcacld.h>
/**-----------------------------------------------------------------------------
* Preprocessor definitions and constants
* ----------------------------------------------------------------------------*/
......
......@@ -5319,11 +5319,13 @@ static const iw_handler hostapd_private[] = {
};
const struct iw_handler_def hostapd_handler_def = {
.num_standard = sizeof(hostapd_handler) / sizeof(hostapd_handler[0]),
#ifdef CONFIG_WEXT_PRIV
.num_private = sizeof(hostapd_private) / sizeof(hostapd_private[0]),
.num_private_args = sizeof(hostapd_private_args) / sizeof(hostapd_private_args[0]),
.standard = (iw_handler *)hostapd_handler,
.private = (iw_handler *)hostapd_private,
.private_args = hostapd_private_args,
#endif
.standard = (iw_handler *)hostapd_handler,
.get_wireless_stats = NULL,
};
......@@ -5353,7 +5355,9 @@ void hdd_set_ap_ops( struct net_device *pWlanHostapdDev )
VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter )
{
hdd_hostapd_state_t * phostapdBuf;
#ifdef CONFIG_WIRELESS_EXT
struct net_device *dev = pAdapter->dev;
#endif
hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
VOS_STATUS status;
#ifdef WLAN_FEATURE_MBSSID
......@@ -5438,8 +5442,10 @@ VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter )
sema_init(&(WLAN_HDD_GET_AP_CTX_PTR(pAdapter))->semWpsPBCOverlapInd, 1);
#ifdef CONFIG_WIRELESS_EXT
// Register as a wireless device
dev->wireless_handlers = (struct iw_handler_def *)& hostapd_handler_def;
#endif
//Initialize the data path module
status = hdd_softap_init_tx_rx(pAdapter);
......@@ -5597,6 +5603,7 @@ VOS_STATUS hdd_unregister_hostapd(hdd_adapter_t *pAdapter)
hdd_softap_deinit_tx_rx(pAdapter);
#ifdef CONFIG_WIRELESS_EXT
/* if we are being called during driver unload, then the dev has already
been invalidated. if we are being called at other times, then we can
detach the wireless device handlers */
......@@ -5604,6 +5611,7 @@ VOS_STATUS hdd_unregister_hostapd(hdd_adapter_t *pAdapter)
{
pAdapter->dev->wireless_handlers = NULL;
}
#endif
#ifdef WLAN_FEATURE_MBSSID
status = WLANSAP_Stop(sapContext);
......
......@@ -149,6 +149,8 @@ void hdd_ch_avoid_cb(void *hdd_context,void *indi_param);
#include "wlan_hdd_tsf.h"
#include <compat-qcacld.h>
#if defined(LINUX_QCMBR)
#define SIOCIOCTLTX99 (SIOCDEVPRIVATE+13)
#endif
......@@ -269,7 +271,14 @@ void wlan_hdd_restart_timer_cb(v_PVOID_t usrDataForCallback);
void hdd_set_wlan_suspend_mode(bool suspend);
v_U16_t hdd_select_queue(struct net_device *dev,
struct sk_buff *skb);
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
#endif
);
#ifdef WLAN_FEATURE_PACKET_FILTERING
static void hdd_set_multicast_list(struct net_device *dev);
......@@ -2639,7 +2648,9 @@ hdd_sendactionframe(hdd_adapter_t *pAdapter, const tANI_U8 *bssid,
int ret = 0;
tpSirMacVendorSpecificFrameHdr pVendorSpecific =
(tpSirMacVendorSpecificFrameHdr) payload;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
struct cfg80211_mgmt_tx_params params;
#endif
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
......@@ -2717,6 +2728,16 @@ hdd_sendactionframe(hdd_adapter_t *pAdapter, const tANI_U8 *bssid,
vos_mem_copy(hdr->addr3, bssid, VOS_MAC_ADDR_SIZE);
vos_mem_copy(hdr + 1, payload, payload_len);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
params.chan = &chan;
params.offchan = 0;
params.wait = dwell_time;
params.buf = frame;
params.len = frame_len;
params.no_cck = 1;
params.dont_wait_for_ack = 1;
ret = wlan_hdd_mgmt_tx(NULL, &(pAdapter->wdev), &params, &cookie );
#else
ret = wlan_hdd_mgmt_tx(NULL,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
&(pAdapter->wdev),
......@@ -2728,6 +2749,7 @@ hdd_sendactionframe(hdd_adapter_t *pAdapter, const tANI_U8 *bssid,
NL80211_CHAN_HT20, 1,
#endif
dwell_time, frame, frame_len, 1, 1, &cookie );
#endif /* KERNEL_VERSION(3,14,0)) */
vos_mem_free(frame);
exit:
return ret;
......@@ -10279,7 +10301,14 @@ static void hdd_set_multicast_list(struct net_device *dev)
--------------------------------------------------------------------------*/
v_U16_t hdd_select_queue(struct net_device *dev,
struct sk_buff *skb)
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
#endif
)
{
return hdd_wmm_select_queue(dev, skb);
}
......@@ -11157,6 +11186,24 @@ boolean hdd_is_5g_supported(hdd_context_t * pHddCtx)
#define WOW_MAX_PATTERN_SIZE 64
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
static const struct wiphy_wowlan_support ath6kl_wowlan_support = {
.flags = WIPHY_WOWLAN_ANY |
WIPHY_WOWLAN_MAGIC_PKT |
WIPHY_WOWLAN_DISCONNECT |
WIPHY_WOWLAN_SUPPORTS_GTK_REKEY |
WIPHY_WOWLAN_GTK_REKEY_FAILURE |
WIPHY_WOWLAN_EAP_IDENTITY_REQ |
WIPHY_WOWLAN_4WAY_HANDSHAKE |
WIPHY_WOWLAN_RFKILL_RELEASE,
.n_patterns = (WOW_MAX_FILTER_LISTS *
WOW_MAX_FILTERS_PER_LIST),
.pattern_min_len = WOW_MIN_PATTERN_SIZE,
.pattern_max_len = WOW_MAX_PATTERN_SIZE,
};
#endif
static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
{
struct wiphy *wiphy;
......@@ -11181,6 +11228,9 @@ static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
#endif
#ifdef QCA_WIFI_2_0
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0))
wiphy->wowlan = &ath6kl_wowlan_support;
#else
wiphy->wowlan.flags = WIPHY_WOWLAN_ANY |
WIPHY_WOWLAN_MAGIC_PKT |
WIPHY_WOWLAN_DISCONNECT |
......@@ -11194,6 +11244,7 @@ static VOS_STATUS wlan_hdd_reg_init(hdd_context_t *hdd_ctx)
WOW_MAX_FILTERS_PER_LIST);
wiphy->wowlan.pattern_min_len = WOW_MIN_PATTERN_SIZE;
wiphy->wowlan.pattern_max_len = WOW_MAX_PATTERN_SIZE;
#endif
#endif
/* registration of wiphy dev with cfg80211 */
......
......@@ -54,6 +54,8 @@
#include "vos_trace.h"
#include "vos_sched.h"
#include <compat-qcacld.h>
//Ms to Micro Sec
#define MS_TO_MUS(x) ((x)*1000);
......@@ -1100,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,6,0))
#if (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,
0, GFP_ATOMIC );
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,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,
......@@ -1686,7 +1693,11 @@ err_rem_channel:
return 0;
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct cfg80211_mgmt_tx_params *params,
u64 *cookie )
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan, bool offchan,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
......@@ -1714,7 +1725,11 @@ int wlan_hdd_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
int ret;
vos_ssr_protect(__func__);
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
ret = __wlan_hdd_mgmt_tx(wiphy, wdev, params->chan, params->offchan,
params->wait, params->buf, params->len, params->no_cck,
params->dont_wait_for_ack, cookie);
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
ret = __wlan_hdd_mgmt_tx(wiphy, wdev, chan, offchan,
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,8,0))
channel_type, channel_type_valid,
......@@ -2614,7 +2629,11 @@ 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,6,0))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,12,0))
cfg80211_rx_mgmt( pAdapter->dev->ieee80211_ptr, freq, 0,
pbFrames, nFrameLength,
0, GFP_ATOMIC );
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0))
cfg80211_rx_mgmt( pAdapter->dev->ieee80211_ptr, freq, 0,
pbFrames, nFrameLength,
GFP_ATOMIC );
......
......@@ -549,7 +549,14 @@ 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);
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
#endif
);
return hdd_softap_hard_start_xmit( skb, pPgBkAdapter->dev );
}
else
......@@ -2167,7 +2174,9 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext,
#ifdef QCA_PKT_PROTO_TRACE
v_U8_t proto_type;
#endif /* QCA_PKT_PROTO_TRACE */
#if 0
hdd_station_ctx_t *pHddStaCtx = NULL;
#endif
//Sanity check on inputs
if ((NULL == vosContext) || (NULL == rxBuf))
......@@ -2200,6 +2209,7 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext,
return eHAL_STATUS_FAILURE;
}
#if 0
pHddStaCtx = WLAN_HDD_GET_STATION_CTX_PTR(pAdapter);
if ((pHddStaCtx->conn_info.proxyARPService) &&
cfg80211_is_gratuitous_arp_unsolicited_na(skb))
......@@ -2210,6 +2220,7 @@ VOS_STATUS hdd_rx_packet_cbk(v_VOID_t *vosContext,
kfree_skb(skb);
return VOS_STATUS_SUCCESS;
}
#endif
#ifdef FEATURE_WLAN_TDLS
#ifndef QCA_WIFI_2_0
......
......@@ -117,6 +117,8 @@
#include "wlan_hdd_tsf.h"
#include <compat-qcacld.h>
#ifdef FEATURE_OEM_DATA_SUPPORT
#define MAX_OEM_DATA_RSP_LEN 2047
#endif
......@@ -10919,12 +10921,14 @@ static const struct iw_priv_args we_private_args[] = {
const struct iw_handler_def we_handler_def = {
.num_standard = sizeof(we_handler) / sizeof(we_handler[0]),
.standard = (iw_handler *)we_handler,
#ifdef CONFIG_WEXT_PRIV
.num_private = sizeof(we_private) / sizeof(we_private[0]),
.num_private_args = sizeof(we_private_args) / sizeof(we_private_args[0]),
.standard = (iw_handler *)we_handler,
.private = (iw_handler *)we_private,
.private_args = we_private_args,
#endif
.get_wireless_stats = get_wireless_stats,
};
......@@ -11180,8 +11184,10 @@ int hdd_register_wext(struct net_device *dev)
return eHAL_STATUS_FAILURE;
}
#ifdef CONFIG_WIRELESS_EXT
// Register as a wireless device
dev->wireless_handlers = (struct iw_handler_def *)&we_handler_def;
#endif
EXIT();
return 0;
......@@ -11205,6 +11211,8 @@ int hdd_UnregisterWext(struct net_device *dev)
EXIT();
#endif
#ifdef CONFIG_WIRELESS_EXT
dev->wireless_handlers = NULL;
#endif
return 0;
}
......@@ -1865,7 +1865,15 @@ 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)
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
#endif
)
{
WLANTL_ACEnumType ac;
sme_QosWmmUpType up = SME_QOS_WMM_UP_BE;
......
/*
* Compatibility header created in order to build the module for several
* version of the kernel.
* Originally, CodeAurora release targets kernel 3.10 only.
* This has been tested against a 3.14 kernel.
*/
#include <linux/version.h>
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0))
#define cfg80211_send_unprot_disassoc(_dev, _buf, _len) cfg80211_rx_unprot_mlme_mgmt(_dev, _buf, _len)
#define cfg80211_send_unprot_deauth(_dev, _buf, _len) cfg80211_rx_unprot_mlme_mgmt(_dev, _buf, _len)
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,13,0))
#define INIT_COMPLETION(var) reinit_completion(&var)
#endif
#define WIPHY_FLAG_DFS_OFFLOAD BIT(22)
......@@ -41,6 +41,8 @@
#include <vos_trace.h>
#include <kthread.h>
#include <compat-qcacld.h>
#define LOGGING_TRACE(level, args...) \
VOS_TRACE(VOS_MODULE_ID_HDD, level, ## args)
......
......@@ -48,6 +48,8 @@
#include "vos_event.h"
#include "vos_trace.h"
#include <compat-qcacld.h>
/*----------------------------------------------------------------------------
* Preprocessor Definitions and Constants
* -------------------------------------------------------------------------*/
......
......@@ -54,6 +54,8 @@
#include "regdomain.h"
#include "regdomain_common.h"
#include <compat-qcacld.h>
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,9,0))
#define IEEE80211_CHAN_NO_80MHZ 1<<7
#endif
......@@ -832,6 +834,12 @@ vos_reg_apply_beaconing_flags(struct wiphy *wiphy,
* default during init, prior to calling our
* regulatory_hint().
*/
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
if (!(reg_rule->flags &
NL80211_RRF_PASSIVE_SCAN))
ch->flags &=
~IEEE80211_CHAN_NO_IR;
#else
if (!(reg_rule->flags &
NL80211_RRF_NO_IBSS))
ch->flags &=
......@@ -840,10 +848,15 @@ vos_reg_apply_beaconing_flags(struct wiphy *wiphy,
NL80211_RRF_PASSIVE_SCAN))
ch->flags &=
~IEEE80211_CHAN_PASSIVE_SCAN;
#endif
} else {
if (ch->beacon_found)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
ch->flags &= ~IEEE80211_CHAN_NO_IR;
#else
ch->flags &= ~(IEEE80211_CHAN_NO_IBSS |
IEEE80211_CHAN_PASSIVE_SCAN);
#endif
}
}
}
......@@ -867,12 +880,21 @@ vos_reg_apply_active_scan_flags(struct wiphy *wiphy,
* on these channels. This is only done for specific regulatory SKUs
*/
if (initiator != NL80211_REGDOM_SET_BY_COUNTRY_IE) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
ch = &sband->channels[11]; /* CH 12 */
if (ch->flags & IEEE80211_CHAN_NO_IR)
ch->flags &= ~IEEE80211_CHAN_NO_IR;
ch = &sband->channels[12]; /* CH 13 */
if (ch->flags & IEEE80211_CHAN_NO_IR)
ch->flags &= ~IEEE80211_CHAN_NO_IR;
#else
ch = &sband->channels[11]; /* CH 12 */
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
ch = &sband->channels[12]; /* CH 13 */
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
#endif
return;
}
......@@ -892,9 +914,15 @@ vos_reg_apply_active_scan_flags(struct wiphy *wiphy,
#endif
if (!IS_ERR(reg_rule)) {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_NO_IR)
ch->flags &= ~IEEE80211_CHAN_NO_IR;
#else
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
#endif
}
ch = &sband->channels[12]; /* CH 13 */
......@@ -906,8 +934,13 @@ vos_reg_apply_active_scan_flags(struct wiphy *wiphy,
#endif
if (!IS_ERR(reg_rule)) {
if (!(reg_rule->flags & NL80211_RRF_PASSIVE_SCAN))
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,14,0))
if (ch->flags & IEEE80211_CHAN_NO_IR)
ch->flags &= ~IEEE80211_CHAN_NO_IR;
#else
if (ch->flags & IEEE80211_CHAN_PASSIVE_SCAN)
ch->flags &= ~IEEE80211_CHAN_PASSIVE_SCAN;
#endif
}
}
......@@ -938,9 +971,14 @@ static void vos_reg_apply_radar_flags(struct wiphy *wiphy)
* do not allow AP mode
*/
if (!(ch->flags & IEEE80211_CHAN_DISABLED))