kernel-module-qualcomm: fix concurrency and p2p support
Fix support for concurrency and some P2P modes by initializing the interface with all the adapter completion variables. https://jira.digi.com/browse/DEL-3072 https://jira.digi.com/browse/DEL-3037 Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
This commit is contained in:
parent
86cb5b15ae
commit
f8c901b376
|
|
@ -32,6 +32,9 @@ SRC_URI = " \
|
||||||
file://0013-Kbuild-do-not-create-an-auxiliar-p2p-on-init.patch \
|
file://0013-Kbuild-do-not-create-an-auxiliar-p2p-on-init.patch \
|
||||||
file://0014-Kbuild-do-not-compile-the-DEBUG-version-inconditiona.patch \
|
file://0014-Kbuild-do-not-compile-the-DEBUG-version-inconditiona.patch \
|
||||||
file://0015-Kbuild-Group-most-of-the-relevant-DEBUG-options.patch \
|
file://0015-Kbuild-Group-most-of-the-relevant-DEBUG-options.patch \
|
||||||
|
file://0016-wlan_hdd_cfg80211-fix-missing-ifdef-clause.patch \
|
||||||
|
file://0017-Add-.gitignore-rules.patch \
|
||||||
|
file://0018-wlan_hdd_main-initialize-all-adapter-completion-vari.patch \
|
||||||
"
|
"
|
||||||
|
|
||||||
S = "${WORKDIR}/${PV}"
|
S = "${WORKDIR}/${PV}"
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,28 @@
|
||||||
|
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
|
Date: Fri, 14 Oct 2016 10:28:29 +0200
|
||||||
|
Subject: [PATCH] wlan_hdd_cfg80211: fix missing ifdef clause
|
||||||
|
|
||||||
|
Fix the compilation for old kernels by defining a missing "ifdef" clause.
|
||||||
|
|
||||||
|
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
|
---
|
||||||
|
CORE/HDD/inc/wlan_hdd_cfg80211.h | 5 +++++
|
||||||
|
1 file changed, 5 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/CORE/HDD/inc/wlan_hdd_cfg80211.h b/CORE/HDD/inc/wlan_hdd_cfg80211.h
|
||||||
|
index a40c55144bc5..95c1ddce7de4 100644
|
||||||
|
--- a/CORE/HDD/inc/wlan_hdd_cfg80211.h
|
||||||
|
+++ b/CORE/HDD/inc/wlan_hdd_cfg80211.h
|
||||||
|
@@ -992,7 +992,12 @@ backported_cfg80211_vendor_event_alloc(struct wiphy *wiphy,
|
||||||
|
int approxlen,
|
||||||
|
int event_idx, gfp_t gfp)
|
||||||
|
{
|
||||||
|
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
|
||||||
|
return cfg80211_vendor_event_alloc(wiphy, wdev, approxlen, event_idx, gfp);
|
||||||
|
+#else
|
||||||
|
+ return cfg80211_vendor_event_alloc(wiphy, approxlen, event_idx, gfp);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
}
|
||||||
|
#define cfg80211_vendor_event_alloc backported_cfg80211_vendor_event_alloc
|
||||||
|
#endif
|
||||||
|
|
@ -0,0 +1,25 @@
|
||||||
|
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
|
Date: Mon, 17 Oct 2016 10:06:18 +0200
|
||||||
|
Subject: [PATCH] Add .gitignore rules
|
||||||
|
|
||||||
|
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
|
---
|
||||||
|
.gitignore | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
create mode 100644 .gitignore
|
||||||
|
|
||||||
|
diff --git a/.gitignore b/.gitignore
|
||||||
|
new file mode 100644
|
||||||
|
index 000000000000..9886b5284c3f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/.gitignore
|
||||||
|
@@ -0,0 +1,9 @@
|
||||||
|
+*.o
|
||||||
|
+*.o.cmd
|
||||||
|
+.tmp_versions
|
||||||
|
+.*
|
||||||
|
+Module.symvers
|
||||||
|
+modules.order
|
||||||
|
+*.mod.c
|
||||||
|
+cscope.*
|
||||||
|
+wlan.ko
|
||||||
|
|
@ -0,0 +1,206 @@
|
||||||
|
From: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
|
Date: Tue, 5 Jul 2016 14:55:15 +0530
|
||||||
|
Subject: [PATCH] wlan_hdd_main: initialize all adapter completion variables
|
||||||
|
|
||||||
|
In order to change the p2p device mode, delete and add virtual_iface
|
||||||
|
followed by change_iface will be invoked. But in this case device mode
|
||||||
|
is changed by invoking change_iface method without invoking delete and
|
||||||
|
add virtual_iface functions resulting in kernel panic.
|
||||||
|
|
||||||
|
This is because, in latter case hdd_open_adapter will not be invoked
|
||||||
|
for the intended device mode. Hence uninitialized completion variables
|
||||||
|
will be used for further operations.
|
||||||
|
|
||||||
|
To mitigate this issue, Initialize all completion variables of
|
||||||
|
hdd_adapter_t structure during open adapter irrespective of adapter's
|
||||||
|
device mode.
|
||||||
|
|
||||||
|
https://jira.digi.com/browse/DEL-3072
|
||||||
|
https://jira.digi.com/browse/DEL-3037
|
||||||
|
|
||||||
|
(cherry-picked from 20ed76a8e436042590aa25acb33a2ba3d6d34250)
|
||||||
|
Signed-off-by: Isaac Hermida <isaac.hermida@digi.com>
|
||||||
|
---
|
||||||
|
CORE/HDD/inc/wlan_hdd_main.h | 1 +
|
||||||
|
CORE/HDD/src/wlan_hdd_hostapd.c | 10 -----
|
||||||
|
CORE/HDD/src/wlan_hdd_main.c | 82 ++++++++++++++++++++++++-----------------
|
||||||
|
3 files changed, 50 insertions(+), 43 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
|
||||||
|
index f01b7f309dc2..3c5a51a57d6c 100644
|
||||||
|
--- a/CORE/HDD/inc/wlan_hdd_main.h
|
||||||
|
+++ b/CORE/HDD/inc/wlan_hdd_main.h
|
||||||
|
@@ -1740,4 +1740,5 @@ static inline void wlan_hdd_stop_sap(hdd_adapter_t *ap_adapter) {}
|
||||||
|
static inline void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter) {}
|
||||||
|
#endif
|
||||||
|
bool wlan_hdd_get_fw_state(hdd_adapter_t *adapter);
|
||||||
|
+void hdd_initialize_adapter_common(hdd_adapter_t *adapter);
|
||||||
|
#endif // end #if !defined( WLAN_HDD_MAIN_H )
|
||||||
|
diff --git a/CORE/HDD/src/wlan_hdd_hostapd.c b/CORE/HDD/src/wlan_hdd_hostapd.c
|
||||||
|
index 8a80d26f355a..4bd6b844ac5a 100644
|
||||||
|
--- a/CORE/HDD/src/wlan_hdd_hostapd.c
|
||||||
|
+++ b/CORE/HDD/src/wlan_hdd_hostapd.c
|
||||||
|
@@ -5389,9 +5389,6 @@ VOS_STATUS hdd_init_ap_mode( hdd_adapter_t *pAdapter )
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
- init_completion(&pAdapter->session_close_comp_var);
|
||||||
|
- init_completion(&pAdapter->session_open_comp_var);
|
||||||
|
-
|
||||||
|
sema_init(&(WLAN_HDD_GET_AP_CTX_PTR(pAdapter))->semWpsPBCOverlapInd, 1);
|
||||||
|
|
||||||
|
// Register as a wireless device
|
||||||
|
@@ -5494,13 +5491,6 @@ hdd_adapter_t* hdd_wlan_create_ap_dev( hdd_context_t *pHddCtx, tSirMacAddr macAd
|
||||||
|
pWlanHostapdDev->ieee80211_ptr = &pHostapdAdapter->wdev ;
|
||||||
|
pHostapdAdapter->wdev.wiphy = pHddCtx->wiphy;
|
||||||
|
pHostapdAdapter->wdev.netdev = pWlanHostapdDev;
|
||||||
|
- init_completion(&pHostapdAdapter->tx_action_cnf_event);
|
||||||
|
- init_completion(&pHostapdAdapter->cancel_rem_on_chan_var);
|
||||||
|
- init_completion(&pHostapdAdapter->rem_on_chan_ready_event);
|
||||||
|
- init_completion(&pHostapdAdapter->ula_complete);
|
||||||
|
- init_completion(&pHostapdAdapter->offchannel_tx_event);
|
||||||
|
- init_completion(&pHostapdAdapter->scan_info.scan_req_completion_event);
|
||||||
|
- init_completion(&pHostapdAdapter->scan_info.abortscan_event_var);
|
||||||
|
vos_event_init(&pHostapdAdapter->scan_info.scan_finished_event);
|
||||||
|
pHostapdAdapter->scan_info.scan_pending_option = WEXT_SCAN_PENDING_GIVEUP;
|
||||||
|
|
||||||
|
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
|
||||||
|
index a10da2a9b164..b447f0931d52 100755
|
||||||
|
--- a/CORE/HDD/src/wlan_hdd_main.c
|
||||||
|
+++ b/CORE/HDD/src/wlan_hdd_main.c
|
||||||
|
@@ -8234,7 +8234,6 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
|
||||||
|
|
||||||
|
if(pWlanDev != NULL)
|
||||||
|
{
|
||||||
|
-
|
||||||
|
//Save the pointer to the net_device in the HDD adapter
|
||||||
|
pAdapter = (hdd_adapter_t*) netdev_priv( pWlanDev );
|
||||||
|
|
||||||
|
@@ -8244,43 +8243,11 @@ static hdd_adapter_t* hdd_alloc_station_adapter( hdd_context_t *pHddCtx, tSirMac
|
||||||
|
pAdapter->pHddCtx = pHddCtx;
|
||||||
|
pAdapter->magic = WLAN_HDD_ADAPTER_MAGIC;
|
||||||
|
|
||||||
|
- init_completion(&pAdapter->session_open_comp_var);
|
||||||
|
- init_completion(&pAdapter->session_close_comp_var);
|
||||||
|
- init_completion(&pAdapter->disconnect_comp_var);
|
||||||
|
- init_completion(&pAdapter->linkup_event_var);
|
||||||
|
- init_completion(&pAdapter->cancel_rem_on_chan_var);
|
||||||
|
- init_completion(&pAdapter->rem_on_chan_ready_event);
|
||||||
|
- init_completion(&pAdapter->offchannel_tx_event);
|
||||||
|
- init_completion(&pAdapter->tx_action_cnf_event);
|
||||||
|
-#ifdef FEATURE_WLAN_TDLS
|
||||||
|
- init_completion(&pAdapter->tdls_add_station_comp);
|
||||||
|
- init_completion(&pAdapter->tdls_del_station_comp);
|
||||||
|
- init_completion(&pAdapter->tdls_mgmt_comp);
|
||||||
|
- init_completion(&pAdapter->tdls_link_establish_req_comp);
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
- init_completion(&pHddCtx->mc_sus_event_var);
|
||||||
|
- init_completion(&pHddCtx->tx_sus_event_var);
|
||||||
|
- init_completion(&pHddCtx->rx_sus_event_var);
|
||||||
|
- init_completion(&pHddCtx->ready_to_suspend);
|
||||||
|
- init_completion(&pAdapter->ula_complete);
|
||||||
|
- init_completion(&pAdapter->change_country_code);
|
||||||
|
-
|
||||||
|
-#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
|
||||||
|
- init_completion(&pHddCtx->ready_to_extwow);
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-#ifdef FEATURE_WLAN_BATCH_SCAN
|
||||||
|
- init_completion(&pAdapter->hdd_set_batch_scan_req_var);
|
||||||
|
- init_completion(&pAdapter->hdd_get_batch_scan_req_var);
|
||||||
|
pAdapter->pBatchScanRsp = NULL;
|
||||||
|
pAdapter->numScanList = 0;
|
||||||
|
pAdapter->batchScanState = eHDD_BATCH_SCAN_STATE_STOPPED;
|
||||||
|
pAdapter->prev_batch_id = 0;
|
||||||
|
mutex_init(&pAdapter->hdd_batch_scan_lock);
|
||||||
|
-#endif
|
||||||
|
- init_completion(&pAdapter->scan_info.scan_req_completion_event);
|
||||||
|
- init_completion(&pAdapter->scan_info.abortscan_event_var);
|
||||||
|
|
||||||
|
vos_event_init(&pAdapter->scan_info.scan_finished_event);
|
||||||
|
pAdapter->scan_info.scan_pending_option = WEXT_SCAN_PENDING_GIVEUP;
|
||||||
|
@@ -9018,6 +8985,7 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
|
||||||
|
pAdapter->wdev.iftype = NL80211_IFTYPE_P2P_CLIENT;
|
||||||
|
|
||||||
|
pAdapter->device_mode = session_type;
|
||||||
|
+ hdd_initialize_adapter_common(pAdapter);
|
||||||
|
|
||||||
|
status = hdd_init_station_mode( pAdapter );
|
||||||
|
if( VOS_STATUS_SUCCESS != status )
|
||||||
|
@@ -9089,6 +9057,7 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
|
||||||
|
NL80211_IFTYPE_P2P_GO;
|
||||||
|
pAdapter->device_mode = session_type;
|
||||||
|
|
||||||
|
+ hdd_initialize_adapter_common(pAdapter);
|
||||||
|
status = hdd_init_ap_mode(pAdapter);
|
||||||
|
if( VOS_STATUS_SUCCESS != status )
|
||||||
|
goto err_free_netdev;
|
||||||
|
@@ -9163,6 +9132,7 @@ hdd_adapter_t* hdd_open_adapter( hdd_context_t *pHddCtx, tANI_U8 session_type,
|
||||||
|
pAdapter->device_mode = session_type;
|
||||||
|
status = hdd_register_interface( pAdapter, rtnl_held );
|
||||||
|
|
||||||
|
+ hdd_initialize_adapter_common(pAdapter);
|
||||||
|
hdd_init_tx_rx( pAdapter );
|
||||||
|
|
||||||
|
//Stop the Interface TX queue.
|
||||||
|
@@ -11735,6 +11705,13 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
|
||||||
|
init_completion(&pHddCtx->full_pwr_comp_var);
|
||||||
|
init_completion(&pHddCtx->standby_comp_var);
|
||||||
|
init_completion(&pHddCtx->req_bmps_comp_var);
|
||||||
|
+ init_completion(&pHddCtx->mc_sus_event_var);
|
||||||
|
+ init_completion(&pHddCtx->tx_sus_event_var);
|
||||||
|
+ init_completion(&pHddCtx->rx_sus_event_var);
|
||||||
|
+ init_completion(&pHddCtx->ready_to_suspend);
|
||||||
|
+#ifdef WLAN_FEATURE_EXTWOW_SUPPORT
|
||||||
|
+ init_completion(&pHddCtx->ready_to_extwow);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
spin_lock_init(&pHddCtx->schedScan_lock);
|
||||||
|
|
||||||
|
@@ -14494,6 +14471,45 @@ void wlan_hdd_start_sap(hdd_adapter_t *ap_adapter)
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+/**
|
||||||
|
+ * hdd_initialize_adapter_common() - initialize completion variables
|
||||||
|
+ * @adapter: pointer to hdd_adapter_t
|
||||||
|
+ *
|
||||||
|
+ * Return: none
|
||||||
|
+ */
|
||||||
|
+void hdd_initialize_adapter_common(hdd_adapter_t *adapter)
|
||||||
|
+{
|
||||||
|
+ if (NULL == adapter) {
|
||||||
|
+ hddLog(VOS_TRACE_LEVEL_ERROR, "%s: adapter is NULL ", __func__);
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ init_completion(&adapter->session_open_comp_var);
|
||||||
|
+ init_completion(&adapter->session_close_comp_var);
|
||||||
|
+ init_completion(&adapter->disconnect_comp_var);
|
||||||
|
+ init_completion(&adapter->linkup_event_var);
|
||||||
|
+ init_completion(&adapter->cancel_rem_on_chan_var);
|
||||||
|
+ init_completion(&adapter->rem_on_chan_ready_event);
|
||||||
|
+ init_completion(&adapter->offchannel_tx_event);
|
||||||
|
+ init_completion(&adapter->tx_action_cnf_event);
|
||||||
|
+#ifdef FEATURE_WLAN_TDLS
|
||||||
|
+ init_completion(&adapter->tdls_add_station_comp);
|
||||||
|
+ init_completion(&adapter->tdls_del_station_comp);
|
||||||
|
+ init_completion(&adapter->tdls_mgmt_comp);
|
||||||
|
+ init_completion(&adapter->tdls_link_establish_req_comp);
|
||||||
|
+#endif
|
||||||
|
+ init_completion(&adapter->ula_complete);
|
||||||
|
+ init_completion(&adapter->change_country_code);
|
||||||
|
+ init_completion(&adapter->scan_info.scan_req_completion_event);
|
||||||
|
+ init_completion(&adapter->scan_info.abortscan_event_var);
|
||||||
|
+
|
||||||
|
+#ifdef FEATURE_WLAN_BATCH_SCAN
|
||||||
|
+ init_completion(&adapter->hdd_set_batch_scan_req_var);
|
||||||
|
+ init_completion(&adapter->hdd_get_batch_scan_req_var);
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+ return;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
//Register the module init/exit functions
|
||||||
|
module_init(hdd_module_init);
|
||||||
|
module_exit(hdd_module_exit);
|
||||||
Loading…
Reference in New Issue