Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Rami Rosen" <ramirose@gmail.com>
To: linville@tuxdriver.com
Cc: linux-wireless@vger.kernel.org, johannes@sipsolutions.net
Subject: [PATCH] mac80211: remove redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c)
Date: Thu, 2 Oct 2008 15:56:35 +0300	[thread overview]
Message-ID: <eb3ff54b0810020556s407728b9n772e7ae178761eee@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 491 bytes --]

Hi,

 - This patch (against the linux-wireless-next git tree) removes a
redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c).

  In this method, there is no need to call again the
ieee80211_is_data() method; this is checked immediately before, in the
"if" command (we will not enter this block unless ieee80211_is_data()
is true, so that the "and" (&&) condition in that "if" command will be
fullfilled ).



Regards,
Rami Rosen

Signed-off-by: Rami Rosen <ramirose@gmail.com>

[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 824 bytes --]

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 0cc2e23..a29260c 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1296,7 +1296,6 @@ int ieee80211_master_start_xmit(struct sk_buff *skb,
 
 	if (ieee80211_vif_is_mesh(&osdata->vif) &&
 	    ieee80211_is_data(hdr->frame_control)) {
-		if (ieee80211_is_data(hdr->frame_control)) {
 			if (is_multicast_ether_addr(hdr->addr3))
 				memcpy(hdr->addr1, hdr->addr3, ETH_ALEN);
 			else
@@ -1305,7 +1304,6 @@ int ieee80211_master_start_xmit(struct sk_buff *skb,
 			if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0)
 				IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh,
 							     fwded_frames);
-		}
 	} else if (unlikely(osdata->vif.type == NL80211_IFTYPE_MONITOR)) {
 		struct ieee80211_sub_if_data *sdata;
 		struct ieee80211_local *local = osdata->local;

             reply	other threads:[~2008-10-02 12:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-02 12:56 Rami Rosen [this message]
2008-10-02 13:27 ` [PATCH] mac80211: remove redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c) Johannes Berg
2008-10-02 13:48   ` [PATCH] [RESEND] " Rami Rosen
2008-10-02 18:05     ` Johannes Berg

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=eb3ff54b0810020556s407728b9n772e7ae178761eee@mail.gmail.com \
    --to=ramirose@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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