mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
qcacld-3.0: GETSTATSSTAINFO does not return the mcbc count
GETSTATSSTAINFO and GETSTAINFO cmds return the correct mcbc counters in SAP+STA case with IPA disabled since the host updates these stats during dp_rx processing. With IPA is enabled the hdd callback invoked from the IPA driver needs to update the counters if broadcast or multicast pkts are received in exception path. Change-Id: I450bf809fab559be8f2fbd172c49fd7e8858ee5c CRs-Fixed: 2875804
This commit is contained in:
parent
73c1bbff49
commit
455e425f0d
5 changed files with 61 additions and 4 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014-2020 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
|
|
@ -204,6 +204,21 @@ void hdd_softap_tx_resume_cb(void *adapter_context, bool tx_resume)
|
|||
}
|
||||
#endif /* QCA_LL_LEGACY_TX_FLOW_CONTROL */
|
||||
|
||||
/**
|
||||
* hdd_ipa_update_rx_mcbc_stats() - Update broadcast multicast stats
|
||||
* @adapter: pointer to hdd adapter
|
||||
* @skb: pointer to netbuf
|
||||
*
|
||||
* Check if multicast or broadcast pkt was received and increment
|
||||
* the stats accordingly. This is required only if IPA is enabled
|
||||
* as in case of regular Rx path mcast/bcast stats are processed
|
||||
* in the dp layer.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void hdd_ipa_update_rx_mcbc_stats(struct hdd_adapter *adapter,
|
||||
struct sk_buff *skb);
|
||||
|
||||
#ifdef SAP_DHCP_FW_IND
|
||||
/**
|
||||
* hdd_post_dhcp_ind() - Send DHCP START/STOP indication to FW
|
||||
|
|
|
|||
|
|
@ -455,6 +455,8 @@ void hdd_ipa_send_nbuf_to_network(qdf_nbuf_t nbuf, qdf_netdev_t dev)
|
|||
return;
|
||||
}
|
||||
|
||||
hdd_ipa_update_rx_mcbc_stats(adapter, nbuf);
|
||||
|
||||
if ((adapter->device_mode == QDF_SAP_MODE) &&
|
||||
(qdf_nbuf_is_ipv4_dhcp_pkt(nbuf) == true)) {
|
||||
/* Send DHCP Indication to FW */
|
||||
|
|
|
|||
|
|
@ -420,6 +420,34 @@ 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)
|
||||
|
|
|
|||
|
|
@ -107,6 +107,7 @@ enum dhcp_nego_status {
|
|||
* @STA_INFO_CLEAR_CACHED_STA_INFO: Clear the cached sta info
|
||||
* @STA_INFO_ATTACH_DETACH: Station info attach/detach
|
||||
* @STA_INFO_SHOW: Station info show
|
||||
* @STA_INFO_SOFTAP_IPA_RX_PKT_CALLBACK: Update rx mcbc stats for IPA case
|
||||
*
|
||||
*/
|
||||
/*
|
||||
|
|
@ -144,6 +145,7 @@ typedef enum {
|
|||
STA_INFO_CLEAR_CACHED_STA_INFO = 27,
|
||||
STA_INFO_ATTACH_DETACH = 28,
|
||||
STA_INFO_SHOW = 29,
|
||||
STA_INFO_SOFTAP_IPA_RX_PKT_CALLBACK = 30,
|
||||
|
||||
STA_INFO_ID_MAX,
|
||||
} wlan_sta_info_dbgid;
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
#include "wlan_mlme_ucfg_api.h"
|
||||
#include "wlan_hdd_sta_info.h"
|
||||
#include "wlan_hdd_object_manager.h"
|
||||
#include "wlan_ipa_ucfg_api.h"
|
||||
|
||||
#include <cdp_txrx_handle.h>
|
||||
#include <cdp_txrx_stats_struct.h>
|
||||
|
|
@ -1624,7 +1625,12 @@ int32_t hdd_cfg80211_get_station_cmd(struct wiphy *wiphy,
|
|||
* @adapter: pointer to adapter
|
||||
* @stainfo: station information
|
||||
*
|
||||
* This function gets peer statistics information
|
||||
* This function gets peer statistics information. If IPA is
|
||||
* enabled the Rx bcast/mcast count is updated in the
|
||||
* exception callback invoked by the IPA driver. In case of
|
||||
* back pressure the packets may get routed to the sw path and
|
||||
* where eventually the peer mcast/bcast pkt counts are updated in
|
||||
* dp rx process handling.
|
||||
*
|
||||
* Return : 0 on success and errno on failure
|
||||
*/
|
||||
|
|
@ -1649,8 +1655,12 @@ static int hdd_get_peer_stats(struct hdd_adapter *adapter,
|
|||
}
|
||||
|
||||
stainfo->rx_retry_cnt = peer_stats->rx.rx_retries;
|
||||
stainfo->rx_mc_bc_cnt = peer_stats->rx.multicast.num +
|
||||
peer_stats->rx.bcast.num;
|
||||
if (!ucfg_ipa_is_enabled())
|
||||
stainfo->rx_mc_bc_cnt = peer_stats->rx.multicast.num +
|
||||
peer_stats->rx.bcast.num;
|
||||
else
|
||||
stainfo->rx_mc_bc_cnt += peer_stats->rx.multicast.num +
|
||||
peer_stats->rx.bcast.num;
|
||||
|
||||
qdf_mem_free(peer_stats);
|
||||
peer_stats = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue