Browse Source

qcacld-3.0: Fix a compilation error on gno

Function hdd_ipa_update_rx_mcbc_stats()'s implementation
shouldn't be enclosed by macro SAP_DHCP_FW_IND, so move it out
of the block controlled by SAP_DHCP_FW_IND to avoid compilation
error when the same macro is not defined.

Change-Id: I1fa6d350f180dec3a82432f798f026b75ac89639
CRs-Fixed: 2903757
wadesong 4 years ago
parent
commit
350189038e
1 changed files with 28 additions and 28 deletions
  1. 28 28
      core/hdd/src/wlan_hdd_softap_tx_rx.c

+ 28 - 28
core/hdd/src/wlan_hdd_softap_tx_rx.c

@@ -347,6 +347,34 @@ void hdd_softap_check_wait_for_tx_eap_pkt(struct hdd_adapter *adapter,
 			     STA_INFO_SOFTAP_CHECK_WAIT_FOR_TX_EAP_PKT);
 }
 
+void hdd_ipa_update_rx_mcbc_stats(struct hdd_adapter *adapter,
+				  struct sk_buff *skb)
+{
+	struct hdd_station_info *hdd_sta_info;
+	struct qdf_mac_addr *src_mac;
+	qdf_ether_header_t *eh;
+
+	src_mac = (struct qdf_mac_addr *)(skb->data +
+					  QDF_NBUF_SRC_MAC_OFFSET);
+
+	hdd_sta_info = hdd_get_sta_info_by_mac(
+				&adapter->sta_info_list,
+				src_mac->bytes,
+				STA_INFO_SOFTAP_IPA_RX_PKT_CALLBACK);
+	if (!hdd_sta_info)
+		return;
+
+	if (qdf_nbuf_data_is_ipv4_mcast_pkt(skb->data))
+		hdd_sta_info->rx_mc_bc_cnt++;
+
+	eh = (qdf_ether_header_t *)qdf_nbuf_data(skb);
+	if (QDF_IS_ADDR_BROADCAST(eh->ether_dhost))
+		hdd_sta_info->rx_mc_bc_cnt++;
+
+	hdd_put_sta_info_ref(&adapter->sta_info_list, &hdd_sta_info,
+			     true, STA_INFO_SOFTAP_IPA_RX_PKT_CALLBACK);
+}
+
 #ifdef SAP_DHCP_FW_IND
 /**
  * hdd_post_dhcp_ind() - Send DHCP START/STOP indication to FW
@@ -420,34 +448,6 @@ static void hdd_softap_notify_dhcp_ind(void *context, struct sk_buff *netbuf)
 	hdd_post_dhcp_ind(adapter, dest_mac_addr, WMA_DHCP_STOP_IND);
 }
 
-void hdd_ipa_update_rx_mcbc_stats(struct hdd_adapter *adapter,
-				  struct sk_buff *skb)
-{
-	struct hdd_station_info *hdd_sta_info;
-	struct qdf_mac_addr *src_mac;
-	qdf_ether_header_t *eh;
-
-	src_mac = (struct qdf_mac_addr *)(skb->data +
-					  QDF_NBUF_SRC_MAC_OFFSET);
-
-	hdd_sta_info = hdd_get_sta_info_by_mac(
-				&adapter->sta_info_list,
-				src_mac->bytes,
-				STA_INFO_SOFTAP_IPA_RX_PKT_CALLBACK);
-	if (!hdd_sta_info)
-		return;
-
-	if (qdf_nbuf_data_is_ipv4_mcast_pkt(skb->data))
-		hdd_sta_info->rx_mc_bc_cnt++;
-
-	eh = (qdf_ether_header_t *)qdf_nbuf_data(skb);
-	if (QDF_IS_ADDR_BROADCAST(eh->ether_dhost))
-		hdd_sta_info->rx_mc_bc_cnt++;
-
-	hdd_put_sta_info_ref(&adapter->sta_info_list, &hdd_sta_info,
-			     true, STA_INFO_SOFTAP_IPA_RX_PKT_CALLBACK);
-}
-
 int hdd_softap_inspect_dhcp_packet(struct hdd_adapter *adapter,
 				   struct sk_buff *skb,
 				   enum qdf_proto_dir dir)