Skip to content

Commit

Permalink
Bluetooth: bnep: use constant for ethertype
Browse files Browse the repository at this point in the history
The dot1q ethertype number (0x8100) is embedded in the code, although
it is already defined in included headers.

Signed-off-by: Eldad Zack <[email protected]>
Signed-off-by: Gustavo Padovan <[email protected]>
  • Loading branch information
eldad authored and padovan committed May 9, 2012
1 parent 94122bb commit 000092b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bluetooth/bnep/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static inline int bnep_rx_frame(struct bnep_session *s, struct sk_buff *skb)
}

/* Strip 802.1p header */
if (ntohs(s->eh.h_proto) == 0x8100) {
if (ntohs(s->eh.h_proto) == ETH_P_8021Q) {
if (!skb_pull(skb, 4))
goto badframe;
s->eh.h_proto = get_unaligned((__be16 *) (skb->data - 2));
Expand Down

0 comments on commit 000092b

Please sign in to comment.