aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorRami Rosen <roszenrami@gmail.com>2008-10-02 09:48:22 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-10-06 18:14:56 -0400
commitf74b6a5498049bab28419a03e4b31fcdbe7a900d (patch)
tree341cd19b3f7e11c8e0119491d6aca3eca25f63c7 /net/mac80211
parentcf3e74c2e4a438480c11782b17e90029f5d24696 (diff)
mac80211: remove redundant check in ieee80211_master_start_xmit (net/mac80211/tx.c)
- 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>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/tx.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 226ce77363d7..d7153bbcdb2b 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1295,16 +1295,14 @@ int ieee80211_master_start_xmit(struct sk_buff *skb, struct net_device *dev)
1295 1295
1296 if (ieee80211_vif_is_mesh(&osdata->vif) && 1296 if (ieee80211_vif_is_mesh(&osdata->vif) &&
1297 ieee80211_is_data(hdr->frame_control)) { 1297 ieee80211_is_data(hdr->frame_control)) {
1298 if (ieee80211_is_data(hdr->frame_control)) { 1298 if (is_multicast_ether_addr(hdr->addr3))
1299 if (is_multicast_ether_addr(hdr->addr3)) 1299 memcpy(hdr->addr1, hdr->addr3, ETH_ALEN);
1300 memcpy(hdr->addr1, hdr->addr3, ETH_ALEN); 1300 else
1301 else 1301 if (mesh_nexthop_lookup(skb, osdata))
1302 if (mesh_nexthop_lookup(skb, osdata)) 1302 return 0;
1303 return 0; 1303 if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0)
1304 if (memcmp(odev->dev_addr, hdr->addr4, ETH_ALEN) != 0) 1304 IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh,
1305 IEEE80211_IFSTA_MESH_CTR_INC(&osdata->u.mesh, 1305 fwded_frames);
1306 fwded_frames);
1307 }
1308 } else if (unlikely(osdata->vif.type == NL80211_IFTYPE_MONITOR)) { 1306 } else if (unlikely(osdata->vif.type == NL80211_IFTYPE_MONITOR)) {
1309 struct ieee80211_sub_if_data *sdata; 1307 struct ieee80211_sub_if_data *sdata;
1310 int hdrlen; 1308 int hdrlen;