diff options
author | Johannes Berg <johannes.berg@intel.com> | 2011-10-12 11:28:21 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-10-14 14:48:16 -0400 |
commit | 55182e4adfffa808a1d07a515637c05c67028a5f (patch) | |
tree | b07870ed475792815cafafabb3dce51f192143aa /net/mac80211/tx.c | |
parent | 107ef97a170dec95893f34614edd92eb8cb9b5d0 (diff) |
mac80211: reformat TX unauthorised check
Reformat the check, the indentation is completely strange.
Also change the last part of the condition to make the
code shorter.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/tx.c')
-rw-r--r-- | net/mac80211/tx.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c index 97ac2c4ce1bf..48bbb96d8edb 100644 --- a/net/mac80211/tx.c +++ b/net/mac80211/tx.c | |||
@@ -1896,11 +1896,10 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, | |||
1896 | * Drop unicast frames to unauthorised stations unless they are | 1896 | * Drop unicast frames to unauthorised stations unless they are |
1897 | * EAPOL frames from the local station. | 1897 | * EAPOL frames from the local station. |
1898 | */ | 1898 | */ |
1899 | if (!ieee80211_vif_is_mesh(&sdata->vif) && | 1899 | if (unlikely(!ieee80211_vif_is_mesh(&sdata->vif) && |
1900 | unlikely(!is_multicast_ether_addr(hdr.addr1) && !authorized && | 1900 | !is_multicast_ether_addr(hdr.addr1) && !authorized && |
1901 | !(cpu_to_be16(ethertype) == sdata->control_port_protocol && | 1901 | (cpu_to_be16(ethertype) != sdata->control_port_protocol || |
1902 | compare_ether_addr(sdata->vif.addr, | 1902 | compare_ether_addr(sdata->vif.addr, skb->data + ETH_ALEN)))) { |
1903 | skb->data + ETH_ALEN) == 0))) { | ||
1904 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG | 1903 | #ifdef CONFIG_MAC80211_VERBOSE_DEBUG |
1905 | if (net_ratelimit()) | 1904 | if (net_ratelimit()) |
1906 | printk(KERN_DEBUG "%s: dropped frame to %pM" | 1905 | printk(KERN_DEBUG "%s: dropped frame to %pM" |