Search Linux Wireless

Re: [PATCH 3/4] brcmfmac: support the forwarding packet

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/1/2020 8:32 AM, Wright Feng wrote:
From: Jia-Shyr Chuang <joseph.chuang@xxxxxxxxxxx>

Support packet forwarding mechanism for some special usages on PCIE,
and fix BE/VI priority issue when pumping iperf.

This is a bit to brief for what is being introduced here. Basically, your are introducing a shortcut if a packet from an associated STA is destined for another associated STA taking the linux network stack and its overhead out of the equation. Not sure if this is a desired feature for upstream driver as it likely is interfering with features like TSQ. So there should be something done to inform the network stack about this packet going into transmit path.

I also don't understand what is PCIe specific about this and what BE/VI priority issue is being fixed. Please spend more words on the commit message.

Some more specific comment below.

Regards,
Arend

Signed-off-by: Jia-Shyr Chuang <joseph.chuang@xxxxxxxxxxx>
Signed-off-by: Ting-Ying Li <tingying.li@xxxxxxxxxxx>
Signed-off-by: Chi-hsien Lin <chi-hsien.lin@xxxxxxxxxxx>
---
  .../broadcom/brcm80211/brcmfmac/cfg80211.c    |  13 ++-
  .../broadcom/brcm80211/brcmfmac/core.c        | 100 +++++++++++++++++-
  .../broadcom/brcm80211/brcmfmac/core.h        |  18 +++-
  .../broadcom/brcm80211/brcmfmac/msgbuf.c      |  31 +++++-
  4 files changed, 157 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index d6972420d426..8c7941f85715 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -4799,7 +4799,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
  		err = -EINVAL;
  		goto exit;
  	}
-
+	ifp->isap = false;
  	/* Interface specific setup */
  	if (dev_role == NL80211_IFTYPE_AP) {
  		if ((brcmf_feat_is_enabled(ifp, BRCMF_FEAT_MBSS)) && (!mbss))
@@ -4860,7 +4860,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
  				 err);
  			goto exit;
  		}
-
+		ifp->isap = true;
  		brcmf_dbg(TRACE, "AP mode configuration complete\n");
  	} else if (dev_role == NL80211_IFTYPE_P2P_GO) {
  		err = brcmf_fil_iovar_int_set(ifp, "chanspec", chanspec);
@@ -4892,6 +4892,7 @@ brcmf_cfg80211_start_ap(struct wiphy *wiphy, struct net_device *ndev,
  			goto exit;
  		}
+ ifp->isap = true;
  		brcmf_dbg(TRACE, "GO mode configuration complete\n");
  	} else {
  		WARN_ON(1);
@@ -6045,6 +6046,14 @@ brcmf_notify_connect_status(struct brcmf_if *ifp,
  	}
if (brcmf_is_apmode(ifp->vif)) {

Given this function I don't think the new struct brcmf_if::isap flag is necessary.

+		if (e->event_code == BRCMF_E_ASSOC_IND ||
+		    e->event_code == BRCMF_E_REASSOC_IND) {
+			brcmf_findadd_sta(ifp, e->addr);
+		} else if ((e->event_code == BRCMF_E_DISASSOC_IND) ||
+				(e->event_code == BRCMF_E_DEAUTH_IND) ||
+				(e->event_code == BRCMF_E_DEAUTH)) {
+			brcmf_del_sta(ifp, e->addr);
+		}
  		err = brcmf_notify_connect_status_ap(cfg, ndev, e, data);
  	} else if (brcmf_is_linkup(ifp->vif, e)) {
  		brcmf_dbg(CONN, "Linkup\n");
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 20c510dca601..3257b784e019 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -62,6 +62,14 @@ struct wlc_d11rxhdr {
  	s8 rxpwr[4];
  } __packed;
+#define BRCMF_IF_STA_LIST_LOCK_INIT(ifp) spin_lock_init(&(ifp)->sta_list_lock)
+#define BRCMF_IF_STA_LIST_LOCK(ifp, flags) \
+	spin_lock_irqsave(&(ifp)->sta_list_lock, (flags))
+#define BRCMF_IF_STA_LIST_UNLOCK(ifp, flags) \
+	spin_unlock_irqrestore(&(ifp)->sta_list_lock, (flags))
+
+#define BRCMF_STA_NULL ((struct brcmf_sta *)NULL)

Don't hide actual functions with macros like these.



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux