summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSravan Kumar Kairam <sgoud@qti.qualcomm.com>2016-05-27 11:25:34 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-05-27 12:52:26 +0530
commit7034e65d7bc06553abcd61142852a9ffd05f4eef (patch)
tree63896b587673e10abfa391e11352244b92e5e456
parent37ec5ee2a88e3bf5baa7231fa0e55b92dcfda094 (diff)
qcacld-2.0: Set RPS mask for virtual interfaces
Currently RPS mask is set only for wlan0 and p2p0 interfaces at hdd wlan startup after nl service initialization. For the virtual interfaces which are created at runtime RPS CPU mask is not set. As a result RX throughput is impacted. In this change modify the logic to set RPS CPU mask per adapter instead of passing hdd context and set the RPS mask after open adapter for the virtual interfaces. Change-Id: Idbdb1dabeee0400199859763fda86716c950893e CRs-Fixed: 1018534
-rw-r--r--CORE/HDD/inc/wlan_hdd_dp_utils.h8
-rw-r--r--CORE/HDD/inc/wlan_hdd_main.h1
-rw-r--r--CORE/HDD/src/wlan_hdd_dp_utils.c24
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c28
-rw-r--r--CORE/HDD/src/wlan_hdd_p2p.c4
5 files changed, 41 insertions, 24 deletions
diff --git a/CORE/HDD/inc/wlan_hdd_dp_utils.h b/CORE/HDD/inc/wlan_hdd_dp_utils.h
index 34134abf40ba..0a044784daf7 100644
--- a/CORE/HDD/inc/wlan_hdd_dp_utils.h
+++ b/CORE/HDD/inc/wlan_hdd_dp_utils.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2014 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2016 The Linux Foundation. All rights reserved.
*
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
*
@@ -115,11 +115,11 @@ VOS_STATUS hdd_list_peek_front( hdd_list_t *pList, hdd_list_node_t **ppNode );
VOS_STATUS hdd_list_peek_next( hdd_list_t *pList, hdd_list_node_t *pNode,
hdd_list_node_t **ppNode );
VOS_STATUS hdd_string_to_hex( char *pSrcMac, int length, char *pDescMac );
-struct hdd_context_s;
+struct hdd_adapter_s;
#ifdef QCA_FEATURE_RPS
-void hdd_dp_util_send_rps_ind(struct hdd_context_s *hdd_ctx);
+void hdd_dp_util_send_rps_ind(struct hdd_adapter_s *adapter);
#else
-static inline void hdd_dp_util_send_rps_ind(struct hdd_context_s *hdd_ctx)
+static inline void hdd_dp_util_send_rps_ind(struct hdd_adapter_s *adapter)
{
return;
}
diff --git a/CORE/HDD/inc/wlan_hdd_main.h b/CORE/HDD/inc/wlan_hdd_main.h
index f1bdafb5f50d..7e9e60d8e1d4 100644
--- a/CORE/HDD/inc/wlan_hdd_main.h
+++ b/CORE/HDD/inc/wlan_hdd_main.h
@@ -2232,4 +2232,5 @@ int hdd_reassoc(hdd_adapter_t *pAdapter, const tANI_U8 *bssid,
void hdd_sap_restart_handle(struct work_struct *work);
+void hdd_set_rps_cpu_mask(hdd_context_t *hdd_ctx);
#endif // end #if !defined( WLAN_HDD_MAIN_H )
diff --git a/CORE/HDD/src/wlan_hdd_dp_utils.c b/CORE/HDD/src/wlan_hdd_dp_utils.c
index 16b93924670c..30d53b9213c4 100644
--- a/CORE/HDD/src/wlan_hdd_dp_utils.c
+++ b/CORE/HDD/src/wlan_hdd_dp_utils.c
@@ -231,13 +231,11 @@ VOS_STATUS hdd_string_to_hex( char *pSrcMac, int length, char *pDescMac )
*
* Return: none
*/
-void hdd_dp_util_send_rps_ind(hdd_context_t *hdd_ctxt)
+void hdd_dp_util_send_rps_ind(hdd_adapter_t *adapter)
{
int i = 0;
uint8_t cpu_map_list_len = 0;
- hdd_adapter_t *adapter;
- hdd_adapter_list_node_t *adapter_node, *next;
- VOS_STATUS status = VOS_STATUS_SUCCESS;
+ hdd_context_t *hdd_ctxt = WLAN_HDD_GET_CTX(adapter);
struct wlan_rps_data rps_data;
rps_data.num_queues = NUM_TX_QUEUES;
@@ -267,18 +265,12 @@ void hdd_dp_util_send_rps_ind(hdd_context_t *hdd_ctxt)
i, rps_data.cpu_map_list[i]);
}
- status = hdd_get_front_adapter (hdd_ctxt, &adapter_node);
- while (NULL != adapter_node && VOS_STATUS_SUCCESS == status) {
- adapter = adapter_node->pAdapter;
- if (NULL != adapter) {
- strlcpy(rps_data.ifname, adapter->dev->name,
- sizeof(rps_data.ifname));
- wlan_hdd_send_svc_nlink_msg(hdd_ctxt->radio_index,
- WLAN_SVC_RPS_ENABLE_IND,
- &rps_data, sizeof(rps_data));
- }
- status = hdd_get_next_adapter (hdd_ctxt, adapter_node, &next);
- adapter_node = next;
+ if (NULL != adapter) {
+ strlcpy(rps_data.ifname, adapter->dev->name,
+ sizeof(rps_data.ifname));
+ wlan_hdd_send_svc_nlink_msg(hdd_ctxt->radio_index,
+ WLAN_SVC_RPS_ENABLE_IND,
+ &rps_data, sizeof(rps_data));
}
}
#endif /* QCA_FEATURE_RPS */
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index bb860a3c00ec..54ded248eaf9 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -10188,9 +10188,6 @@ static hdd_adapter_t* hdd_alloc_station_adapter(hdd_context_t *pHddCtx,
VOS_STATUS hdd_register_interface( hdd_adapter_t *pAdapter, tANI_U8 rtnl_lock_held )
{
struct net_device *pWlanDev = pAdapter->dev;
- //hdd_station_ctx_t *pHddStaCtx = &pAdapter->sessionCtx.station;
- //hdd_context_t *pHddCtx = WLAN_HDD_GET_CTX( pAdapter );
- //eHalStatus halStatus = eHAL_STATUS_SUCCESS;
if( rtnl_lock_held )
{
@@ -15422,7 +15419,7 @@ int hdd_wlan_startup(struct device *dev, v_VOID_t *hif_sc)
#endif
if (WLAN_HDD_RX_HANDLE_RPS == pHddCtx->cfg_ini->rxhandle)
- hdd_dp_util_send_rps_ind(pHddCtx);
+ hdd_set_rps_cpu_mask(pHddCtx);
hal_status = sme_set_lost_link_info_cb(pHddCtx->hHal,
hdd_lost_link_info_cb);
@@ -18025,6 +18022,29 @@ enum sap_acs_dfs_mode wlan_hdd_get_dfs_mode(enum dfs_mode mode)
}
}
+
+/**
+ * hdd_set_rps_cpu_mask - set RPS CPU mask for interfaces
+ * @hdd_ctx: pointer to hdd_context_t
+ *
+ * Return: none
+ */
+void hdd_set_rps_cpu_mask(hdd_context_t *hdd_ctx)
+{
+ hdd_adapter_t *adapter;
+ hdd_adapter_list_node_t *adapter_node, *next;
+ VOS_STATUS status = VOS_STATUS_SUCCESS;
+
+ status = hdd_get_front_adapter (hdd_ctx, &adapter_node);
+ while (NULL != adapter_node && VOS_STATUS_SUCCESS == status) {
+ adapter = adapter_node->pAdapter;
+ if (NULL != adapter)
+ hdd_dp_util_send_rps_ind(adapter);
+ status = hdd_get_next_adapter (hdd_ctx, adapter_node, &next);
+ adapter_node = next;
+ }
+}
+
//Register the module init/exit functions
module_init(hdd_module_init);
module_exit(hdd_module_exit);
diff --git a/CORE/HDD/src/wlan_hdd_p2p.c b/CORE/HDD/src/wlan_hdd_p2p.c
index d2df4b827adc..e51d57f302d2 100644
--- a/CORE/HDD/src/wlan_hdd_p2p.c
+++ b/CORE/HDD/src/wlan_hdd_p2p.c
@@ -2263,6 +2263,8 @@ struct wireless_dev* __wlan_hdd_add_virtual_intf(
name, p2pDeviceAddress.bytes,
name_assign_type,
VOS_TRUE );
+ if (WLAN_HDD_RX_HANDLE_RPS == pHddCtx->cfg_ini->rxhandle)
+ hdd_dp_util_send_rps_ind(pAdapter);
}
else
{
@@ -2270,6 +2272,8 @@ struct wireless_dev* __wlan_hdd_add_virtual_intf(
name, wlan_hdd_get_intf_addr(pHddCtx),
name_assign_type,
VOS_TRUE);
+ if (WLAN_HDD_RX_HANDLE_RPS == pHddCtx->cfg_ini->rxhandle)
+ hdd_dp_util_send_rps_ind(pAdapter);
}
if( NULL == pAdapter)