One more thing: > +/* Get the BIP key index from MMIE; return -1 if this is not a BIP frame */ > +static int ieee80211_get_mmie_keyidx(struct sk_buff *skb) > +{ > + struct ieee80211_mgmt *hdr = (struct ieee80211_mgmt *) skb->data; > + struct ieee80211_mmie *mmie; > + > + if (skb->len < 24 + sizeof(*mmie) || > + !is_multicast_ether_addr(hdr->da)) > + return -1; > + > + if (!ieee80211_is_disassoc(hdr->frame_control) && > + !ieee80211_is_deauth(hdr->frame_control) && > + !ieee80211_is_action(hdr->frame_control)) > + return -1; /* not a robust management frame */ If you reorder the code a bit, you can use the helper below here as well. > +static int ieee80211_is_robust_mgmt_frame(__le16 fc) > +{ > + return ieee80211_is_disassoc(fc) || > + ieee80211_is_deauth(fc) || > + ieee80211_is_action(fc); > +} johannes
Attachment:
signature.asc
Description: This is a digitally signed message part