/* Attach the rxmeta, set some stuff */
p80211skb_rxmeta_attach(wlandev, skb);
- rxmeta = P80211SKB_RXMETA(skb);
+ rxmeta = p80211skb_rxmeta(skb);
rxmeta->mactime = usbin->rxfrm.desc.time;
rxmeta->rxrate = usbin->rxfrm.desc.rate;
rxmeta->signal = usbin->rxfrm.desc.signal - hw->dbmadjust;
/* jkriegl: only process signal/noise if requested by iwspy */
if (wlandev->spy_number)
orinoco_spy_gather(wlandev, eth_hdr(skb)->h_source,
- P80211SKB_RXMETA(skb));
+ p80211skb_rxmeta(skb));
/* Free the metadata */
p80211skb_rxmeta_detach(skb);
struct p80211_frmmeta *frmmeta;
/* If these already have metadata, we error out! */
- if (P80211SKB_RXMETA(skb)) {
+ if (p80211skb_rxmeta(skb)) {
netdev_err(wlandev->netdev,
"%s: RXmeta already attached!\n", wlandev->name);
result = 0;
#define P80211_FRMMETA_MAGIC 0x802110
-#define P80211SKB_RXMETA(s) \
- (p80211skb_frmmeta((s)) ? p80211skb_frmmeta((s))->rx : \
- ((struct p80211_rxmeta *)(NULL)))
-
struct p80211_rxmeta {
struct wlandevice *wlandev;
return frmmeta->magic == P80211_FRMMETA_MAGIC ? frmmeta : NULL;
}
+static inline struct p80211_rxmeta *p80211skb_rxmeta(struct sk_buff *skb)
+{
+ struct p80211_frmmeta *frmmeta = p80211skb_frmmeta(skb);
+
+ return frmmeta ? frmmeta->rx : NULL;
+}
+
/*
* Frame capture header. (See doc/capturefrm.txt)
*/