linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arend van Spriel <arend@broadcom.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	Hante Meuleman <meuleman@broadcom.com>,
	Arend van Spriel <arend@broadcom.com>
Subject: [PATCH 04/14] brcmfmac: Move handling 802.1x frames to dhd_linux.
Date: Mon, 12 May 2014 10:47:29 +0200	[thread overview]
Message-ID: <1399884459-5048-5-git-send-email-arend@broadcom.com> (raw)
In-Reply-To: <1399884459-5048-1-git-send-email-arend@broadcom.com>

From: Hante Meuleman <meuleman@broadcom.com>

Tracking and handling of 802.1x frames is done in two modules, it
is more logical and clear to move this to dhd_linux module.

Reviewed-by: Arend Van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Daniel (Deognyoun) Kim <dekim@broadcom.com>
Signed-off-by: Hante Meuleman <meuleman@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
 .../net/wireless/brcm80211/brcmfmac/dhd_linux.c    |    5 ++++-
 drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c |   15 +++++----------
 2 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 6056efd..4cacc3d 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -190,7 +190,7 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
 	int ret;
 	struct brcmf_if *ifp = netdev_priv(ndev);
 	struct brcmf_pub *drvr = ifp->drvr;
-	struct ethhdr *eh;
+	struct ethhdr *eh = (struct ethhdr *)(skb->data);
 
 	brcmf_dbg(DATA, "Enter, idx=%d\n", ifp->bssidx);
 
@@ -236,6 +236,9 @@ static netdev_tx_t brcmf_netdev_start_xmit(struct sk_buff *skb,
 		goto done;
 	}
 
+	if (eh->h_proto == htons(ETH_P_PAE))
+		atomic_inc(&ifp->pend_8021x_cnt);
+
 	ret = brcmf_fws_process_skb(ifp, skb);
 
 done:
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index bfe7c9a..b58a97a 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -1863,7 +1863,7 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
 	struct ethhdr *eh = (struct ethhdr *)(skb->data);
 	int fifo = BRCMF_FWS_FIFO_BCMC;
 	bool multicast = is_multicast_ether_addr(eh->h_dest);
-	bool pae = eh->h_proto == htons(ETH_P_PAE);
+	int rc = 0;
 
 	brcmf_dbg(DATA, "tx proto=0x%X\n", ntohs(eh->h_proto));
 	/* determine the priority */
@@ -1871,8 +1871,6 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
 		skb->priority = cfg80211_classify8021d(skb, NULL);
 
 	drvr->tx_multicast += !!multicast;
-	if (pae)
-		atomic_inc(&ifp->pend_8021x_cnt);
 
 	/* set control buffer information */
 	skcb->if_flags = 0;
@@ -1894,15 +1892,12 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
 		brcmf_fws_schedule_deq(fws);
 	} else {
 		brcmf_err("drop skb: no hanger slot\n");
-		if (pae) {
-			atomic_dec(&ifp->pend_8021x_cnt);
-			if (waitqueue_active(&ifp->pend_8021x_wait))
-				wake_up(&ifp->pend_8021x_wait);
-		}
-		brcmu_pkt_buf_free_skb(skb);
+		brcmf_txfinalize(drvr, skb, ifp->ifidx, false);
+		rc = -ENOMEM;
 	}
 	brcmf_fws_unlock(fws);
-	return 0;
+
+	return rc;
 }
 
 void brcmf_fws_reset_interface(struct brcmf_if *ifp)
-- 
1.7.9.5


  parent reply	other threads:[~2014-05-12  8:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-12  8:47 [PATCH 00/14] brcmfmac: enable 80MHz 11ac AP mode and minor changes Arend van Spriel
2014-05-12  8:47 ` [PATCH 01/14] brcmfmac: Give priority to 5GHz band in selecting target BSS Arend van Spriel
2014-05-12  8:47 ` [PATCH 02/14] brcmfmac: Report the support of firmware roaming Arend van Spriel
2014-05-12  8:47 ` [PATCH 03/14] brcmfmac: Move out hdrpull from tx_finalize Arend van Spriel
2014-05-12  8:47 ` Arend van Spriel [this message]
2014-05-12  8:47 ` [PATCH 05/14] brcmfmac: Make FWS queueing configurable Arend van Spriel
2014-05-12  8:47 ` [PATCH 06/14] brcmfmac: enhance nvram processing Arend van Spriel
2014-05-12  8:47 ` [PATCH 07/14] brcmfmac: Fix reconnect failure after beacon timeout Arend van Spriel
2014-05-12  8:47 ` [PATCH 08/14] brcmfmac: remove usage of cfg80211_get_chandef_type() Arend van Spriel
2014-05-12  8:47 ` [PATCH 09/14] brcm80211: extend channel conversion functions for 80MHz support Arend van Spriel
2014-05-12  8:47 ` [PATCH 10/14] brcmfmac: provide VHT capability information to user-space Arend van Spriel
2014-05-12  8:47 ` [PATCH 11/14] brcmfmac: enable 80Mhz in 5G custom regulatory rules Arend van Spriel
2014-05-12  8:47 ` [PATCH 12/14] brcmfmac: get rid of brcmf_cfg80211_set_channel() function Arend van Spriel
2014-05-12  8:47 ` [PATCH 13/14] brcmfmac: handle 80MHz chanspecs in construct_reg_info() function Arend van Spriel
2014-05-12  8:47 ` [PATCH 14/14] brcmfmac: determine chanspec from struct cfg80211_chan_def info Arend van Spriel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1399884459-5048-5-git-send-email-arend@broadcom.com \
    --to=arend@broadcom.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=meuleman@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).