提交 55182e4a 编写于 作者: J Johannes Berg 提交者: John W. Linville

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: NJohannes Berg <johannes.berg@intel.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 107ef97a
...@@ -1896,11 +1896,10 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb, ...@@ -1896,11 +1896,10 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
* Drop unicast frames to unauthorised stations unless they are * Drop unicast frames to unauthorised stations unless they are
* EAPOL frames from the local station. * EAPOL frames from the local station.
*/ */
if (!ieee80211_vif_is_mesh(&sdata->vif) && if (unlikely(!ieee80211_vif_is_mesh(&sdata->vif) &&
unlikely(!is_multicast_ether_addr(hdr.addr1) && !authorized && !is_multicast_ether_addr(hdr.addr1) && !authorized &&
!(cpu_to_be16(ethertype) == sdata->control_port_protocol && (cpu_to_be16(ethertype) != sdata->control_port_protocol ||
compare_ether_addr(sdata->vif.addr, compare_ether_addr(sdata->vif.addr, skb->data + ETH_ALEN)))) {
skb->data + ETH_ALEN) == 0))) {
#ifdef CONFIG_MAC80211_VERBOSE_DEBUG #ifdef CONFIG_MAC80211_VERBOSE_DEBUG
if (net_ratelimit()) if (net_ratelimit())
printk(KERN_DEBUG "%s: dropped frame to %pM" printk(KERN_DEBUG "%s: dropped frame to %pM"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册