aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/sync.c14
-rw-r--r--drivers/input/touchscreen/lge_touch_core.c2
-rw-r--r--drivers/net/wireless/ath/regd.c1
-rw-r--r--drivers/staging/android/ashmem.c4
-rw-r--r--drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h22
-rwxr-xr-xdrivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h11
-rw-r--r--drivers/staging/prima/CORE/HDD/inc/wlan_hdd_power.h2
-rwxr-xr-xdrivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c17
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c36
-rwxr-xr-xdrivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c26
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c304
-rwxr-xr-xdrivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c28
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c36
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c96
-rw-r--r--drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c9
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/qwlan_version.h4
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/wniCfgAp.h24
-rw-r--r--drivers/staging/prima/CORE/MAC/inc/wniCfgSta.h14
-rw-r--r--drivers/staging/prima/CORE/MAC/src/cfg/cfgParamName.c2
-rw-r--r--drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/cfg.txt28
-rw-r--r--drivers/staging/prima/CORE/MAC/src/include/sirParams.h1
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c19
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.c31
-rw-r--r--drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.h4
-rw-r--r--drivers/staging/prima/CORE/SME/inc/csrApi.h9
-rwxr-xr-xdrivers/staging/prima/CORE/SME/inc/csrInternal.h11
-rw-r--r--drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c313
-rwxr-xr-xdrivers/staging/prima/CORE/SME/src/csr/csrApiScan.c89
-rw-r--r--drivers/staging/prima/CORE/SME/src/csr/csrUtil.c7
-rwxr-xr-xdrivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c5
-rw-r--r--drivers/staging/prima/CORE/VOSS/src/vos_sched.c5
-rw-r--r--drivers/staging/prima/CORE/VOSS/src/vos_sched.h1
-rw-r--r--drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c32
-rw-r--r--drivers/staging/prima/firmware_bin/WCNSS_cfg.datbin10330 -> 10394 bytes
-rw-r--r--drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini14
-rw-r--r--drivers/staging/prima/riva/inc/wlan_hal_cfg.h5
-rw-r--r--drivers/staging/prima/riva/inc/wlan_hal_msg.h1
-rw-r--r--drivers/usb/gadget/f_accessory.c32
-rw-r--r--drivers/video/msm/mdp4_overlay.c26
-rw-r--r--drivers/video/msm/msm_fb.h1
40 files changed, 841 insertions, 445 deletions
diff --git a/drivers/base/sync.c b/drivers/base/sync.c
index 2e359968919..95819987fbe 100644
--- a/drivers/base/sync.c
+++ b/drivers/base/sync.c
@@ -79,27 +79,27 @@ static void sync_timeline_free(struct kref *kref)
container_of(kref, struct sync_timeline, kref);
unsigned long flags;
- if (obj->ops->release_obj)
- obj->ops->release_obj(obj);
-
spin_lock_irqsave(&sync_timeline_list_lock, flags);
list_del(&obj->sync_timeline_list);
spin_unlock_irqrestore(&sync_timeline_list_lock, flags);
+ if (obj->ops->release_obj)
+ obj->ops->release_obj(obj);
+
kfree(obj);
}
void sync_timeline_destroy(struct sync_timeline *obj)
{
obj->destroyed = true;
+ smp_wmb();
/*
- * If this is not the last reference, signal any children
- * that their parent is going away.
+ * signal any children that their parent is going away.
*/
+ sync_timeline_signal(obj);
- if (!kref_put(&obj->kref, sync_timeline_free))
- sync_timeline_signal(obj);
+ kref_put(&obj->kref, sync_timeline_free);
}
EXPORT_SYMBOL(sync_timeline_destroy);
diff --git a/drivers/input/touchscreen/lge_touch_core.c b/drivers/input/touchscreen/lge_touch_core.c
index 2c1793fc9b8..e83a8acfe46 100644
--- a/drivers/input/touchscreen/lge_touch_core.c
+++ b/drivers/input/touchscreen/lge_touch_core.c
@@ -954,6 +954,8 @@ static void touch_fw_upgrade_func(struct work_struct *work_fw_upgrade)
ktime_set(0, ts->pdata->role->report_period),
HRTIMER_MODE_REL);
+ msleep(ts->pdata->role->booting_delay);
+
touch_ic_init(ts);
if (saved_state == POWER_WAKE || saved_state == POWER_SLEEP)
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index 10dea37431b..bd4ecf34eca 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -520,6 +520,7 @@ ath_regd_init_wiphy(struct ath_regulatory *reg,
*/
regd = ath_world_regdomain(reg);
wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY;
+ wiphy->country_ie_pref = NL80211_COUNTRY_IE_FOLLOW_POWER;
} else {
/*
* This gets applied in the case of the absence of CRDA,
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index 16c411cbe5b..4f13907543e 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -365,7 +365,9 @@ static int ashmem_shrink(struct shrinker *s, struct shrink_control *sc)
if (!sc->nr_to_scan)
return lru_count;
- mutex_lock(&ashmem_mutex);
+ if (!mutex_trylock(&ashmem_mutex))
+ return -1;
+
list_for_each_entry_safe(range, next, &ashmem_lru_list, lru) {
struct inode *inode = range->asma->file->f_dentry->d_inode;
loff_t start = range->pgstart * PAGE_SIZE;
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h
index 3a2d70b8577..ea8505b5841 100644
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_cfg.h
@@ -1342,13 +1342,6 @@ typedef enum
#define CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED_MAX ( 1 )
#define CFG_P2P_DEVICE_ADDRESS_ADMINISTRATED_DEFAULT ( 0 )
-#ifdef WLAN_FEATURE_PACKET_FILTERING
-#define CFG_MC_ADDR_LIST_FILTER_NAME "isMcAddrListFilter"
-#define CFG_MC_ADDR_LIST_FILTER_MIN ( 0 )
-#define CFG_MC_ADDR_LIST_FILTER_MAX ( 1 )
-#define CFG_MC_ADDR_LIST_FILTER_DEFAULT ( 0 )
-#endif
-
#define CFG_ENABLE_SSR "gEnableSSR"
#define CFG_ENABLE_SSR_MIN ( 0 )
#define CFG_ENABLE_SSR_MAX ( 1 )
@@ -1783,6 +1776,16 @@ typedef enum
#define CFG_SPLIT_SCAN_TRAFFIC_MONITOR_TIMER_MAX ( 10000 )
#define CFG_SPLIT_SCAN_TRAFFIC_MONITOR_TIMER_DEFAULT ( 5000 )
+#define CFG_RA_FILTER_ENABLE_NAME "gRAFilterEnable"
+#define CFG_RA_FILTER_ENABLE_DEFAULT (1)
+#define CFG_RA_FILTER_ENABLE_MIN (0)
+#define CFG_RA_FILTER_ENABLE_MAX (1)
+
+#define CFG_RA_RATE_LIMIT_INTERVAL_NAME "gRARateLimitInterval"
+#define CFG_RA_RATE_LIMIT_INTERVAL_DEFAULT (60)
+#define CFG_RA_RATE_LIMIT_INTERVAL_MIN (0)
+#define CFG_RA_RATE_LIMIT_INTERVAL_MAX (60)
+
/*---------------------------------------------------------------------------
Type declarations
-------------------------------------------------------------------------*/
@@ -2110,9 +2113,6 @@ typedef struct
v_U8_t allowMCCGODiffBI;
v_BOOL_t isP2pDeviceAddrAdministrated;
v_U8_t thermalMitigationEnable;
-#ifdef WLAN_FEATURE_PACKET_FILTERING
- v_BOOL_t isMcAddrListFilter;
-#endif
#ifdef WLAN_FEATURE_11AC
v_U8_t vhtChannelWidth;
v_U8_t vhtRxMCS;
@@ -2165,6 +2165,8 @@ typedef struct
v_U32_t cfgMaxMediumTime;
v_U8_t enableTrafficMonitor;
v_U32_t trafficIdleTimeout;
+ v_BOOL_t cfgRAFilterEnable;
+ v_U16_t cfgRARateLimitInterval;
} hdd_config_t;
/*---------------------------------------------------------------------------
Function declarations and documenation
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h
index 33fb44e8cbf..4c8c3075131 100755
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_main.h
@@ -682,6 +682,13 @@ struct hdd_adapter_s
/** Handle to the network device */
struct net_device *dev;
+
+#ifdef WLAN_NS_OFFLOAD
+ /** IPv6 notifier callback for handling NS offload on change in IP */
+ struct notifier_block ipv6_notifier;
+ bool ipv6_notifier_registered;
+ struct work_struct ipv6NotifierWorkQueue;
+#endif
//TODO Move this to sta Ctx
struct wireless_dev wdev ;
@@ -1100,5 +1107,7 @@ int wlan_hdd_validate_context(hdd_context_t *pHddCtx);
int wlan_hdd_setIPv6Filter(hdd_context_t *pHddCtx, tANI_U8 filterType, tANI_U8 sessionId);
#endif
VOS_STATUS hdd_issta_p2p_clientconnected(hdd_context_t *pHddCtx);
-
+#ifdef WLAN_NS_OFFLOAD
+void hdd_ipv6_notifier_work_queue(struct work_struct *work);
+#endif
#endif // end #if !defined( WLAN_HDD_MAIN_H )
diff --git a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_power.h b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_power.h
index a1498a12ebc..0810397b29b 100644
--- a/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_power.h
+++ b/drivers/staging/prima/CORE/HDD/inc/wlan_hdd_power.h
@@ -102,6 +102,6 @@ void hdd_conf_hostoffload(hdd_adapter_t * pAdapter, v_BOOL_t fenable);
void hdd_conf_gtk_offload(hdd_adapter_t *pAdapter, v_BOOL_t fenable);
#endif
#ifdef WLAN_NS_OFFLOAD
-void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, v_BOOL_t fenable);
+void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, int fenable);
#endif
#endif // if !defined __WLAN_QCT_DRIVER_H
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
index d3bf1a024bb..e235595251e 100755
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_assoc.c
@@ -2311,19 +2311,12 @@ eHalStatus hdd_smeRoamCallback( void *pContext, tCsrRoamInfo *pRoamInfo, tANI_U3
"offload: already called mcastbcast filter");
(WLAN_HDD_GET_CTX(pAdapter))->hdd_mcastbcast_filter_set = FALSE;
}
-#ifdef WLAN_FEATURE_PACKET_FILTERING
- if (pHddCtx->cfg_ini->isMcAddrListFilter)
- {
- /*Multicast addr filtering is enabled*/
- if (pAdapter->mc_addr_list.isFilterApplied)
- {
- /*Filter applied during suspend mode*/
- /*Clear it here*/
- wlan_hdd_set_mc_addr_list(pAdapter, FALSE);
- }
- }
+#ifdef WLAN_FEATURE_PACKET_FILTERING
+ /* Call to clear any MC Addr List filter applied after
+ * successful connection.
+ */
+ wlan_hdd_set_mc_addr_list(pAdapter, FALSE);
#endif
-
}
break;
case eCSR_ROAM_IBSS_LEAVE:
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c
index cb9a5b9a367..96796fafc87 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg.c
@@ -1998,14 +1998,6 @@ REG_VARIABLE( CFG_THERMAL_MIGRATION_ENABLE_NAME, WLAN_PARAM_Integer,
CFG_THERMAL_MIGRATION_ENABLE_DEFAULT,
CFG_THERMAL_MIGRATION_ENABLE_MIN,
CFG_THERMAL_MIGRATION_ENABLE_MAX ),
-#ifdef WLAN_FEATURE_PACKET_FILTERING
- REG_VARIABLE( CFG_MC_ADDR_LIST_FILTER_NAME, WLAN_PARAM_Integer,
- hdd_config_t, isMcAddrListFilter,
- VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
- CFG_MC_ADDR_LIST_FILTER_DEFAULT,
- CFG_MC_ADDR_LIST_FILTER_MIN,
- CFG_MC_ADDR_LIST_FILTER_MAX ),
-#endif
REG_VARIABLE( CFG_ENABLE_MODULATED_DTIM_NAME, WLAN_PARAM_Integer,
hdd_config_t, enableModulatedDTIM,
@@ -2298,6 +2290,20 @@ REG_VARIABLE(CFG_MAX_MEDIUM_TIME, WLAN_PARAM_Integer,
CFG_TRAFFIC_IDLE_TIMEOUT_DEFAULT,
CFG_TRAFFIC_IDLE_TIMEOUT_MIN,
CFG_TRAFFIC_IDLE_TIMEOUT_MAX),
+
+ REG_VARIABLE(CFG_RA_FILTER_ENABLE_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, cfgRAFilterEnable,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_RA_FILTER_ENABLE_DEFAULT,
+ CFG_RA_FILTER_ENABLE_MIN,
+ CFG_RA_FILTER_ENABLE_MAX ),
+
+ REG_VARIABLE(CFG_RA_RATE_LIMIT_INTERVAL_NAME, WLAN_PARAM_Integer,
+ hdd_config_t, cfgRARateLimitInterval,
+ VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
+ CFG_RA_RATE_LIMIT_INTERVAL_DEFAULT,
+ CFG_RA_RATE_LIMIT_INTERVAL_MIN,
+ CFG_RA_RATE_LIMIT_INTERVAL_MAX ),
};
/*
@@ -3788,6 +3794,20 @@ v_BOOL_t hdd_update_config_dat( hdd_context_t *pHddCtx )
hddLog(LOGE, "Could not pass on WNI_CFG_MAX_MEDIUM_TIME to CCM");
}
+ if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_RA_FILTER_ENABLE, pConfig->cfgRAFilterEnable,
+ NULL, eANI_BOOLEAN_FALSE) == eHAL_STATUS_FAILURE)
+ {
+ fStatus = FALSE;
+ hddLog(LOGE, "Could not pass on WNI_CFG_RA_FILTER_ENABLE to CCM");
+ }
+
+ if (ccmCfgSetInt(pHddCtx->hHal, WNI_CFG_RA_RATE_LIMIT_INTERVAL, pConfig->cfgRARateLimitInterval,
+ NULL, eANI_BOOLEAN_FALSE) == eHAL_STATUS_FAILURE)
+ {
+ fStatus = FALSE;
+ hddLog(LOGE, "Could not pass on WNI_CFG_RA_FILTER_ENABLE to CCM");
+ }
+
return fStatus;
}
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
index 2986887774a..25b9f1a802e 100755
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_cfg80211.c
@@ -511,6 +511,8 @@ struct wiphy *wlan_hdd_cfg80211_wiphy_alloc(int priv_size)
return NULL;
}
+ wiphy->country_ie_pref = NL80211_COUNTRY_IE_IGNORE_CORE;
+
return wiphy;
}
@@ -4686,19 +4688,31 @@ int wlan_hdd_cfg80211_scan( struct wiphy *wiphy,
if( request->ie_len )
{
/* save this for future association (join requires this) */
+ /*TODO: Array needs to be converted to dynamic allocation,
+ * as multiple ie.s can be sent in cfg80211_scan_request structure
+ * CR 597966
+ */
memset( &pScanInfo->scanAddIE, 0, sizeof(pScanInfo->scanAddIE) );
memcpy( pScanInfo->scanAddIE.addIEdata, request->ie, request->ie_len);
pScanInfo->scanAddIE.length = request->ie_len;
- if((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
+ if ((WLAN_HDD_INFRA_STATION == pAdapter->device_mode) ||
(WLAN_HDD_P2P_CLIENT == pAdapter->device_mode) ||
- (WLAN_HDD_P2P_DEVICE == pAdapter->device_mode)
- )
+ (WLAN_HDD_P2P_DEVICE == pAdapter->device_mode))
{
- pwextBuf->roamProfile.pAddIEScan = pScanInfo->scanAddIE.addIEdata;
- pwextBuf->roamProfile.nAddIEScanLength = pScanInfo->scanAddIE.length;
- }
+ if ( request->ie_len <= SIR_MAC_MAX_IE_LENGTH)
+ {
+ pwextBuf->roamProfile.nAddIEScanLength = request->ie_len;
+ memcpy( pwextBuf->roamProfile.addIEScan,
+ request->ie, request->ie_len);
+ }
+ else
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR, "Scan Ie length is invalid:"
+ "%d", request->ie_len);
+ }
+ }
scanRequest.uIEFieldLen = pScanInfo->scanAddIE.length;
scanRequest.pIEField = pScanInfo->scanAddIE.addIEdata;
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c
index b3e798efe53..6af5370921b 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_early_suspend.c
@@ -107,6 +107,8 @@
#include "wlan_hdd_packet_filtering.h"
#define HDD_SSR_BRING_UP_TIME 180000
+#define NS_DEFAULT_SLOT_INDEX 4
+#define NS_EXTENDED_SLOT_INDEX 18
static eHalStatus g_full_pwr_status;
static eHalStatus g_standby_status;
@@ -560,22 +562,157 @@ void hdd_conf_hostoffload(hdd_adapter_t *pAdapter, v_BOOL_t fenable)
}
#ifdef WLAN_NS_OFFLOAD
-void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, v_BOOL_t fenable)
+void hdd_ipv6_notifier_work_queue(struct work_struct *work)
+{
+ hdd_adapter_t* pAdapter =
+ container_of(work, hdd_adapter_t, ipv6NotifierWorkQueue);
+ hdd_context_t *pHddCtx;
+ int status;
+
+ hddLog(LOG1, FL("Reconfiguring NS Offload"));
+ pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ status = wlan_hdd_validate_context(pHddCtx);
+ if (0 != status)
+ {
+ hddLog(LOGE, FL("HDD context is invalid"));
+ return;
+ }
+
+ if ((eConnectionState_Associated ==
+ (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState)
+ && (VOS_TRUE == pHddCtx->sus_res_mcastbcast_filter_valid))
+ {
+ // This invocation being part of the IPv6 registration callback,
+ // we are passing second parameter as 2 to avoid registration
+ // of IPv6 notifier again.
+ hdd_conf_ns_offload(pAdapter, 2);
+ }
+}
+
+static int wlan_hdd_ipv6_changed(struct notifier_block *nb,
+ unsigned long data, void *arg)
+{
+ struct inet6_ifaddr *ifa = (struct inet6_ifaddr *)arg;
+ struct net_device *ndev = ifa->idev->dev;
+ hdd_adapter_t *pAdapter =
+ container_of(nb, struct hdd_adapter_s, ipv6_notifier);
+ hdd_context_t *pHddCtx;
+ int status;
+
+ if (pAdapter && pAdapter->dev == ndev)
+ {
+ pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ status = wlan_hdd_validate_context(pHddCtx);
+ if (0 != status)
+ {
+ hddLog(LOGE, FL("HDD context is invalid"));
+ return NOTIFY_DONE;
+ }
+
+ schedule_work(&pAdapter->ipv6NotifierWorkQueue);
+ }
+
+ return NOTIFY_DONE;
+}
+
+/**----------------------------------------------------------------------------
+
+ \brief hdd_conf_ns_offload() - Configure NS offload
+
+ Called during SUSPEND to configure the NS offload (MC BC filter) which
+ reduces power consumption.
+
+ \param - pAdapter - Adapter context for which NS offload is to be configured
+ \param - fenable - 0 - disable.
+ 1 - enable. (with IPv6 notifier registration)
+ 2 - enable. (without IPv6 notifier registration)
+
+ \return - void
+
+ ---------------------------------------------------------------------------*/
+void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, int fenable)
{
struct inet6_dev *in6_dev;
struct inet6_ifaddr *ifp;
struct list_head *p;
- tANI_U8 selfIPv6Addr[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA][SIR_MAC_IPV6_ADDR_LEN] = {{0,}};
- tANI_BOOLEAN selfIPv6AddrValid[SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA] = {0};
tSirHostOffloadReq offLoadRequest;
+ int slot_index = NS_DEFAULT_SLOT_INDEX;
+ tANI_U8 **selfIPv6Addr;
+ tANI_U8 *selfIPv6AddrValid;
hdd_context_t *pHddCtx;
+ tHalHandle halHandle;
+ int status;
- int i =0;
+ int i = 0, slot = 0;
+ int ret = 0;
eHalStatus returnStatus;
+ ENTER();
+ hddLog(LOG1, FL(" fenable = %d"), fenable);
+
+ if (NULL == pAdapter)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD adapter is Null"));
+ return;
+ }
+
+ halHandle = WLAN_HDD_GET_HAL_CTX(pAdapter);
pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
- ENTER();
+ status = wlan_hdd_validate_context(pHddCtx);
+
+ if (0 != status)
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "%s: HDD context is not valid", __func__);
+ return;
+ }
+
+ if (sme_IsFeatureSupportedByFW(EXTENDED_NSOFFLOAD_SLOT))
+ {
+ slot_index = NS_EXTENDED_SLOT_INDEX;
+ }
+
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("slot_idex = %d"), slot_index);
+
+ selfIPv6AddrValid =
+ (tANI_U8 *)vos_mem_malloc(sizeof(tANI_U8) * slot_index);
+
+ if (NULL == selfIPv6AddrValid)
+ {
+ hddLog (VOS_TRACE_LEVEL_ERROR, FL("Failed to allocate memory for"
+ " selfIPv6AddrValid"));
+ goto end;
+ }
+
+ memset(selfIPv6AddrValid, 0, slot_index * sizeof(tANI_U8));
+
+ selfIPv6Addr = (tANI_U8 **)vos_mem_malloc(sizeof(tANI_U8 *) * slot_index);
+
+ if (NULL == selfIPv6Addr)
+ {
+ hddLog (VOS_TRACE_LEVEL_ERROR, FL("Failed to allocate memory for"
+ " selfIPv6Addr"));
+ goto end;
+ }
+
+ memset(selfIPv6Addr, 0, slot_index * sizeof(tANI_U8 *));
+
+ for (slot = 0; slot < slot_index; slot++)
+ {
+ selfIPv6Addr[slot] =
+ (tANI_U8 *)vos_mem_malloc(SIR_MAC_IPV6_ADDR_LEN);
+ if (NULL == selfIPv6Addr[slot])
+ {
+ hddLog (VOS_TRACE_LEVEL_ERROR, FL("Failed to allocate memory"
+ "for selfIPv6Addr"));
+ goto end;
+ }
+ memset(selfIPv6Addr[slot], 0, SIR_MAC_IPV6_ADDR_LEN);
+ }
+
+ i = 0;
+
if (fenable)
{
in6_dev = __in6_dev_get(pAdapter->dev);
@@ -584,34 +721,47 @@ void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, v_BOOL_t fenable)
//read_lock_bh(&in6_dev->lock);
list_for_each(p, &in6_dev->addr_list)
{
+ if (i >= slot_index)
+ {
+ hddLog (VOS_TRACE_LEVEL_ERROR,
+ FL("IPv6 address list is greater than IPv6"
+ "address supported by firmware"));
+ hddLog (VOS_TRACE_LEVEL_ERROR,
+ FL("FW supported IPv6 address = %d"), slot_index);
+ break;
+ }
ifp = list_entry(p, struct inet6_ifaddr, if_list);
switch(ipv6_addr_src_scope(&ifp->addr))
{
case IPV6_ADDR_SCOPE_LINKLOCAL:
- vos_mem_copy(&selfIPv6Addr[0], &ifp->addr.s6_addr,
+ vos_mem_copy(selfIPv6Addr[i], &ifp->addr.s6_addr,
sizeof(ifp->addr.s6_addr));
- selfIPv6AddrValid[0] = SIR_IPV6_ADDR_VALID;
+ selfIPv6AddrValid[i] = SIR_IPV6_ADDR_VALID;
hddLog (VOS_TRACE_LEVEL_INFO,
- "Found IPV6_ADDR_SCOPE_LINKLOCAL Address : %pI6",
- selfIPv6Addr[0]);
+ FL("Found IPV6_ADDR_SCOPE_LINKLOCAL Address : %pI6"),
+ selfIPv6Addr[i]);
break;
case IPV6_ADDR_SCOPE_GLOBAL:
- vos_mem_copy(&selfIPv6Addr[1], &ifp->addr.s6_addr,
+ vos_mem_copy(selfIPv6Addr[i], &ifp->addr.s6_addr,
sizeof(ifp->addr.s6_addr));
- selfIPv6AddrValid[1] = SIR_IPV6_ADDR_VALID;
+ selfIPv6AddrValid[i] = SIR_IPV6_ADDR_VALID;
hddLog (VOS_TRACE_LEVEL_INFO,
- "Found IPV6_ADDR_SCOPE_GLOBAL Address : %pI6",
- selfIPv6Addr[1]);
+ FL("Found IPV6_ADDR_SCOPE_GLOBAL Address : %pI6"),
+ selfIPv6Addr[i]);
break;
default:
- hddLog(LOGE, "The Scope %d is not supported",
- ipv6_addr_src_scope(&ifp->addr));
+ hddLog(VOS_TRACE_LEVEL_ERROR,
+ FL("The Scope %d is not supported"),
+ ipv6_addr_src_scope(&ifp->addr));
+ }
+ if (selfIPv6AddrValid[i] == SIR_IPV6_ADDR_VALID)
+ {
+ i++;
}
-
}
- //read_unlock_bh(&in6_dev->lock);
+
vos_mem_zero(&offLoadRequest, sizeof(offLoadRequest));
- for (i =0; i<SIR_MAC_NUM_TARGET_IPV6_NS_OFFLOAD_NA; i++)
+ for (i =0; i < slot_index; i++)
{
if (selfIPv6AddrValid[i])
{
@@ -629,32 +779,40 @@ void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, v_BOOL_t fenable)
offLoadRequest.nsOffloadInfo.selfIPv6Addr[1] = 0x02;
offLoadRequest.nsOffloadInfo.selfIPv6Addr[11] = 0x01;
offLoadRequest.nsOffloadInfo.selfIPv6Addr[12] = 0xFF;
- offLoadRequest.nsOffloadInfo.selfIPv6Addr[13] = selfIPv6Addr[i][13];
- offLoadRequest.nsOffloadInfo.selfIPv6Addr[14] = selfIPv6Addr[i][14];
- offLoadRequest.nsOffloadInfo.selfIPv6Addr[15] = selfIPv6Addr[i][15];
+ offLoadRequest.nsOffloadInfo.selfIPv6Addr[13] =
+ selfIPv6Addr[i][13];
+ offLoadRequest.nsOffloadInfo.selfIPv6Addr[14] =
+ selfIPv6Addr[i][14];
+ offLoadRequest.nsOffloadInfo.selfIPv6Addr[15] =
+ selfIPv6Addr[i][15];
offLoadRequest.nsOffloadInfo.slotIdx = i;
vos_mem_copy(&offLoadRequest.nsOffloadInfo.targetIPv6Addr[0],
- &selfIPv6Addr[i][0], sizeof(tANI_U8)*SIR_MAC_IPV6_ADDR_LEN);
+ selfIPv6Addr[i], sizeof(tANI_U8)*SIR_MAC_IPV6_ADDR_LEN);
vos_mem_copy(&offLoadRequest.nsOffloadInfo.selfMacAddr,
&pAdapter->macAddressCurrent.bytes,
sizeof(tANI_U8)*SIR_MAC_ADDR_LEN);
- offLoadRequest.nsOffloadInfo.targetIPv6AddrValid[0] = SIR_IPV6_ADDR_VALID;
+ offLoadRequest.nsOffloadInfo.targetIPv6AddrValid[0] =
+ SIR_IPV6_ADDR_VALID;
offLoadRequest.offloadType = SIR_IPV6_NS_OFFLOAD;
offLoadRequest.enableOrDisable = SIR_OFFLOAD_ENABLE;
hddLog (VOS_TRACE_LEVEL_INFO,
- "configuredMcastBcastFilter: %d",pHddCtx->configuredMcastBcastFilter);
+ FL("configuredMcastBcastFilter: %d"
+ "NSOffload Slot = %d"),
+ pHddCtx->configuredMcastBcastFilter, i);
if ((VOS_TRUE == pHddCtx->sus_res_mcastbcast_filter_valid)
&& ((HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST ==
pHddCtx->sus_res_mcastbcast_filter) ||
- (HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST_BROADCAST ==
- pHddCtx->sus_res_mcastbcast_filter)))
+ (HDD_MCASTBCASTFILTER_FILTER_ALL_MULTICAST_BROADCAST ==
+ pHddCtx->sus_res_mcastbcast_filter))
+ && (!pHddCtx->cfg_ini->fEnableMCAddrList))
{
hddLog (VOS_TRACE_LEVEL_INFO,
- "Set offLoadRequest with SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE \n", __func__);
+ FL("Set offLoadRequest with"
+ "SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE"));
offLoadRequest.enableOrDisable =
SIR_OFFLOAD_NS_AND_MCAST_FILTER_ENABLE;
}
@@ -664,45 +822,87 @@ void hdd_conf_ns_offload(hdd_adapter_t *pAdapter, v_BOOL_t fenable)
sizeof(tANI_U8)*SIR_MAC_IPV6_ADDR_LEN);
hddLog (VOS_TRACE_LEVEL_INFO,
- "Setting NSOffload with solicitedIp: %pI6, targetIp: %pI6",
+ FL("Setting NSOffload with solicitedIp: %pI6,"
+ "targetIp: %pI6"),
offLoadRequest.nsOffloadInfo.selfIPv6Addr,
offLoadRequest.nsOffloadInfo.targetIPv6Addr[0]);
//Configure the Firmware with this
- returnStatus = sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter),
+ returnStatus = sme_SetHostOffload(halHandle,
pAdapter->sessionId, &offLoadRequest);
if(eHAL_STATUS_SUCCESS != returnStatus)
{
hddLog(VOS_TRACE_LEVEL_ERROR,
- FL("Failed to enable HostOffload feature with status: %d"),
- returnStatus);
+ FL("Failed to enable HostOffload feature with"
+ " status: %d"), returnStatus);
}
vos_mem_zero(&offLoadRequest, sizeof(offLoadRequest));
}
}
+ if (fenable == 1 && !pAdapter->ipv6_notifier_registered)
+ {
+ // Register IPv6 notifier to notify if any change in IP
+ // So that we can reconfigure the offload parameters
+ pAdapter->ipv6_notifier.notifier_call =
+ wlan_hdd_ipv6_changed;
+ ret = register_inet6addr_notifier(&pAdapter->ipv6_notifier);
+ if (ret)
+ {
+ hddLog(LOGE, FL("Failed to register IPv6 notifier"));
+ }
+ else
+ {
+ hddLog(LOG1, FL("Registered IPv6 notifier"));
+ pAdapter->ipv6_notifier_registered = true;
+ }
+ }
}
else
{
hddLog(VOS_TRACE_LEVEL_ERROR,
FL("IPv6 dev does not exist. Failed to request NSOffload"));
- return;
+ goto end;
}
}
else
{
//Disable NSOffload
+ if (pAdapter->ipv6_notifier_registered)
+ {
+ hddLog(LOG1, FL("Unregistered IPv6 notifier"));
+ unregister_inet6addr_notifier(&pAdapter->ipv6_notifier);
+ pAdapter->ipv6_notifier_registered = false;
+ }
vos_mem_zero((void *)&offLoadRequest, sizeof(tSirHostOffloadReq));
offLoadRequest.enableOrDisable = SIR_OFFLOAD_DISABLE;
offLoadRequest.offloadType = SIR_IPV6_NS_OFFLOAD;
- if (eHAL_STATUS_SUCCESS !=
+ for (i = 0; i < slot_index; i++)
+ {
+ hddLog(VOS_TRACE_LEVEL_INFO, FL("Disable Slot= %d"), i);
+ offLoadRequest.nsOffloadInfo.slotIdx = i;
+ if (eHAL_STATUS_SUCCESS !=
sme_SetHostOffload(WLAN_HDD_GET_HAL_CTX(pAdapter),
pAdapter->sessionId, &offLoadRequest))
- {
- hddLog(VOS_TRACE_LEVEL_ERROR, FL("Failure to disable"
- "NSOffload feature"));
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("Failure to disable"
+ " %d Slot"), i);
+ }
}
}
+end:
+ while (slot > 0 && selfIPv6Addr[--slot])
+ {
+ vos_mem_free(selfIPv6Addr[slot]);
+ }
+ if (selfIPv6Addr)
+ {
+ vos_mem_free(selfIPv6Addr);
+ }
+ if (selfIPv6AddrValid)
+ {
+ vos_mem_free(selfIPv6AddrValid);
+ }
return;
}
#endif
@@ -905,19 +1105,11 @@ static void hdd_conf_suspend_ind(hdd_context_t* pHddCtx,
wlanSuspendParam->configuredMcstBcstFilterSetting = pHddCtx->configuredMcastBcastFilter;
#ifdef WLAN_FEATURE_PACKET_FILTERING
- if (pHddCtx->cfg_ini->isMcAddrListFilter)
- {
- /*Multicast addr list filter is enabled during suspend*/
- if (((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
- (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT))
- && pAdapter->mc_addr_list.mc_cnt
- && (eConnectionState_Associated ==
- (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState))
- {
- /*set the filter*/
- wlan_hdd_set_mc_addr_list(pAdapter, TRUE);
- }
- }
+ /* During suspend, configure MC Addr list filter to the firmware
+ * function takes care of checking necessary conditions before
+ * configuring.
+ */
+ wlan_hdd_set_mc_addr_list(pAdapter, TRUE);
#endif
}
@@ -972,16 +1164,10 @@ static void hdd_conf_resume_ind(hdd_adapter_t *pAdapter)
#ifdef WLAN_FEATURE_PACKET_FILTERING
- if (pHddCtx->cfg_ini->isMcAddrListFilter)
- {
- /*Multicast addr filtering is enabled*/
- if (pAdapter->mc_addr_list.isFilterApplied)
- {
- /*Filter applied during suspend mode*/
- /*Clear it here*/
- wlan_hdd_set_mc_addr_list(pAdapter, FALSE);
- }
- }
+ /* Filer was applied during suspend inditication
+ * clear it when we resume.
+ */
+ wlan_hdd_set_mc_addr_list(pAdapter, FALSE);
#endif
}
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
index 5a53219454d..0330179741c 100755
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_main.c
@@ -101,6 +101,8 @@
#include <bapInternal.h>
#endif // WLAN_BTAMP_FEATURE
+#include <linux/inetdevice.h>
+#include <net/addrconf.h>
#include <linux/wireless.h>
#include <net/cfg80211.h>
#include "wlan_hdd_cfg80211.h"
@@ -195,7 +197,6 @@ static void hdd_set_multicast_list(struct net_device *dev);
#endif
void hdd_wlan_initial_scan(hdd_adapter_t *pAdapter);
-int isWDresetInProgress(void);
extern int hdd_setBand_helper(struct net_device *dev, tANI_U8* ptr);
#if defined (WLAN_FEATURE_VOWIFI_11R) || defined (FEATURE_WLAN_CCX) || defined(FEATURE_WLAN_LFR)
@@ -226,9 +227,6 @@ static int hdd_netdev_notifier_call(struct notifier_block * nb,
(strncmp(dev->name, "p2p", 3)))
return NOTIFY_DONE;
- if (isWDresetInProgress())
- return NOTIFY_DONE;
-
if (!dev->ieee80211_ptr)
return NOTIFY_DONE;
@@ -247,6 +245,9 @@ static int hdd_netdev_notifier_call(struct notifier_block * nb,
return NOTIFY_DONE;
}
+ if (pHddCtx->isLogpInProgress)
+ return NOTIFY_DONE;
+
hddLog(VOS_TRACE_LEVEL_INFO, "%s: %s New Net Device State = %lu",
__func__, dev->name, state);
@@ -3770,6 +3771,11 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
hdd_deinit_adapter(pHddCtx, pAdapter);
goto err_free_netdev;
}
+
+#ifdef WLAN_NS_OFFLOAD
+ // Workqueue which gets scheduled in IPv6 notification callback.
+ INIT_WORK(&pAdapter->ipv6NotifierWorkQueue, hdd_ipv6_notifier_work_queue);
+#endif
//Stop the Interface TX queue.
netif_tx_disable(pAdapter->dev);
//netif_tx_disable(pWlanDev);
@@ -3863,7 +3869,6 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
}
}
-
if( VOS_STATUS_SUCCESS == status )
{
//Add it to the hdd's session list.
@@ -4060,6 +4065,17 @@ VOS_STATUS hdd_stop_adapter( hdd_context_t *pHddCtx, hdd_adapter_t *pAdapter )
{
hdd_abort_mac_scan(pHddCtx);
}
+#ifdef WLAN_NS_OFFLOAD
+#ifdef WLAN_OPEN_SOURCE
+ cancel_work_sync(&pAdapter->ipv6NotifierWorkQueue);
+#endif
+ if (pAdapter->ipv6_notifier_registered)
+ {
+ hddLog(LOG1, FL("Unregistered IPv6 notifier"));
+ unregister_inet6addr_notifier(&pAdapter->ipv6_notifier);
+ pAdapter->ipv6_notifier_registered = false;
+ }
+#endif
if (test_bit(SME_SESSION_OPENED, &pAdapter->event_flags))
{
@@ -6277,7 +6293,7 @@ static void hdd_driver_exit(void)
}
else
{
- while(isWDresetInProgress()) {
+ while(pHddCtx->isLogpInProgress) {
VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_FATAL,
"%s:SSR in Progress; block rmmod for 1 second!!!", __func__);
msleep(1000);
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c
index 3f5fbd3257b..7f00efce5f9 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_scan.c
@@ -740,10 +740,20 @@ int iw_set_scan(struct net_device *dev, struct iw_request_info *info,
memcpy( pHddCtx->scan_info.scanAddIE.addIEdata, pwextBuf->genIE.addIEdata,
pwextBuf->genIE.length );
pHddCtx->scan_info.scanAddIE.length = pwextBuf->genIE.length;
-
- pwextBuf->roamProfile.pAddIEScan = pHddCtx->scan_info.scanAddIE.addIEdata;
- pwextBuf->roamProfile.nAddIEScanLength = pHddCtx->scan_info.scanAddIE.length;
-
+ /* Maximum length of each IE is SIR_MAC_MAX_IE_LENGTH */
+ if (SIR_MAC_MAX_IE_LENGTH >= pwextBuf->genIE.length)
+ {
+ memcpy( pwextBuf->roamProfile.addIEScan,
+ pHddCtx->scan_info.scanAddIE.addIEdata,
+ pHddCtx->scan_info.scanAddIE.length);
+ pwextBuf->roamProfile.nAddIEScanLength =
+ pHddCtx->scan_info.scanAddIE.length;
+ }
+ else
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Invalid ScanIE, Length is %d", pwextBuf->genIE.length);
+ }
/* clear previous genIE after use it */
memset( &pwextBuf->genIE, 0, sizeof(pwextBuf->genIE) );
}
@@ -1121,10 +1131,20 @@ int iw_set_cscan(struct net_device *dev, struct iw_request_info *info,
memcpy( pHddCtx->scan_info.scanAddIE.addIEdata, pwextBuf->genIE.addIEdata,
pwextBuf->genIE.length );
pHddCtx->scan_info.scanAddIE.length = pwextBuf->genIE.length;
-
- pwextBuf->roamProfile.pAddIEScan = pHddCtx->scan_info.scanAddIE.addIEdata;
- pwextBuf->roamProfile.nAddIEScanLength = pHddCtx->scan_info.scanAddIE.length;
-
+ if (SIR_MAC_MAX_IE_LENGTH >= pwextBuf->genIE.length)
+ {
+ memcpy( pwextBuf->roamProfile.addIEScan,
+ pHddCtx->scan_info.scanAddIE.addIEdata,
+ pHddCtx->scan_info.scanAddIE.length);
+ pwextBuf->roamProfile.nAddIEScanLength =
+ pHddCtx->scan_info.scanAddIE.length;
+ }
+ else
+ {
+ VOS_TRACE(VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
+ "Invalid ScanIE, Length is %d",
+ pwextBuf->genIE.length);
+ }
/* clear previous genIE after use it */
memset( &pwextBuf->genIE, 0, sizeof(pwextBuf->genIE) );
}
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c
index 543a3273171..964ed65bebd 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wext.c
@@ -908,8 +908,8 @@ void hdd_clearRoamProfileIe( hdd_adapter_t *pAdapter)
pWextState->roamProfile.pRSNReqIE = (tANI_U8 *)NULL;
pWextState->roamProfile.bWPSAssociation = VOS_FALSE;
- pWextState->roamProfile.pAddIEScan = (tANI_U8 *)NULL;
pWextState->roamProfile.nAddIEScanLength = 0;
+ memset(pWextState->roamProfile.addIEScan, 0 , SIR_MAC_MAX_IE_LENGTH+2);
pWextState->roamProfile.pAddIEAssoc = (tANI_U8 *)NULL;
pWextState->roamProfile.nAddIEAssocLength = 0;
@@ -5743,43 +5743,87 @@ int wlan_hdd_setIPv6Filter(hdd_context_t *pHddCtx, tANI_U8 filterType,
void wlan_hdd_set_mc_addr_list(hdd_adapter_t *pAdapter, v_U8_t set)
{
- v_U8_t filterAction;
- tPacketFilterCfg request;
v_U8_t i;
- hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX(pAdapter);
+ tpSirRcvFltMcAddrList pMulticastAddrs = NULL;
+ tHalHandle hHal = WLAN_HDD_GET_HAL_CTX(pAdapter);
+ hdd_context_t* pHddCtx = (hdd_context_t*)pAdapter->pHddCtx;
- filterAction = set ? HDD_RCV_FILTER_SET : HDD_RCV_FILTER_CLEAR;
+ if (NULL == hHal)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HAL Handle is NULL"));
+ return;
+ }
+ if (NULL == pHddCtx)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("HDD CTX is NULL"));
+ return;
+ }
- /*set mulitcast addr list*/
- for (i = 0; i < pAdapter->mc_addr_list.mc_cnt; i++)
+ /* Check if INI is enabled or not, other wise just return
+ */
+ if (pHddCtx->cfg_ini->fEnableMCAddrList)
{
- memset(&request, 0, sizeof (tPacketFilterCfg));
- request.filterAction = filterAction;
- request.filterId = i;
+ pMulticastAddrs = vos_mem_malloc(sizeof(tSirRcvFltMcAddrList));
+ if (NULL == pMulticastAddrs)
+ {
+ hddLog(VOS_TRACE_LEVEL_ERROR, FL("Could not allocate Memory"));
+ return;
+ }
+
if (set)
{
- request.numParams = 1;
- request.paramsData[0].protocolLayer = HDD_FILTER_PROTO_TYPE_MAC;
- request.paramsData[0].cmpFlag = HDD_FILTER_CMP_TYPE_EQUAL;
- request.paramsData[0].dataOffset = WLAN_HDD_80211_FRM_DA_OFFSET;
- request.paramsData[0].dataLength = ETH_ALEN;
- memcpy(&(request.paramsData[0].compareData[0]),
- &(pAdapter->mc_addr_list.addr[i][0]), ETH_ALEN);
- /*set mulitcast filters*/
- hddLog(VOS_TRACE_LEVEL_INFO,
- "%s: %s multicast filter: addr ="
- MAC_ADDRESS_STR,
- __func__, set ? "setting" : "clearing",
- MAC_ADDR_ARRAY(request.paramsData[0].compareData));
+ /* Following pre-conditions should be satisfied before wei
+ * configure the MC address list.
+ */
+ if (((pAdapter->device_mode == WLAN_HDD_INFRA_STATION) ||
+ (pAdapter->device_mode == WLAN_HDD_P2P_CLIENT))
+ && pAdapter->mc_addr_list.mc_cnt
+ && (eConnectionState_Associated ==
+ (WLAN_HDD_GET_STATION_CTX_PTR(pAdapter))->conn_info.connState))
+ {
+ pMulticastAddrs->ulMulticastAddrCnt =
+ pAdapter->mc_addr_list.mc_cnt;
+ for (i = 0; i < pAdapter->mc_addr_list.mc_cnt; i++)
+ {
+ memcpy(&(pMulticastAddrs->multicastAddr[i][0]),
+ &(pAdapter->mc_addr_list.addr[i][0]),
+ sizeof(pAdapter->mc_addr_list.addr[i]));
+ hddLog(VOS_TRACE_LEVEL_INFO,
+ "%s: %s multicast filter: addr ="
+ MAC_ADDRESS_STR,
+ __func__, set ? "setting" : "clearing",
+ MAC_ADDR_ARRAY(pMulticastAddrs->multicastAddr[i]));
+ }
+ /* Set multicast filter */
+ sme_8023MulticastList(hHal, pAdapter->sessionId,
+ pMulticastAddrs);
+ }
+ }
+ else
+ {
+ /* Need to clear only if it was previously configured
+ */
+ if (pAdapter->mc_addr_list.isFilterApplied)
+ {
+ pMulticastAddrs->ulMulticastAddrCnt = 0;
+ sme_8023MulticastList(hHal, pAdapter->sessionId,
+ pMulticastAddrs);
+ }
+
}
- wlan_hdd_set_filter(pHddCtx, &request, pAdapter->sessionId);
+ pAdapter->mc_addr_list.isFilterApplied = set ? TRUE : FALSE;
}
- pAdapter->mc_addr_list.isFilterApplied = set ? TRUE : FALSE;
+ else
+ {
+ hddLog(VOS_TRACE_LEVEL_INFO,
+ FL("fEnableMCAddrList is not enabled in INI"));
+ }
+ return;
}
static int iw_set_packet_filter_params(struct net_device *dev, struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
-{
+{
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
tpPacketFilterCfg pRequest = (tpPacketFilterCfg)wrqu->data.pointer;
diff --git a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c
index 5992c6ead7c..d8a880286bf 100644
--- a/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c
+++ b/drivers/staging/prima/CORE/HDD/src/wlan_hdd_wmm.c
@@ -81,6 +81,7 @@
#include <linux/semaphore.h>
#include <wlan_hdd_hostapd.h>
#include <wlan_hdd_softap_tx_rx.h>
+#include <vos_sched.h>
// change logging behavior based upon debug flag
#ifdef HDD_WMM_DEBUG
@@ -1813,6 +1814,14 @@ v_U16_t hdd_wmm_select_queue(struct net_device * dev, struct sk_buff *skb)
hdd_adapter_t *pAdapter = WLAN_HDD_GET_PRIV_PTR(dev);
+ if (isWDresetInProgress())
+ {
+ VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_WARN,
+ FL("called during WDReset"));
+ skb->priority = SME_QOS_WMM_UP_BE;
+ return HDD_LINUX_AC_BE;
+ }
+
// if we don't want QoS or the AP doesn't support Qos
// All traffic will get equal opportuniy to transmit data frames.
if( hdd_wmm_is_active(pAdapter) ) {
diff --git a/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h b/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h
index 50398427319..7bc4959e549 100644
--- a/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h
+++ b/drivers/staging/prima/CORE/MAC/inc/qwlan_version.h
@@ -60,9 +60,9 @@ BRIEF DESCRIPTION:
#define QWLAN_VERSION_MINOR 2
#define QWLAN_VERSION_PATCH 3
#define QWLAN_VERSION_EXTRA ""
-#define QWLAN_VERSION_BUILD 13
+#define QWLAN_VERSION_BUILD 18
-#define QWLAN_VERSIONSTR "3.2.3.13"
+#define QWLAN_VERSIONSTR "3.2.3.18"
#endif /* QWLAN_VERSION_H */
diff --git a/drivers/staging/prima/CORE/MAC/inc/wniCfgAp.h b/drivers/staging/prima/CORE/MAC/inc/wniCfgAp.h
index 615ff731050..fcf8f83c684 100644
--- a/drivers/staging/prima/CORE/MAC/inc/wniCfgAp.h
+++ b/drivers/staging/prima/CORE/MAC/inc/wniCfgAp.h
@@ -360,6 +360,8 @@
#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED 295
#define WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP 296
#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT 297
+#define WNI_CFG_RA_FILTER_ENABLE 298
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL 299
/*
* String parameter lengths
@@ -2486,10 +2488,26 @@
#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT_APMAX 255
#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT_APDEF 3
-#define CFG_PARAM_MAX_NUM 298
-#define CFG_AP_IBUF_MAX_SIZE 237
+#define WNI_CFG_RA_FILTER_ENABLE_STAMIN 0
+#define WNI_CFG_RA_FILTER_ENABLE_STAMAX 1
+#define WNI_CFG_RA_FILTER_ENABLE_STADEF 1
+
+#define WNI_CFG_RA_FILTER_ENABLE_APMIN 0
+#define WNI_CFG_RA_FILTER_ENABLE_APMAX 1
+#define WNI_CFG_RA_FILTER_ENABLE_APDEF 1
+
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_STAMIN 0
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_STAMAX 60
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_STADEF 60
+
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_APMIN 0
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_APMAX 60
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_APDEF 60
+
+#define CFG_PARAM_MAX_NUM 300
+#define CFG_AP_IBUF_MAX_SIZE 239
#define CFG_AP_SBUF_MAX_SIZE 3422
-#define CFG_STA_IBUF_MAX_SIZE 232
+#define CFG_STA_IBUF_MAX_SIZE 234
#define CFG_STA_SBUF_MAX_SIZE 3388
#define CFG_SEM_MAX_NUM 19
diff --git a/drivers/staging/prima/CORE/MAC/inc/wniCfgSta.h b/drivers/staging/prima/CORE/MAC/inc/wniCfgSta.h
index 4d1e31a012d..caa5a0099e2 100644
--- a/drivers/staging/prima/CORE/MAC/inc/wniCfgSta.h
+++ b/drivers/staging/prima/CORE/MAC/inc/wniCfgSta.h
@@ -354,6 +354,8 @@
#define WNI_CFG_ENABLE_MCC_ADAPTIVE_SCHED 295
#define WNI_CFG_DISABLE_LDPC_WITH_TXBF_AP 296
#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT 297
+#define WNI_CFG_RA_FILTER_ENABLE 298
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL 299
/*
* String parameter lengths
@@ -1615,8 +1617,16 @@
#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT_STAMAX 255
#define WNI_CFG_AP_LINK_MONITOR_TIMEOUT_STADEF 3
-#define CFG_PARAM_MAX_NUM 298
-#define CFG_STA_IBUF_MAX_SIZE 232
+#define WNI_CFG_RA_FILTER_ENABLE_STAMIN 0
+#define WNI_CFG_RA_FILTER_ENABLE_STAMAX 1
+#define WNI_CFG_RA_FILTER_ENABLE_STADEF 1
+
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_STAMIN 0
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_STAMAX 60
+#define WNI_CFG_RA_RATE_LIMIT_INTERVAL_STADEF 60
+
+#define CFG_PARAM_MAX_NUM 300
+#define CFG_STA_IBUF_MAX_SIZE 234
#define CFG_STA_SBUF_MAX_SIZE 3388
#define CFG_SEM_MAX_NUM 19
diff --git a/drivers/staging/prima/CORE/MAC/src/cfg/cfgParamName.c b/drivers/staging/prima/CORE/MAC/src/cfg/cfgParamName.c
index c0db1a067af..81a01e6b482 100644
--- a/drivers/staging/prima/CORE/MAC/src/cfg/cfgParamName.c
+++ b/drivers/staging/prima/CORE/MAC/src/cfg/cfgParamName.c
@@ -350,6 +350,8 @@ unsigned char *gCfgParamName[] = {
(unsigned char *)"ENABLE_MCC_ADAPTIVE_SCHED",
(unsigned char *)"DISABLE_LDPC_WITH_TXBF_AP",
(unsigned char *)"AP_LINK_MONITOR_TIMEOUT",
+ (unsigned char *)"RA_FILTER_ENABLE",
+ (unsigned char *)"RA_RATE_LIMIT_INTERVAL",
};
diff --git a/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/cfg.txt b/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/cfg.txt
index 7240b7db62f..e32ca7bcce4 100644
--- a/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/cfg.txt
+++ b/drivers/staging/prima/CORE/MAC/src/cfg/cfgUtil/cfg.txt
@@ -1,4 +1,4 @@
-/*
+ *
* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
@@ -17,7 +17,7 @@
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
- */
+ *
* Copyright (c) 2012, The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
@@ -4498,3 +4498,27 @@ HAL
V RW NP
HAL
1 255 3
+
+* RA filter enable/disable
+*
+WNI_CFG_RA_FILTER_ENABLE I 4 7
+V RW NP
+HAL
+0 1 1
+V RW NP
+HAL
+0 1 1
+*
+*
+
+* RA filter rate interval
+*
+WNI_CFG_RA_RATE_LIMIT_INTERVAL I 4 7
+V RW NP
+HAL
+0 60 60
+V RW NP
+HAL
+0 60 60
+*
+*
diff --git a/drivers/staging/prima/CORE/MAC/src/include/sirParams.h b/drivers/staging/prima/CORE/MAC/src/include/sirParams.h
index f539fb274f5..42144cf372b 100644
--- a/drivers/staging/prima/CORE/MAC/src/include/sirParams.h
+++ b/drivers/staging/prima/CORE/MAC/src/include/sirParams.h
@@ -97,6 +97,7 @@ typedef enum {
#ifdef WLAN_FEATURE_ROAM_SCAN_OFFLOAD
WLAN_ROAM_SCAN_OFFLOAD = 23,
#endif
+ EXTENDED_NSOFFLOAD_SLOT = 24,
//MAX_FEATURE_SUPPORTED = 128
} placeHolderInCapBitmap;
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
index bebfa11b842..c6ece4d95c9 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limProcessBeaconFrame.c
@@ -157,14 +157,9 @@ limProcessBeaconFrame(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo,tpPESession ps
if ((pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
(pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE))
{
- //If we are scanning for P2P, only accept probe rsp
- if((pMac->lim.gLimHalScanState != eLIM_HAL_SCANNING_STATE) || (NULL == pMac->lim.gpLimMlmScanReq)
- || !pMac->lim.gpLimMlmScanReq->p2pSearch )
- {
- limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo,
- ((pMac->lim.gLimHalScanState == eLIM_HAL_SCANNING_STATE) ? eANI_BOOLEAN_TRUE : eANI_BOOLEAN_FALSE),
- eANI_BOOLEAN_FALSE);
- }
+ limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo,
+ ((pMac->lim.gLimHalScanState == eLIM_HAL_SCANNING_STATE) ? eANI_BOOLEAN_TRUE : eANI_BOOLEAN_FALSE),
+ eANI_BOOLEAN_FALSE);
}
else if (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE)
{
@@ -281,12 +276,8 @@ limProcessBeaconFrameNoSession(tpAniSirGlobal pMac, tANI_U8 *pRxPacketInfo)
if ( (pMac->lim.gLimMlmState == eLIM_MLM_WT_PROBE_RESP_STATE) ||
(pMac->lim.gLimMlmState == eLIM_MLM_PASSIVE_SCAN_STATE) )
{
- //If we are scanning for P2P, only accept probe rsp
- if((pMac->lim.gLimHalScanState != eLIM_HAL_SCANNING_STATE) || (NULL == pMac->lim.gpLimMlmScanReq)
- || !pMac->lim.gpLimMlmScanReq->p2pSearch )
- {
- limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_FALSE);
- }
+ limCheckAndAddBssDescription(pMac, pBeacon, pRxPacketInfo,
+ eANI_BOOLEAN_TRUE, eANI_BOOLEAN_FALSE);
}
else if (pMac->lim.gLimMlmState == eLIM_MLM_LEARN_STATE)
{
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.c b/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.c
index abd96363fb0..4ce22cc09d3 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.c
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.c
@@ -139,14 +139,14 @@ limDeactivateMinChannelTimerDuringScan(tpAniSirGlobal pMac)
* @return None
*/
#if defined WLAN_FEATURE_VOWIFI
-void
+eHalStatus
limCollectBssDescription(tpAniSirGlobal pMac,
tSirBssDescription *pBssDescr,
tpSirProbeRespBeacon pBPR,
tANI_U8 *pRxPacketInfo,
tANI_U8 fScanning)
#else
-void
+eHalStatus
limCollectBssDescription(tpAniSirGlobal pMac,
tSirBssDescription *pBssDescr,
tpSirProbeRespBeacon pBPR,
@@ -165,6 +165,17 @@ limCollectBssDescription(tpAniSirGlobal pMac,
rxChannel = WDA_GET_RX_CH(pRxPacketInfo);
pBody = WDA_GET_RX_MPDU_DATA(pRxPacketInfo);
+ /**
+ * Drop all the beacons and probe response without P2P IE during P2P search
+ */
+ if (NULL != pMac->lim.gpLimMlmScanReq && pMac->lim.gpLimMlmScanReq->p2pSearch)
+ {
+ if (NULL == limGetP2pIEPtr(pMac, (pBody + SIR_MAC_B_PR_SSID_OFFSET), ieLen))
+ {
+ limLog( pMac, LOG3, MAC_ADDRESS_STR, MAC_ADDR_ARRAY(pHdr->bssId));
+ return eHAL_STATUS_FAILURE;
+ }
+ }
/**
* Length of BSS desription is without length of
@@ -283,7 +294,7 @@ limCollectBssDescription(tpAniSirGlobal pMac,
pBssDescr->aniIndicator,
ieLen );
- return;
+ return eHAL_STATUS_SUCCESS;
} /*** end limCollectBssDescription() ***/
/**
@@ -497,11 +508,19 @@ limCheckAndAddBssDescription(tpAniSirGlobal pMac,
// In scan state, store scan result.
#if defined WLAN_FEATURE_VOWIFI
- limCollectBssDescription(pMac, &pBssDescr->bssDescription,
+ status = limCollectBssDescription(pMac, &pBssDescr->bssDescription,
pBPR, pRxPacketInfo, fScanning);
+ if (eHAL_STATUS_SUCCESS != status)
+ {
+ goto last;
+ }
#else
- limCollectBssDescription(pMac, &pBssDescr->bssDescription,
+ status = limCollectBssDescription(pMac, &pBssDescr->bssDescription,
pBPR, pRxPacketInfo);
+ if (eHAL_STATUS_SUCCESS != status)
+ {
+ goto last;
+ }
#endif
/* Calling dfsChannelList which will convert DFS channel
* to Active channel for x secs if this channel is DFS channel */
@@ -595,10 +614,12 @@ limCheckAndAddBssDescription(tpAniSirGlobal pMac,
}
}//(eANI_BOOLEAN_TRUE == fScanning)
+last:
if( eHAL_STATUS_SUCCESS != status )
{
palFreeMemory( pMac->hHdd, pBssDescr );
}
+ return;
} /****** end limCheckAndAddBssDescription() ******/
diff --git a/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.h b/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.h
index b16147dd9a3..13aa8f4ec71 100644
--- a/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.h
+++ b/drivers/staging/prima/CORE/MAC/src/pe/lim/limScanResultUtils.h
@@ -76,13 +76,13 @@ void limReInitLfrScanResults(tpAniSirGlobal);
tANI_U32 limDeactivateMinChannelTimerDuringScan(tpAniSirGlobal);
void limCheckAndAddBssDescription(tpAniSirGlobal, tpSirProbeRespBeacon, tANI_U8 *, tANI_BOOLEAN, tANI_U8);
#if defined WLAN_FEATURE_VOWIFI
-void limCollectBssDescription(tpAniSirGlobal,
+eHalStatus limCollectBssDescription(tpAniSirGlobal,
tSirBssDescription *,
tpSirProbeRespBeacon,
tANI_U8 *,
tANI_U8);
#else
-void limCollectBssDescription(tpAniSirGlobal,
+eHalStatus limCollectBssDescription(tpAniSirGlobal,
tSirBssDescription *,
tpSirProbeRespBeacon,
tANI_U8 *);
diff --git a/drivers/staging/prima/CORE/SME/inc/csrApi.h b/drivers/staging/prima/CORE/SME/inc/csrApi.h
index 9373f0231f5..05a240f868a 100644
--- a/drivers/staging/prima/CORE/SME/inc/csrApi.h
+++ b/drivers/staging/prima/CORE/SME/inc/csrApi.h
@@ -846,8 +846,13 @@ typedef struct tagCsrRoamProfile
tANI_U8 *pWAPIReqIE; //If not null, it has the IE byte stream for WAPI
#endif /* FEATURE_WLAN_WAPI */
- tANI_U32 nAddIEScanLength; //The byte count in the pAddIE for scan (at the time of join)
- tANI_U8 *pAddIEScan; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
+ //The byte count in the pAddIE for scan (at the time of join)
+ tANI_U32 nAddIEScanLength;
+ /* Additional IE information.
+ * It has the IE byte stream for additional IE,
+ * which can be WSC IE and/or P2P IE
+ */
+ tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2]; //Additional IE information.
tANI_U32 nAddIEAssocLength; //The byte count in the pAddIE for assoc
tANI_U8 *pAddIEAssoc; //If not null, it has the IE byte stream for additional IE, which can be WSC IE and/or P2P IE
diff --git a/drivers/staging/prima/CORE/SME/inc/csrInternal.h b/drivers/staging/prima/CORE/SME/inc/csrInternal.h
index 366fa397ea3..91a8427afd6 100755
--- a/drivers/staging/prima/CORE/SME/inc/csrInternal.h
+++ b/drivers/staging/prima/CORE/SME/inc/csrInternal.h
@@ -883,8 +883,11 @@ typedef struct tagCsrRoamSession
tANI_U32 nWapiRspIeLength; //the byte count for pWapiRspIE
tANI_U8 *pWapiRspIE; //this contain the WAPI IE in beacon/probe rsp
#endif /* FEATURE_WLAN_WAPI */
- tANI_U32 nAddIEScanLength; //the byte count of pAddIeScanIE;
- tANI_U8 *pAddIEScan; //this contains the additional IE in (unicast) probe request at the time of join
+ tANI_U32 nAddIEScanLength; //length of addIeScan
+ /* This contains the additional IE in (unicast)
+ * probe request at the time of join
+ */
+ tANI_U8 addIEScan[SIR_MAC_MAX_IE_LENGTH+2];
tANI_U32 nAddIEAssocLength; //the byte count for pAddIeAssocIE
tANI_U8 *pAddIEAssoc; //this contains the additional IE in (re) assoc request
@@ -1109,10 +1112,6 @@ void csrScanSuspendIMPS( tpAniSirGlobal pMac );
void csrScanResumeIMPS( tpAniSirGlobal pMac );
eHalStatus csrInitGetChannels(tpAniSirGlobal pMac);
-// Getting the 5GHz Channel list
-eHalStatus csrGet5GChannels(tpAniSirGlobal pMac);
-// Getting the 2.4GHz Channel list
-eHalStatus csrGet24GChannels(tpAniSirGlobal pMac);
eHalStatus csrSetModifyProfileFields(tpAniSirGlobal pMac, tANI_U32 sessionId,
tCsrRoamModifyProfileFields *pModifyProfileFields);
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c b/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c
index 5f5653b9700..40c08303551 100644
--- a/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrApiRoam.c
@@ -1902,121 +1902,6 @@ eHalStatus csrIsValidChannel(tpAniSirGlobal pMac, tANI_U8 chnNum)
return status;
}
-eHalStatus csrGet5GChannels(tpAniSirGlobal pMac)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tANI_U8 num20MHzChannelsFound = 0;
- VOS_STATUS vosStatus;
- tANI_U8 num40MHzChannelsFound = 0;
- tANI_U8 Index = 0;
- tANI_U8 channelList = 0;
-
- // Updating the defaultpower Table for changed Domain Id
- vosStatus = vos_nv_getChannelListWithPower( pMac->scan.defaultPowerTable, &num20MHzChannelsFound,
- pMac->scan.defaultPowerTable40MHz, &num40MHzChannelsFound);
-
- if ( (VOS_STATUS_SUCCESS != vosStatus) || (num20MHzChannelsFound == 0) )
- {
- smsLog( pMac, LOGE, FL("failed to get channels"));
- status = eHAL_STATUS_FAILURE;
- }
- else
- {
- if ( num20MHzChannelsFound > WNI_CFG_VALID_CHANNEL_LIST_LEN )
- {
- num20MHzChannelsFound = WNI_CFG_VALID_CHANNEL_LIST_LEN;
- }
-
- // Move the only 5GHZ channel list to the global data,
- // As 2.4GHZ list coming from the AP for the changed domain
- // structure -- this will be used as the scan list
- for(channelList = 0; channelList < WNI_CFG_VALID_CHANNEL_LIST_LEN; channelList++)
- {
- // If Channel is 5GHz just break the for loop
- if(!(pMac->scan.base20MHzChannels.channelList[ channelList ] > 0 && pMac->scan.base20MHzChannels.channelList[ channelList ] <= 14))
- break;
- }
- // Update the 5G channels from nv.bin
- for ( Index = 0; Index < num20MHzChannelsFound; Index++)
- {
- if(pMac->scan.defaultPowerTable[Index].chanId >= 36 && pMac->scan.defaultPowerTable[Index].chanId <= 165)
- {
- if(channelList < WNI_CFG_VALID_CHANNEL_LIST_LEN)
- {
- pMac->scan.base20MHzChannels.channelList[ channelList ] = pMac->scan.defaultPowerTable[Index].chanId;
- channelList++;
- }
- }
- }
-
- pMac->scan.numChannelsDefault = (num20MHzChannelsFound > channelList) ? num20MHzChannelsFound : channelList;
- pMac->scan.base20MHzChannels.numChannels = (num20MHzChannelsFound > channelList) ? num20MHzChannelsFound : channelList;
- // Filling the remaining index as Zero Just for causion
- for(Index = pMac->scan.base20MHzChannels.numChannels; Index < WNI_CFG_VALID_CHANNEL_LIST_LEN; Index++)
- pMac->scan.base20MHzChannels.channelList[ Index ] = 0;
- }
- return status;
-}
-
-eHalStatus csrGet24GChannels(tpAniSirGlobal pMac)
-{
- eHalStatus status = eHAL_STATUS_SUCCESS;
- tANI_U8 num20MHzChannelsFound = 0;
- VOS_STATUS vosStatus;
- tANI_U8 Index = 0;
- tANI_U8 num40MHzChannelsFound = 0;
- tANI_U8 channelList5GBackup[WNI_CFG_VALID_CHANNEL_LIST_LEN] = {0}, nuum5GchannelListBackup;
- tANI_U8 channelList = 0;
-
- // Read the scan channel list (including the power limit) from EEPROM
- vosStatus = vos_nv_getChannelListWithPower( pMac->scan.defaultPowerTable, &num20MHzChannelsFound,
- pMac->scan.defaultPowerTable40MHz, &num40MHzChannelsFound);
-
- if ( (VOS_STATUS_SUCCESS != vosStatus) || (num20MHzChannelsFound == 0) )
- {
- smsLog( pMac, LOGE, FL("failed to get channels \n"));
- status = eHAL_STATUS_FAILURE;
- }
- else
- {
- if ( num20MHzChannelsFound > WNI_CFG_VALID_CHANNEL_LIST_LEN )
- {
- num20MHzChannelsFound = WNI_CFG_VALID_CHANNEL_LIST_LEN;
- }
-
- // Move the 2.4GHZ channel list only to the global data,
- // As 5GHz list been provided by AP as part of 11d IE
- // structure -- this will be used as the scan list
- for(channelList = 0, nuum5GchannelListBackup = 0; channelList < WNI_CFG_VALID_CHANNEL_LIST_LEN; channelList++)
- {
- if(pMac->scan.base20MHzChannels.channelList[ channelList ] >= 36 && pMac->scan.base20MHzChannels.channelList[ channelList ] <= 165)
- {
- // First taking the 5GHz channel list backup
- channelList5GBackup[nuum5GchannelListBackup] = pMac->scan.base20MHzChannels.channelList[ channelList ];
- nuum5GchannelListBackup++;
- }
- }
- // Updating the 2.4GHz list
- for ( Index = 0; Index < num20MHzChannelsFound; Index++)
- {
- if(pMac->scan.defaultPowerTable[Index].chanId > 0 && pMac->scan.defaultPowerTable[Index].chanId <= 14)
- pMac->scan.base20MHzChannels.channelList[ Index ] = pMac->scan.defaultPowerTable[Index].chanId;
- }
- // Restoring the Backed up 5 GHZ channels
- for(channelList = 0;channelList < nuum5GchannelListBackup; channelList++ )
- {
- if (Index < WNI_CFG_VALID_CHANNEL_LIST_LEN)
- {
- pMac->scan.base20MHzChannels.channelList[ Index ] = channelList5GBackup[channelList];
- Index++;
- }
- }
-
- pMac->scan.numChannelsDefault = (num20MHzChannelsFound > Index) ? num20MHzChannelsFound : Index;
- pMac->scan.base20MHzChannels.numChannels = (num20MHzChannelsFound > Index) ? num20MHzChannelsFound : Index;
- }
- return (status);
-}
eHalStatus csrInitGetChannels(tpAniSirGlobal pMac)
{
@@ -5745,15 +5630,19 @@ eHalStatus csrRoamCopyProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pDstProfile,
#endif /* FEATURE_WLAN_WAPI */
if(pSrcProfile->nAddIEScanLength)
{
- status = palAllocateMemory(pMac->hHdd,
- (void **)&pDstProfile->pAddIEScan, pSrcProfile->nAddIEScanLength);
- if(!HAL_STATUS_SUCCESS(status))
+ memset(pDstProfile->addIEScan, 0 , SIR_MAC_MAX_IE_LENGTH);
+ if ( SIR_MAC_MAX_IE_LENGTH >= pSrcProfile->nAddIEScanLength)
{
- break;
+ vos_mem_copy(pDstProfile->addIEScan, pSrcProfile->addIEScan,
+ pSrcProfile->nAddIEScanLength);
+ pDstProfile->nAddIEScanLength = pSrcProfile->nAddIEScanLength;
+ }
+ else
+ {
+ VOS_TRACE( VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_ERROR,
+ FL(" AddIEScanLength is not valid %u"),
+ pSrcProfile->nAddIEScanLength);
}
- pDstProfile->nAddIEScanLength = pSrcProfile->nAddIEScanLength;
- palCopyMemory(pMac->hHdd, pDstProfile->pAddIEScan, pSrcProfile->pAddIEScan,
- pSrcProfile->nAddIEScanLength);
}
if(pSrcProfile->nAddIEAssocLength)
{
@@ -6953,7 +6842,17 @@ void csrRoamReissueRoamCommand(tpAniSirGlobal pMac)
smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
return;
}
-
+
+ /* While switching between two AP, csr will reissue roam command again
+ to the nextbss if it was interrupted by the dissconnect req for the
+ previous bss.During this csr is incrementing bRefAssocStartCnt twice.
+ so reset the bRefAssocStartCnt.
+ */
+ if(pSession->bRefAssocStartCnt > 0)
+ {
+ pSession->bRefAssocStartCnt--;
+ }
+
if( pCommand->u.roamCmd.fStopWds )
{
palZeroMemory(pMac->hHdd, &roamInfo, sizeof(tCsrRoamInfo));
@@ -8630,7 +8529,6 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
tCsrRoamSession *pSession = NULL;
tpSirSmeSwitchChannelInd pSwitchChnInd;
tSmeMaxAssocInd *pSmeMaxAssocInd;
- tSmeCmd pCommand;
pSirMsg->messageType = (pSirMsg->messageType);
pSirMsg->length = (pSirMsg->length);
pSirMsg->statusCode = (pSirMsg->statusCode);
@@ -8712,77 +8610,105 @@ void csrRoamCheckForLinkStatusChange( tpAniSirGlobal pMac, tSirSmeRsp *pSirMsg )
}
break;
case eWNI_SME_DISASSOC_IND:
- smsLog( pMac, LOGE, FL("DISASSOCIATION Indication from MAC"));
- // Check if AP dis-associated us because of MIC failure. If so,
- // then we need to take action immediately and not wait till the
- // the WmStatusChange requests is pushed and processed
- pDisassocInd = (tSirSmeDisassocInd *)pSirMsg;
- status = csrRoamGetSessionIdFromBSSID( pMac, (tCsrBssid *)pDisassocInd->bssId, &sessionId );
- if( HAL_STATUS_SUCCESS( status ) )
{
- // If we are in neighbor preauth done state then on receiving
- // disassoc or deauth we dont roam instead we just disassoc
- // from current ap and then go to disconnected state
- // This happens for CCX and 11r FT connections ONLY.
-#ifdef WLAN_FEATURE_VOWIFI_11R
- if (csrRoamIs11rAssoc(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
+ // Check if AP dis-associated us because of MIC failure. If so,
+ // then we need to take action immediately and not wait till the
+ // the WmStatusChange requests is pushed and processed
+ tSmeCmd *pCommand;
+
+ pDisassocInd = (tSirSmeDisassocInd *)pSirMsg;
+ status = csrRoamGetSessionIdFromBSSID( pMac,
+ (tCsrBssid *)pDisassocInd->bssId, &sessionId );
+ if( HAL_STATUS_SUCCESS( status ) )
{
- csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
- }
+ smsLog( pMac, LOGE, FL("DISASSOCIATION Indication from MAC"
+ " for session %d "), sessionId);
+ smsLog( pMac, LOGE, FL("DISASSOCIATION from peer ="
+ MAC_ADDRESS_STR " "
+ " reason = %d status = %d "),
+ MAC_ADDR_ARRAY(pDisassocInd->peerMacAddr),
+ pDisassocInd->reasonCode,
+ pDisassocInd->statusCode);
+ // If we are in neighbor preauth done state then on receiving
+ // disassoc or deauth we dont roam instead we just disassoc
+ // from current ap and then go to disconnected state
+ // This happens for CCX and 11r FT connections ONLY.
+#ifdef WLAN_FEATURE_VOWIFI_11R
+ if (csrRoamIs11rAssoc(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
+ {
+ csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
+ }
#endif
#ifdef FEATURE_WLAN_CCX
- if (csrRoamIsCCXAssoc(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
- {
- csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
- }
+ if (csrRoamIsCCXAssoc(pMac) && (csrNeighborRoamStatePreauthDone(pMac)))
+ {
+ csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
+ }
#endif
#ifdef FEATURE_WLAN_LFR
- if (csrRoamIsFastRoamEnabled(pMac, sessionId) && (csrNeighborRoamStatePreauthDone(pMac)))
- {
- csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
- }
+ if (csrRoamIsFastRoamEnabled(pMac, sessionId) && (csrNeighborRoamStatePreauthDone(pMac)))
+ {
+ csrNeighborRoamTranistionPreauthDoneToDisconnected(pMac);
+ }
#endif
- pSession = CSR_GET_SESSION( pMac, sessionId );
+ pSession = CSR_GET_SESSION( pMac, sessionId );
- if(!pSession)
- {
- smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
- return;
- }
+ if (!pSession)
+ {
+ smsLog(pMac, LOGE, FL(" session %d not found "), sessionId);
+ return;
+ }
- if ( csrIsConnStateInfra( pMac, sessionId ) )
- {
- pSession->connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
- }
+ if ( csrIsConnStateInfra( pMac, sessionId ) )
+ {
+ pSession->connectState = eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED;
+ }
#ifndef WLAN_MDM_CODE_REDUCTION_OPT
- sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, SME_QOS_CSR_DISCONNECT_IND, NULL);
+ sme_QosCsrEventInd(pMac, (v_U8_t)sessionId, SME_QOS_CSR_DISCONNECT_IND, NULL);
#endif
- csrRoamLinkDown(pMac, sessionId);
- csrRoamIssueWmStatusChange( pMac, sessionId, eCsrDisassociated, pSirMsg );
- if(CSR_IS_INFRA_AP(&pSession->connectedProfile))
- {
-
- pRoamInfo = &roamInfo;
+ csrRoamLinkDown(pMac, sessionId);
+ csrRoamIssueWmStatusChange( pMac, sessionId, eCsrDisassociated, pSirMsg );
+ if (CSR_IS_INFRA_AP(&pSession->connectedProfile))
+ {
- pRoamInfo->statusCode = pDisassocInd->statusCode;
- pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
+ pCommand = csrGetCommandBuffer(pMac);
+ if (NULL == pCommand)
+ {
+ smsLog( pMac, LOGE, FL(" fail to get command buffer") );
+ status = eHAL_STATUS_RESOURCES;
+ }
+ pRoamInfo = &roamInfo;
+ pRoamInfo->statusCode = pDisassocInd->statusCode;
+ pRoamInfo->u.pConnectedProfile = &pSession->connectedProfile;
+ pRoamInfo->staId = (tANI_U8)pDisassocInd->staId;
- pRoamInfo->staId = (tANI_U8)pDisassocInd->staId;
+ vos_mem_copy(pRoamInfo->peerMac, pDisassocInd->peerMacAddr,
+ sizeof(tSirMacAddr));
+ vos_mem_copy(&pRoamInfo->bssid, pDisassocInd->bssId,
+ sizeof(tCsrBssid));
- palCopyMemory(pMac->hHdd, pRoamInfo->peerMac, pDisassocInd->peerMacAddr, sizeof(tSirMacAddr));
- palCopyMemory(pMac->hHdd, &pRoamInfo->bssid, pDisassocInd->bssId, sizeof(tCsrBssid));
+ status = csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0,
+ eCSR_ROAM_INFRA_IND, eCSR_ROAM_RESULT_DISASSOC_IND);
- status = csrRoamCallCallback(pMac, sessionId, pRoamInfo, 0, eCSR_ROAM_INFRA_IND, eCSR_ROAM_RESULT_DISASSOC_IND);
+ /*
+ * STA/P2P client got disassociated so remove any pending deauth
+ * commands in sme pending list
+ */
+ pCommand->command = eSmeCommandRoam;
+ pCommand->sessionId = (tANI_U8)sessionId;
+ pCommand->u.roamCmd.roamReason = eCsrForcedDeauthSta;
+ vos_mem_copy(pCommand->u.roamCmd.peerMac,
+ pDisassocInd->peerMacAddr,
+ sizeof(tSirMacAddr));
+ csrRoamRemoveDuplicateCommand(pMac, sessionId, pCommand, eCsrForcedDeauthSta);
+ csrReleaseCommand( pMac, pCommand );
- /*
- * STA/P2P client got disassociated so remove any pending deauth
- * commands in sme pending list
- */
- pCommand.command = eSmeCommandRoam;
- pCommand.sessionId = (tANI_U8)sessionId;
- pCommand.u.roamCmd.roamReason = eCsrForcedDeauthSta;
- vos_mem_copy(pCommand.u.roamCmd.peerMac, pDisassocInd->peerMacAddr, sizeof(tSirMacAddr));
- csrRoamRemoveDuplicateCommand(pMac, sessionId, &pCommand, eCsrForcedDeauthSta);
+ }
+ }
+ else
+ {
+ smsLog(pMac, LOGE, FL(" Session Id not found for BSSID " MAC_ADDRESS_STR),
+ MAC_ADDR_ARRAY(pDisassocInd->bssId));
}
}
break;
@@ -12004,36 +11930,22 @@ eHalStatus csrSendJoinReqMsg( tpAniSirGlobal pMac, tANI_U32 sessionId, tSirBssDe
}
#endif /* FEATURE_WLAN_CCX */
// addIEScan
- if(pProfile->nAddIEScanLength && pProfile->pAddIEScan)
+ if (pProfile->nAddIEScanLength)
{
ieLen = pProfile->nAddIEScanLength;
- if(ieLen > pSession->nAddIEScanLength)
- {
- if(pSession->pAddIEScan && pSession->nAddIEScanLength)
- {
- palFreeMemory(pMac->hHdd, pSession->pAddIEScan);
- }
- status = palAllocateMemory(pMac->hHdd,
- (void **)&pSession->pAddIEScan, ieLen);
- if(!HAL_STATUS_SUCCESS(status)) break;
- }
+ memset(pSession->addIEScan, 0 , pSession->nAddIEScanLength);
pSession->nAddIEScanLength = ieLen;
- palCopyMemory(pMac->hHdd, pSession->pAddIEScan,
- pProfile->pAddIEScan, ieLen);
+ vos_mem_copy(pSession->addIEScan, pProfile->addIEScan, ieLen);
wTmp = pal_cpu_to_be16( ieLen );
palCopyMemory( pMac->hHdd, pBuf, &wTmp, sizeof(tANI_U16) );
pBuf += sizeof(tANI_U16);
- palCopyMemory( pMac->hHdd, pBuf, pProfile->pAddIEScan, ieLen );
+ vos_mem_copy(pBuf, pProfile->addIEScan, ieLen);
pBuf += ieLen;
}
else
{
+ memset(pSession->addIEScan, 0, pSession->nAddIEScanLength);
pSession->nAddIEScanLength = 0;
- if(pSession->pAddIEScan)
- {
- palFreeMemory(pMac->hHdd, pSession->pAddIEScan);
- pSession->pAddIEScan = NULL;
- }
*pBuf = 0;
*(pBuf + 1) = 0;
pBuf += 2;
@@ -13549,10 +13461,9 @@ static void csrInitSession( tpAniSirGlobal pMac, tANI_U32 sessionId )
}
pSession->nWapiRspIeLength = 0;
#endif /* FEATURE_WLAN_WAPI */
- if(pSession->pAddIEScan)
+ if (pSession->nAddIEScanLength)
{
- palFreeMemory(pMac->hHdd, pSession->pAddIEScan);
- pSession->pAddIEScan = NULL;
+ memset(pSession->addIEScan, 0 , SIR_MAC_MAX_IE_LENGTH);
}
pSession->nAddIEScanLength = 0;
if(pSession->pAddIEAssoc)
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
index 839b1204379..ec7518752c6 100755
--- a/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrApiScan.c
@@ -3664,12 +3664,14 @@ void csrSetOppositeBandChannelInfo( tpAniSirGlobal pMac )
if ( CSR_IS_CHANNEL_5GHZ( pMac->scan.channelOf11dInfo ) )
{
// and the 2.4 band is empty, then populate the 2.4 channel info
+ if ( !csrLLIsListEmpty( &pMac->scan.channelPowerInfoList24, LL_ACCESS_LOCK ) ) break;
fPopulate5GBand = FALSE;
}
else
{
// else, we found channel info in the 2.4 GHz band. If the 5.0 band is empty
// set the 5.0 band info from the 2.4 country code.
+ if ( !csrLLIsListEmpty( &pMac->scan.channelPowerInfoList5G, LL_ACCESS_LOCK ) ) break;
fPopulate5GBand = TRUE;
}
csrSaveChannelPowerForBand( pMac, fPopulate5GBand );
@@ -3764,7 +3766,6 @@ void csrConstructCurrentValidChannelList( tpAniSirGlobal pMac, tDblLinkList *pCh
tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription *pSirBssDesc,
tDot11fBeaconIEs *pIes, tANI_BOOLEAN fForce)
{
- tANI_U8 Num2GChannels, bMaxNumChn;
eHalStatus status;
tANI_BOOLEAN fRet = eANI_BOOLEAN_FALSE;
v_REGDOMAIN_t domainId;
@@ -3884,56 +3885,66 @@ tANI_BOOLEAN csrLearnCountryInformation( tpAniSirGlobal pMac, tSirBssDescription
}
}
smsLog(pMac, LOG3, FL(" %d sets each one is %d"), pIesLocal->Country.num_triplets, sizeof(tSirMacChanInfo));
- // save the channel/power information from the Channel IE.
- //sizeof(tSirMacChanInfo) has to be 3
- if (eHAL_STATUS_SUCCESS != csrSaveToChannelPower2G_5G( pMac, pIesLocal->Country.num_triplets * sizeof(tSirMacChanInfo),
- (tSirMacChanInfo *)(&pIesLocal->Country.triplets[0]) ))
+
+ // set the indicator of the channel where the country IE was found...
+ pMac->scan.channelOf11dInfo = pSirBssDesc->channelId;
+ status = csrGetRegulatoryDomainForCountry(pMac,
+ pIesLocal->Country.country, &domainId );
+ if ( status != eHAL_STATUS_SUCCESS )
{
+ smsLog( pMac, LOGE, FL(" fail to get regId %d"), domainId );
fRet = eANI_BOOLEAN_FALSE;
return fRet;
}
-
- // set the indicator of the channel where the country IE was found...
- pMac->scan.channelOf11dInfo = pSirBssDesc->channelId;
- csrGetRegulatoryDomainForCountry(pMac, pIesLocal->Country.country, &domainId );
// Checking for Domain Id change
if ( domainId != pMac->scan.domainIdCurrent )
{
- tSirMacChanInfo* pMacChnSet = (tSirMacChanInfo *)(&pIesLocal->Country.triplets[0]);
- palCopyMemory( pMac->hHdd, pMac->scan.countryCode11d, pIesLocal->Country.country,
- sizeof( pMac->scan.countryCode11d ) );
+ vos_mem_copy(pMac->scan.countryCode11d,
+ pIesLocal->Country.country,
+ sizeof( pMac->scan.countryCode11d ) );
+ /* Set Current Country code and Current Regulatory domain */
+ status = csrSetRegulatoryDomain(pMac, domainId, NULL);
+ if (eHAL_STATUS_SUCCESS != status)
+ {
+ smsLog(pMac, LOGE, "Set Reg Domain Fail %d", status);
+ fRet = eANI_BOOLEAN_FALSE;
+ return fRet;
+ }
+ //csrSetRegulatoryDomain will fail if the country doesn't fit our domain criteria.
+ vos_mem_copy(pMac->scan.countryCodeCurrent,
+ pIesLocal->Country.country, WNI_CFG_COUNTRY_CODE_LEN);
+ //Simply set it to cfg.
csrSetCfgCountryCode(pMac, pIesLocal->Country.country);
- WDA_SetRegDomain(pMac, domainId);
- pMac->scan.domainIdCurrent = domainId;
- // Check whether AP provided the 2.4GHZ list or 5GHZ list
- if(CSR_IS_CHANNEL_24GHZ(pMacChnSet[0].firstChanNum))
+
+ /* overwrite the defualt country code */
+ vos_mem_copy(pMac->scan.countryCodeDefault,
+ pMac->scan.countryCodeCurrent,
+ WNI_CFG_COUNTRY_CODE_LEN);
+ /* Set Current RegDomain */
+ status = WDA_SetRegDomain(pMac, domainId);
+ if ( status != eHAL_STATUS_SUCCESS )
{
- // AP Provided the 2.4 Channels, Update the 5GHz channels from nv.bin
- csrGet5GChannels(pMac );
+ smsLog( pMac, LOGE, FL(" fail to Set regId %d"), domainId );
+ fRet = eANI_BOOLEAN_FALSE;
+ return fRet;
}
- else
+ /* set to default domain ID */
+ pMac->scan.domainIdCurrent = domainId;
+ /* get the channels based on new cc */
+ status = csrInitGetChannels( pMac );
+
+ if ( status != eHAL_STATUS_SUCCESS )
{
- // AP Provided the 5G Channels, Update the 2.4GHZ channel list from nv.bin
- csrGet24GChannels(pMac );
+ smsLog( pMac, LOGE, FL(" fail to get Channels "));
+ fRet = eANI_BOOLEAN_FALSE;
+ return fRet;
}
- }
- // Populate both band channel lists based on what we found in the country information...
- csrSetOppositeBandChannelInfo( pMac );
- bMaxNumChn = WNI_CFG_VALID_CHANNEL_LIST_LEN;
- // construct 2GHz channel list first
- csrConstructCurrentValidChannelList( pMac, &pMac->scan.channelPowerInfoList24, pMac->scan.channels11d.channelList,
- bMaxNumChn, &Num2GChannels );
- // construct 5GHz channel list now
- if(bMaxNumChn > Num2GChannels)
- {
- csrConstructCurrentValidChannelList( pMac, &pMac->scan.channelPowerInfoList5G, pMac->scan.channels11d.channelList + Num2GChannels,
- bMaxNumChn - Num2GChannels,
- &pMac->scan.channels11d.numChannels );
- }
- pMac->scan.channels11d.numChannels += Num2GChannels;
- fRet = eANI_BOOLEAN_TRUE;
+ /* reset info based on new cc, and we are done */
+ csrResetCountryInformation(pMac, eANI_BOOLEAN_TRUE, eANI_BOOLEAN_TRUE);
+ fRet = eANI_BOOLEAN_TRUE;
+ }
} while( 0 );
if( !pIes && pIesLocal )
@@ -6774,7 +6785,7 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
{
pScanCmd->u.scanCmd.u.scanRequest.p2pSearch = 1;
}
- if(pProfile->pAddIEScan)
+ if(pProfile->nAddIEScanLength)
{
status = palAllocateMemory(pMac->hHdd,
(void **)&pScanCmd->u.scanCmd.u.scanRequest.pIEField,
@@ -6782,7 +6793,7 @@ eHalStatus csrScanForSSID(tpAniSirGlobal pMac, tANI_U32 sessionId, tCsrRoamProfi
palZeroMemory(pMac->hHdd, pScanCmd->u.scanCmd.u.scanRequest.pIEField, pProfile->nAddIEScanLength);
if(HAL_STATUS_SUCCESS(status))
{
- palCopyMemory(pMac->hHdd, pScanCmd->u.scanCmd.u.scanRequest.pIEField, pProfile->pAddIEScan, pProfile->nAddIEScanLength);
+ palCopyMemory(pMac->hHdd, pScanCmd->u.scanCmd.u.scanRequest.pIEField, pProfile->addIEScan, pProfile->nAddIEScanLength);
pScanCmd->u.scanCmd.u.scanRequest.uIEFieldLen = pProfile->nAddIEScanLength;
}
else
diff --git a/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c b/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c
index a315822efb6..7e38dc47de4 100644
--- a/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c
+++ b/drivers/staging/prima/CORE/SME/src/csr/csrUtil.c
@@ -5759,11 +5759,10 @@ void csrReleaseProfile(tpAniSirGlobal pMac, tCsrRoamProfile *pProfile)
pProfile->pWAPIReqIE = NULL;
}
#endif /* FEATURE_WLAN_WAPI */
-
- if(pProfile->pAddIEScan)
+ if (pProfile->nAddIEScanLength)
{
- palFreeMemory(pMac->hHdd, pProfile->pAddIEScan);
- pProfile->pAddIEScan = NULL;
+ memset(pProfile->addIEScan, 0 , SIR_MAC_MAX_IE_LENGTH+2);
+ pProfile->nAddIEScanLength = 0;
}
if(pProfile->pAddIEAssoc)
diff --git a/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c b/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c
index 1f50bc871f1..ccedacffa44 100755
--- a/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c
+++ b/drivers/staging/prima/CORE/SME/src/sme_common/sme_Api.c
@@ -5960,6 +5960,11 @@ eHalStatus sme_PreferredNetworkFoundInd (tHalHandle hHal, void* pMsg)
smsLog(pMac, LOG2, "%s:SSID=%s frame length %d",
__func__, dumpSsId, pPrefNetworkFoundInd->frameLength);
+ /* Flush scan results, So as to avoid indication/updation of
+ * stale entries, which may not have aged out during APPS collapse
+ */
+ sme_ScanFlushResult(hHal,0);
+
//Save the frame to scan result
if (pPrefNetworkFoundInd->mesgLen > sizeof(tSirPrefNetworkFoundInd))
{
diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_sched.c b/drivers/staging/prima/CORE/VOSS/src/vos_sched.c
index cff46c48882..32c8a0ba875 100644
--- a/drivers/staging/prima/CORE/VOSS/src/vos_sched.c
+++ b/drivers/staging/prima/CORE/VOSS/src/vos_sched.c
@@ -626,7 +626,8 @@ VosMCThread
"%s: MC Thread exiting!!!!", __func__);
complete_and_exit(&pSchedContext->McShutdown, 0);
} /* VosMCThread() */
-int isWDresetInProgress(void)
+
+v_BOOL_t isWDresetInProgress(void)
{
VOS_TRACE(VOS_MODULE_ID_VOSS, VOS_TRACE_LEVEL_INFO,
"%s: Reset is in Progress...",__func__);
@@ -636,7 +637,7 @@ int isWDresetInProgress(void)
}
else
{
- return 0;
+ return FALSE;
}
}
/*---------------------------------------------------------------------------
diff --git a/drivers/staging/prima/CORE/VOSS/src/vos_sched.h b/drivers/staging/prima/CORE/VOSS/src/vos_sched.h
index 8426b2a3fb4..9bac9d4226e 100644
--- a/drivers/staging/prima/CORE/VOSS/src/vos_sched.h
+++ b/drivers/staging/prima/CORE/VOSS/src/vos_sched.h
@@ -504,5 +504,6 @@ void clearWlanResetReason(void);
void vos_timer_module_init( void );
VOS_STATUS vos_watchdog_wlan_shutdown(void);
VOS_STATUS vos_watchdog_wlan_re_init(void);
+v_BOOL_t isWDresetInProgress(void);
#endif // #if !defined __VOSS_SCHED_H
diff --git a/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c b/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c
index 2ff8273ece0..f26d559cf84 100644
--- a/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c
+++ b/drivers/staging/prima/CORE/WDA/src/wlan_qct_wda.c
@@ -1477,6 +1477,38 @@ VOS_STATUS WDA_prepareConfigTLV(v_PVOID_t pVosContext,
tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct
+ sizeof(tHalCfg) + tlvStruct->length) ;
+ /* QWLAN_HAL_CFG_RA_FILTER_ENABLE */
+ tlvStruct->type = QWLAN_HAL_CFG_RA_FILTER_ENABLE ;
+ tlvStruct->length = sizeof(tANI_U32);
+ configDataValue = (tANI_U32 *)(tlvStruct + 1);
+
+ if (wlan_cfgGetInt(pMac, WNI_CFG_RA_FILTER_ENABLE,
+ configDataValue ) != eSIR_SUCCESS)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ "Failed to get value for WNI_CFG_RA_FILTER_ENABLE");
+ goto handle_failure;
+ }
+
+ tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct
+ + sizeof(tHalCfg) + tlvStruct->length) ;
+
+ /* QWLAN_HAL_CFG_RA_RATE_LIMIT_INTERVAL */
+ tlvStruct->type = QWLAN_HAL_CFG_RA_RATE_LIMIT_INTERVAL ;
+ tlvStruct->length = sizeof(tANI_U32);
+ configDataValue = (tANI_U32 *)(tlvStruct + 1);
+
+ if (wlan_cfgGetInt(pMac, WNI_CFG_RA_RATE_LIMIT_INTERVAL,
+ configDataValue ) != eSIR_SUCCESS)
+ {
+ VOS_TRACE( VOS_MODULE_ID_WDA, VOS_TRACE_LEVEL_ERROR,
+ "Failed to get value for WNI_CFG_RA_RATE_LIMIT_INTERVAL");
+ goto handle_failure;
+ }
+
+ tlvStruct = (tHalCfg *)( (tANI_U8 *) tlvStruct
+ + sizeof(tHalCfg) + tlvStruct->length) ;
+
wdiStartParams->usConfigBufferLen = (tANI_U8 *)tlvStruct - tlvStructStart ;
#ifdef WLAN_DEBUG
{
diff --git a/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat b/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat
index a5ee46c6abd..16ba06f087a 100644
--- a/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat
+++ b/drivers/staging/prima/firmware_bin/WCNSS_cfg.dat
Binary files differ
diff --git a/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini b/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini
index 8b32fbd0c1b..ae2894a18dd 100644
--- a/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini
+++ b/drivers/staging/prima/firmware_bin/WCNSS_qcom_cfg.ini
@@ -396,6 +396,20 @@ gRrmOperChanMax=8
gRrmNonOperChanMax=8
gRrmRandIntvl=100
+# TDLS Support
+gEnableTDLSSupport=1
+gEnableTDLSImplicitTrigger=1
+gTDLSExternalControl=1
+gTDLSTxStatsPeriod=500
+gTDLSTxPacketThreshold=10
+gTDLSDiscoveryPeriod=20000
+gTDLSMaxDiscoveryAttempt=5
+gTDLSIdleTimeout=40000
+gTDLSRssiHysteresis=100
+gTDLSRSSITriggerThreshold=-60
+gTDLSIdlePacketThreshold=5
+gTDLSRSSITeardownThreshold=-70
+
END
# Note: Configuration parser would not read anything past the END marker
diff --git a/drivers/staging/prima/riva/inc/wlan_hal_cfg.h b/drivers/staging/prima/riva/inc/wlan_hal_cfg.h
index c9a319c7756..899577e0b91 100644
--- a/drivers/staging/prima/riva/inc/wlan_hal_cfg.h
+++ b/drivers/staging/prima/riva/inc/wlan_hal_cfg.h
@@ -155,8 +155,9 @@
#define QWLAN_HAL_CFG_ENABLE_DETECT_PS_SUPPORT 101
#define QWLAN_HAL_CFG_AP_LINK_MONITOR_TIMEOUT 102
#define QWLAN_HAL_CFG_BTC_DWELL_TIME_MULTIPLIER 103
-#define QWLAN_HAL_CFG_ENABLE_TDLS_OXYGEN_MODE 104
-#define QWLAN_HAL_CFG_MAX_PARAMS 105
+#define QWLAN_HAL_CFG_RA_FILTER_ENABLE 104
+#define QWLAN_HAL_CFG_RA_RATE_LIMIT_INTERVAL 105
+#define QWLAN_HAL_CFG_MAX_PARAMS 106
diff --git a/drivers/staging/prima/riva/inc/wlan_hal_msg.h b/drivers/staging/prima/riva/inc/wlan_hal_msg.h
index 3526e330cd2..ff26657ce95 100644
--- a/drivers/staging/prima/riva/inc/wlan_hal_msg.h
+++ b/drivers/staging/prima/riva/inc/wlan_hal_msg.h
@@ -5666,6 +5666,7 @@ typedef enum {
RATECTRL = 21,
WOW = 22,
WLAN_ROAM_SCAN_OFFLOAD = 23,
+ EXTENDED_NSOFFLOAD_SLOT = 24,
//MAX_FEATURE_SUPPORTED = 128
} placeHolderInCapBitmap;
diff --git a/drivers/usb/gadget/f_accessory.c b/drivers/usb/gadget/f_accessory.c
index 42a6c43aaf1..61fd736bebb 100644
--- a/drivers/usb/gadget/f_accessory.c
+++ b/drivers/usb/gadget/f_accessory.c
@@ -261,8 +261,10 @@ static void acc_complete_in(struct usb_ep *ep, struct usb_request *req)
{
struct acc_dev *dev = _acc_dev;
- if (req->status != 0)
+ if (req->status == -ESHUTDOWN) {
+ pr_debug("acc_complete_in set disconnected");
acc_set_disconnected(dev);
+ }
req_put(dev, &dev->tx_idle, req);
@@ -274,8 +276,10 @@ static void acc_complete_out(struct usb_ep *ep, struct usb_request *req)
struct acc_dev *dev = _acc_dev;
dev->rx_done = 1;
- if (req->status != 0)
+ if (req->status == -ESHUTDOWN) {
+ pr_debug("acc_complete_out set disconnected");
acc_set_disconnected(dev);
+ }
wake_up(&dev->read_wq);
}
@@ -557,8 +561,10 @@ static ssize_t acc_read(struct file *fp, char __user *buf,
pr_debug("acc_read(%d)\n", count);
- if (dev->disconnected)
+ if (dev->disconnected) {
+ pr_debug("acc_read disconnected");
return -ENODEV;
+ }
if (count > BULK_BUFFER_SIZE)
count = BULK_BUFFER_SIZE;
@@ -571,6 +577,12 @@ static ssize_t acc_read(struct file *fp, char __user *buf,
goto done;
}
+ if (dev->rx_done) {
+ // last req cancelled. try to get it.
+ req = dev->rx_req[0];
+ goto copy_data;
+ }
+
requeue_req:
/* queue a request */
req = dev->rx_req[0];
@@ -588,9 +600,17 @@ requeue_req:
ret = wait_event_interruptible(dev->read_wq, dev->rx_done);
if (ret < 0) {
r = ret;
- usb_ep_dequeue(dev->ep_out, req);
+ ret = usb_ep_dequeue(dev->ep_out, req);
+ if (ret != 0) {
+ // cancel failed. There can be a data already received.
+ // it will be retrieved in the next read.
+ pr_debug("acc_read: cancelling failed %d", ret);
+ }
goto done;
}
+
+copy_data:
+ dev->rx_done = 0;
if (dev->online) {
/* If we got a 0-len packet, throw it back and try again. */
if (req->actual == 0)
@@ -619,8 +639,10 @@ static ssize_t acc_write(struct file *fp, const char __user *buf,
pr_debug("acc_write(%d)\n", count);
- if (!dev->online || dev->disconnected)
+ if (!dev->online || dev->disconnected) {
+ pr_debug("acc_write disconnected or not online");
return -ENODEV;
+ }
while (count > 0) {
if (!dev->online) {
diff --git a/drivers/video/msm/mdp4_overlay.c b/drivers/video/msm/mdp4_overlay.c
index b0cef309ed7..c3b92759b06 100644
--- a/drivers/video/msm/mdp4_overlay.c
+++ b/drivers/video/msm/mdp4_overlay.c
@@ -143,9 +143,9 @@ static int mdp4_map_sec_resource(struct msm_fb_data_type *mfd)
return -ENODEV;
}
- pr_debug("%s %d mfd->index=%d,mapped=%d,active=%d\n",
+ pr_debug("%s %d mfd->index=%d,mapped=%d\n",
__func__, __LINE__,
- mfd->index, mfd->sec_mapped, mfd->sec_active);
+ mfd->index, mfd->sec_mapped);
if (mfd->sec_mapped)
return 0;
@@ -168,18 +168,31 @@ static int mdp4_map_sec_resource(struct msm_fb_data_type *mfd)
int mdp4_unmap_sec_resource(struct msm_fb_data_type *mfd)
{
int ret = 0;
+ int i, sec_cnt = 0;
+ struct mdp4_overlay_pipe *pipe;
+
if (!mfd) {
pr_err("%s: mfd is invalid\n", __func__);
return -ENODEV;
}
- if ((mfd->sec_mapped == 0) || (mfd->sec_active))
+ if (mfd->sec_mapped == 0)
+ return 0;
+
+ for (i = 0; i < OVERLAY_PIPE_MAX; i++) {
+ pipe = &ctrl->plist[i];
+ if ((pipe->mixer_num == mfd->index) &&
+ pipe->flags & MDP_SECURE_OVERLAY_SESSION)
+ sec_cnt++;
+ }
+
+ if (sec_cnt)
return 0;
- pr_debug("%s %d mfd->index=%d,mapped=%d,active=%d\n",
+ pr_debug("%s %d mfd->index=%d,mapped=%d\n",
__func__, __LINE__,
- mfd->index, mfd->sec_mapped, mfd->sec_active);
+ mfd->index, mfd->sec_mapped);
ret = mdp_enable_iommu_clocks();
if (ret) {
@@ -3326,7 +3339,6 @@ int mdp4_overlay_set(struct fb_info *info, struct mdp_overlay *req)
if (pipe->flags & MDP_SECURE_OVERLAY_SESSION) {
mdp4_map_sec_resource(mfd);
- mfd->sec_active = TRUE;
}
/* return id back to user */
@@ -3442,8 +3454,6 @@ int mdp4_overlay_unset(struct fb_info *info, int ndx)
mdp4_stat.overlay_unset[pipe->mixer_num]++;
- if (pipe->flags & MDP_SECURE_OVERLAY_SESSION)
- mfd->sec_active = FALSE;
mdp4_overlay_pipe_free(pipe);
mutex_unlock(&mfd->dma->ov_mutex);
diff --git a/drivers/video/msm/msm_fb.h b/drivers/video/msm/msm_fb.h
index 086cf2411d5..e39709f9621 100644
--- a/drivers/video/msm/msm_fb.h
+++ b/drivers/video/msm/msm_fb.h
@@ -208,7 +208,6 @@ struct msm_fb_data_type {
boolean panel_driver_on;
int vsync_sysfs_created;
uint32 sec_mapped;
- uint32 sec_active;
};
struct msm_fb_backup_type {
struct fb_info info;