diff options
-rw-r--r-- | include/net/mac80211.h | 2 | ||||
-rw-r--r-- | net/mac80211/util.c | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 1196de85f8db..f9b391faaf76 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -1535,7 +1535,7 @@ ieee80211_get_buffered_bc(struct ieee80211_hw *hw, struct ieee80211_vif *vif); | |||
1535 | * | 1535 | * |
1536 | * @skb: the frame | 1536 | * @skb: the frame |
1537 | */ | 1537 | */ |
1538 | int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); | 1538 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb); |
1539 | 1539 | ||
1540 | /** | 1540 | /** |
1541 | * ieee80211_get_hdrlen - get header length from frame control | 1541 | * ieee80211_get_hdrlen - get header length from frame control |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 6513bc2d2707..f3c30d00b21e 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -133,14 +133,14 @@ int ieee80211_get_hdrlen(u16 fc) | |||
133 | } | 133 | } |
134 | EXPORT_SYMBOL(ieee80211_get_hdrlen); | 134 | EXPORT_SYMBOL(ieee80211_get_hdrlen); |
135 | 135 | ||
136 | int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb) | 136 | unsigned int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb) |
137 | { | 137 | { |
138 | const struct ieee80211_hdr *hdr = (const struct ieee80211_hdr *) skb->data; | 138 | const struct ieee80211_hdr *hdr = (const struct ieee80211_hdr *)skb->data; |
139 | int hdrlen; | 139 | unsigned int hdrlen; |
140 | 140 | ||
141 | if (unlikely(skb->len < 10)) | 141 | if (unlikely(skb->len < 10)) |
142 | return 0; | 142 | return 0; |
143 | hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_control)); | 143 | hdrlen = ieee80211_hdrlen(hdr->frame_control); |
144 | if (unlikely(hdrlen > skb->len)) | 144 | if (unlikely(hdrlen > skb->len)) |
145 | return 0; | 145 | return 0; |
146 | return hdrlen; | 146 | return hdrlen; |