Kaynağa Gözat

qcacld-3.0: Fix checkpatch errors in HDD

Over time some checkpatch errors have crept into the HDD code, so
fix the issues that should be fixed.

Change-Id: I9287a724b856bcc62ac284ba66e68cdf12077646
CRs-Fixed: 1102140
Jeff Johnson 8 yıl önce
ebeveyn
işleme
03294f192b

+ 1 - 1
core/hdd/inc/wlan_hdd_oemdata.h

@@ -178,7 +178,7 @@ void hdd_send_peer_status_ind_to_oem_app(struct qdf_mac_addr *peerMac,
 					 uint8_t peerStatus,
 					 uint8_t peerTimingMeasCap,
 					 uint8_t sessionId,
-					 tSirSmeChanInfo * chan_info,
+					 struct sSirSmeChanInfo *chan_info,
 					 enum tQDF_ADAPTER_MODE dev_mode);
 
 int iw_get_oem_data_cap(struct net_device *dev, struct iw_request_info *info,

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

@@ -2831,14 +2831,13 @@ static QDF_STATUS hdd_association_completion_handler(hdd_adapter_t *pAdapter,
 					pRoamInfo->reasonCode);
 				pHddStaCtx->conn_info.assoc_status_code =
 					pRoamInfo->statusCode;
-			}
-			else
+			} else {
 				hdd_err("connect failed: for bssid "
 				       MAC_ADDRESS_STR
 				       " result:%d and Status:%d ",
 				       MAC_ADDR_ARRAY(pWextState->req_bssId.bytes),
 				       roamResult, roamStatus);
-
+			}
 			hdd_err("Invoking packetdump deregistration API");
 			wlan_deregister_txrx_packetdump();
 

+ 3 - 3
core/hdd/src/wlan_hdd_cfg.c

@@ -486,7 +486,7 @@ REG_TABLE_ENTRY g_registry_table[] = {
 
 	REG_VARIABLE(CFG_HT_MPDU_DENSITY_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, ht_mpdu_density,
-		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK ,
+		     VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK,
 		     CFG_HT_MPDU_DENSITY_DEFAULT,
 		     CFG_HT_MPDU_DENSITY_MIN,
 		     CFG_HT_MPDU_DENSITY_MAX),
@@ -800,12 +800,12 @@ REG_TABLE_ENTRY g_registry_table[] = {
 		      CFG_MIN_REST_TIME_MIN,
 		      CFG_MIN_REST_TIME_MAX),
 
-	REG_VARIABLE(CFG_IDLE_TIME_NAME , WLAN_PARAM_Integer,
+	REG_VARIABLE(CFG_IDLE_TIME_NAME, WLAN_PARAM_Integer,
 		      struct hdd_config, idle_time_conc,
 		      VAR_FLAGS_OPTIONAL | VAR_FLAGS_RANGE_CHECK_ASSUME_DEFAULT,
 		      CFG_IDLE_TIME_DEFAULT,
 		      CFG_IDLE_TIME_MIN,
-		      CFG_IDLE_TIME_MAX) ,
+		      CFG_IDLE_TIME_MAX),
 
 	REG_VARIABLE(CFG_NUM_STA_CHAN_COMBINED_CONC_NAME, WLAN_PARAM_Integer,
 		     struct hdd_config, nNumStaChanCombinedConc,

+ 1 - 2
core/hdd/src/wlan_hdd_lro.c

@@ -414,8 +414,7 @@ int hdd_lro_init(hdd_context_t *hdd_ctx)
 	struct wma_lro_config_cmd_t lro_config;
 
 	if ((!hdd_ctx->config->lro_enable) &&
-	    (hdd_napi_enabled(HDD_NAPI_ANY) == 0))
-	{
+	    (hdd_napi_enabled(HDD_NAPI_ANY) == 0)) {
 		hdd_err("LRO and NAPI are both disabled.");
 		return 0;
 	}

+ 1 - 1
core/hdd/src/wlan_hdd_nan_datapath.c

@@ -1390,7 +1390,7 @@ static void hdd_ndp_indication_handler(hdd_adapter_t *adapter,
 		goto ndp_indication_nla_failed;
 
 	if (nla_put(vendor_event,
-	   QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR ,
+	   QCA_WLAN_VENDOR_ATTR_NDP_PEER_DISCOVERY_MAC_ADDR,
 	   QDF_MAC_ADDR_SIZE, event->peer_discovery_mac_addr.bytes))
 		goto ndp_indication_nla_failed;
 

+ 18 - 14
core/hdd/src/wlan_hdd_napi.c

@@ -124,7 +124,7 @@ int hdd_napi_create(void)
 			hdd_info("napi instances were created. Map=0x%x", rc);
 			hdd_ctx = cds_get_context(QDF_MODULE_ID_HDD);
 			if (unlikely(NULL == hdd_ctx)) {
-				QDF_ASSERT( 0 );
+				QDF_ASSERT(0);
 				rc = -EFAULT;
 			} else {
 				rc = hdd_napi_event(NAPI_EVT_INI_FILE,
@@ -276,7 +276,7 @@ int hdd_napi_apply_throughput_policy(struct hdd_context_s *hddctx,
 	uint64_t packets = tx_packets + rx_packets;
 	enum qca_napi_tput_state req_state;
 	struct qca_napi_data *napid = hdd_napi_get_all();
-	int enabled = 0;
+	int enabled;
 
 	NAPI_DEBUG("-->%s(tx=%lld, rx=%lld)", __func__, tx_packets, rx_packets);
 
@@ -293,20 +293,24 @@ int hdd_napi_apply_throughput_policy(struct hdd_context_s *hddctx,
 		return rc;
 	}
 
-	if ((napid != NULL) &&
-	    (enabled = hdd_napi_enabled(HDD_NAPI_ANY))) {
-		if (packets > hddctx->config->busBandwidthHighThreshold)
-			req_state = QCA_NAPI_TPUT_HI;
-		else
-			req_state = QCA_NAPI_TPUT_LO;
+	if (!napid) {
+		hdd_err("ERR: napid NULL");
+		return rc;
+	}
 
-		if (req_state != napid->napi_mode)
-			rc = hdd_napi_event(NAPI_EVT_TPUT_STATE,
-					    (void *)req_state);
-	} else {
-		hdd_err("ERR: napid (%p) NULL or napi_enabled (%d) FALSE",
-			napid, enabled);
+	enabled = hdd_napi_enabled(HDD_NAPI_ANY);
+	if (!enabled) {
+		hdd_err("ERR: napi not enabled");
+		return rc;
 	}
+
+	if (packets > hddctx->config->busBandwidthHighThreshold)
+		req_state = QCA_NAPI_TPUT_HI;
+	else
+		req_state = QCA_NAPI_TPUT_LO;
+
+	if (req_state != napid->napi_mode)
+		rc = hdd_napi_event(NAPI_EVT_TPUT_STATE, (void *)req_state);
 	return rc;
 }