aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/util.c
diff options
context:
space:
mode:
authorHarvey Harrison <harvey.harrison@gmail.com>2008-06-11 17:21:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:12 -0400
commitc9c6950c14ffc0e30e592fec1ebcb203ad3dff10 (patch)
treebcfdd7dea25e8b6acfea1a54ea28394a531e3fae /net/mac80211/util.c
parent8b7b1e05b0454f232b8ae1e6ee134b7f0b38abfb (diff)
mac80211: make ieee80211_get_hdrlen_from_skb return unsigned
Many callers already expect it to. Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r--net/mac80211/util.c8
1 files changed, 4 insertions, 4 deletions
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}
134EXPORT_SYMBOL(ieee80211_get_hdrlen); 134EXPORT_SYMBOL(ieee80211_get_hdrlen);
135 135
136int ieee80211_get_hdrlen_from_skb(const struct sk_buff *skb) 136unsigned 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;