pr_debug("Called w/ null skb.\n");
return;
}
- frmmeta = P80211SKB_FRMMETA(skb);
+ frmmeta = p80211skb_frmmeta(skb);
if (!frmmeta) { /* no magic */
pr_debug("Called w/ bad frmmeta magic.\n");
return;
{
struct p80211_frmmeta *meta;
- meta = P80211SKB_FRMMETA(skb);
+ meta = p80211skb_frmmeta(skb);
if (meta && meta->rx)
p80211skb_rxmeta_detach(skb);
else
#define P80211_FRMMETA_MAGIC 0x802110
-#define P80211SKB_FRMMETA(s) \
- (((((struct p80211_frmmeta *)((s)->cb))->magic) == \
- P80211_FRMMETA_MAGIC) ? \
- ((struct p80211_frmmeta *)((s)->cb)) : \
- (NULL))
-
#define P80211SKB_RXMETA(s) \
- (P80211SKB_FRMMETA((s)) ? P80211SKB_FRMMETA((s))->rx : \
+ (p80211skb_frmmeta((s)) ? p80211skb_frmmeta((s))->rx : \
((struct p80211_rxmeta *)(NULL)))
struct p80211_rxmeta {
int p80211skb_rxmeta_attach(struct wlandevice *wlandev, struct sk_buff *skb);
void p80211skb_rxmeta_detach(struct sk_buff *skb);
+static inline struct p80211_frmmeta *p80211skb_frmmeta(struct sk_buff *skb)
+{
+ struct p80211_frmmeta *frmmeta = (struct p80211_frmmeta *)skb->cb;
+
+ return frmmeta->magic == P80211_FRMMETA_MAGIC ? frmmeta : NULL;
+}
+
/*
* Frame capture header. (See doc/capturefrm.txt)
*/