Browse Source

qcacld-3.0: Fix csr_get_dot11_mode() context param

Currently csr_get_dot11_mode() takes a tHalHandle context param.
However this is a static function, and hence it should be using the
"real" context pointer type tpAniSirGlobal instead of the opaque
reference tHalHandle. In addition the only caller is already passing
the real context pointer type so update the API to expect
tpAniSirGlobal.

Change-Id: I4f57252f0c94949b3219b5c07143d2545c659871
CRs-Fixed: 2267444
Jeff Johnson 6 years ago
parent
commit
78334bd8b0
1 changed files with 11 additions and 14 deletions
  1. 11 14
      core/sme/src/csr/csr_roam_preauth.c

+ 11 - 14
core/sme/src/csr/csr_roam_preauth.c

@@ -39,17 +39,6 @@ static void csr_reinit_preauth_cmd(tpAniSirGlobal pMac, tSmeCmd *pCommand);
 static QDF_STATUS csr_neighbor_roam_add_preauth_fail(tpAniSirGlobal mac_ctx,
 			uint8_t session_id, tSirMacAddr bssid);
 
-/**
- * csr_get_dot11_mode() - Derives dot11mode
- * @hal: Global Handle
- * @session_id: SME Session ID
- * @bss_desc: BSS descriptor
- *
- * Return: dot11mode
- */
-static uint32_t csr_get_dot11_mode(tHalHandle hal, uint32_t session_id,
-			      tpSirBssDescription bss_desc);
-
 /**
  * csr_neighbor_roam_state_preauth_done() - Check if state is preauth done
  * @mac_ctx: Global MAC context
@@ -468,10 +457,18 @@ bool csr_neighbor_roam_is_preauth_candidate(tpAniSirGlobal pMac,
 	return true;
 }
 
-uint32_t csr_get_dot11_mode(tHalHandle hal, uint32_t session_id,
-			      tpSirBssDescription bss_desc)
+/**
+ * csr_get_dot11_mode() - Derives dot11mode
+ * @mac_ctx: Global MAC context
+ * @session_id: SME Session ID
+ * @bss_desc: BSS descriptor
+ *
+ * Return: dot11mode
+ */
+static uint32_t csr_get_dot11_mode(tpAniSirGlobal mac_ctx,
+				   uint32_t session_id,
+				   tpSirBssDescription bss_desc)
 {
-	tpAniSirGlobal mac_ctx = PMAC_STRUCT(hal);
 	struct csr_roam_session *csr_session = CSR_GET_SESSION(mac_ctx,
 				session_id);
 	enum csr_cfgdot11mode ucfg_dot11_mode, cfg_dot11_mode;