]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
mac80211: remove redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c)
authorRami Rosen <roszenrami@gmail.com>
Thu, 2 Oct 2008 13:48:22 +0000 (16:48 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 6 Oct 2008 22:14:56 +0000 (18:14 -0400)
 - This patch (against the linux-wireless-next git tree) removes a
redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c)
and adjust indentation in this method accordingly.

 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 ).

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/tx.c

index 226ce77363d7741af94d584df6dc0f42e66c5034..d7153bbcdb2bab409d53fdbbba47b43638ff475c 100644 (file)
@@ -1295,16 +1295,14 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
 
        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
-                               if (mesh_nexthop_lookup(skb, osdata))
-                                       return  0;
-                       if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0)
-                               IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh,
-                                                            fwded_frames);
-               }
+               if (is_multicast_ether_addr(hdr->addr3))
+                       memcpy(hdr->addr1, hdr->addr3, ETH_ALEN);
+               else
+                       if (mesh_nexthop_lookup(skb, osdata))
+                               return  0;
+               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;
                int hdrlen;