Browse Source

qcacld-3.0: Fix some whunt build errors

1) In function hdd_process_genie(), there is a chance for
   the 2 incoming parameters, encrypt_type and
   mc_encrypt_type, not initialized due to an error
   condition.

2) Remove some of the local variables that are not used
   anymore in the following functions:

   __wlan_hdd_cfg80211_del_station
   hdd_features_init
   hdd_cleanup_present_mode
   hdd_update_regdb_offload_config
   __wlan_hdd_cfg80211_scan
   hdd_softap_stop_bss

Change-Id: If719b0fc4b09dc5fc88479a4a5ce327ebbc00168
CRs-Fixed: 2768860
wadesong 4 years ago
parent
commit
0427a3aaac

+ 4 - 0
core/hdd/src/wlan_hdd_assoc.c

@@ -4841,6 +4841,10 @@ static int32_t hdd_process_genie(struct hdd_adapter *adapter,
 	 */
 	memset(&dot11_wpa_ie, 0, sizeof(tDot11fIEWPA));
 	memset(&dot11_rsn_ie, 0, sizeof(tDot11fIERSN));
+	if (encrypt_type)
+		*encrypt_type = eCSR_ENCRYPT_TYPE_NONE;
+	if (mc_encrypt_type)
+		*mc_encrypt_type = eCSR_ENCRYPT_TYPE_NONE;
 
 	/* Type check */
 	if (gen_ie[0] == DOT11F_EID_RSN) {

+ 0 - 2
core/hdd/src/wlan_hdd_cfg80211.c

@@ -21481,7 +21481,6 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
 	struct hdd_context *hdd_ctx;
 	struct hdd_hostapd_state *hapd_state;
 	uint8_t *mac;
-	mac_handle_t mac_handle;
 	struct hdd_station_info *sta_info;
 
 	hdd_enter();
@@ -21505,7 +21504,6 @@ int __wlan_hdd_cfg80211_del_station(struct wiphy *wiphy,
 	}
 
 	mac = (uint8_t *) param->peerMacAddr.bytes;
-	mac_handle = hdd_ctx->mac_handle;
 
 	if (QDF_SAP_MODE != adapter->device_mode &&
 	    QDF_P2P_GO_MODE != adapter->device_mode)

+ 0 - 6
core/hdd/src/wlan_hdd_main.c

@@ -13336,7 +13336,6 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
 	QDF_STATUS status;
 	int ret;
 	mac_handle_t mac_handle;
-	struct hdd_config *cfg;
 	bool b_cts2self, is_imps_enabled;
 
 	hdd_enter();
@@ -13351,7 +13350,6 @@ static int hdd_features_init(struct hdd_context *hdd_ctx)
 	if (ret)
 		hdd_warn("Error initializing mws-coex");
 
-	cfg = hdd_ctx->config;
 	/* FW capabilities received, Set the Dot11 mode */
 	mac_handle = hdd_ctx->mac_handle;
 	sme_setdef_dot11mode(mac_handle);
@@ -16294,10 +16292,6 @@ static void hdd_stop_present_mode(struct hdd_context *hdd_ctx,
 static void hdd_cleanup_present_mode(struct hdd_context *hdd_ctx,
 				    enum QDF_GLOBAL_MODE curr_mode)
 {
-	int driver_status;
-
-	driver_status = hdd_ctx->driver_status;
-
 	switch (curr_mode) {
 	case QDF_GLOBAL_MISSION_MODE:
 	case QDF_GLOBAL_MONITOR_MODE:

+ 1 - 3
core/hdd/src/wlan_hdd_regulatory.c

@@ -1747,11 +1747,9 @@ void hdd_regulatory_deinit(struct hdd_context *hdd_ctx)
 
 void hdd_update_regdb_offload_config(struct hdd_context *hdd_ctx)
 {
-	QDF_STATUS status;
 	bool ignore_fw_reg_offload_ind = false;
 
-	status = ucfg_mlme_get_ignore_fw_reg_offload_ind(
-						hdd_ctx->psoc,
+	ucfg_mlme_get_ignore_fw_reg_offload_ind(hdd_ctx->psoc,
 						&ignore_fw_reg_offload_ind);
 	if (!ignore_fw_reg_offload_ind) {
 		hdd_debug("regdb offload is based on firmware capability");

+ 2 - 3
core/hdd/src/wlan_hdd_scan.c

@@ -456,7 +456,6 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 	struct net_device *dev = request->wdev->netdev;
 	struct hdd_adapter *adapter = WLAN_HDD_GET_PRIV_PTR(dev);
 	struct hdd_context *hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	struct hdd_config *cfg_param = NULL;
 	int status;
 	struct hdd_scan_info *scan_info = NULL;
 	struct hdd_adapter *con_sap_adapter;
@@ -523,7 +522,6 @@ static int __wlan_hdd_cfg80211_scan(struct wiphy *wiphy,
 		return -EINVAL;
 	}
 
-	cfg_param = hdd_ctx->config;
 	scan_info = &adapter->scan_info;
 
 	/* Block All Scan during DFS operation and send null scan result */
@@ -955,7 +953,8 @@ static int __wlan_hdd_cfg80211_vendor_scan(struct wiphy *wiphy,
 	struct nlattr *attr;
 	enum nl80211_band band;
 	uint32_t n_channels = 0, n_ssid = 0;
-	uint32_t tmp, count, j;
+	uint32_t count, j;
+	int tmp;
 	size_t len, ie_len = 0;
 	struct ieee80211_channel *chan;
 	struct hdd_context *hdd_ctx = wiphy_priv(wiphy);

+ 0 - 2
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -1389,11 +1389,9 @@ QDF_STATUS hdd_softap_stop_bss(struct hdd_adapter *adapter)
 	QDF_STATUS status = QDF_STATUS_E_FAILURE;
 	uint8_t indoor_chnl_marking = 0;
 	struct hdd_context *hdd_ctx;
-	struct hdd_ap_ctx *ap_ctx;
 	struct hdd_station_info *sta_info, *tmp = NULL;
 
 	hdd_ctx = WLAN_HDD_GET_CTX(adapter);
-	ap_ctx = WLAN_HDD_GET_AP_CTX_PTR(adapter);
 
 	status = ucfg_policy_mgr_get_indoor_chnl_marking(hdd_ctx->psoc,
 							 &indoor_chnl_marking);