提交 f831e909 编写于 作者: Y YOSHIFUJI Hideaki 提交者: David S. Miller

[MAC80211]: Use htons() where appropriate.

Signed-off-by: NYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 6d82de9e
......@@ -1193,7 +1193,7 @@ ieee80211_deliver_skb(struct ieee80211_txrx_data *rx)
if (xmit_skb) {
/* send to wireless media */
xmit_skb->protocol = __constant_htons(ETH_P_802_3);
xmit_skb->protocol = htons(ETH_P_802_3);
skb_set_network_header(xmit_skb, 0);
skb_set_mac_header(xmit_skb, 0);
dev_queue_xmit(xmit_skb);
......
......@@ -55,7 +55,7 @@ static inline unsigned classify_1d(struct sk_buff *skb, struct Qdisc *qd)
/* check there is a valid IP header present */
offset = ieee80211_get_hdrlen_from_skb(skb) + 8 /* LLC + proto */;
if (skb->protocol != __constant_htons(ETH_P_IP) ||
if (skb->protocol != htons(ETH_P_IP) ||
skb->len < offset + sizeof(*ip))
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册