> + * @NL80211_CMD_RX_AUTH: authentication notification (on the "mlme" multicast > + * group). This event reports reception of an Authentication frame in > + * station and IBSS modes similarly to MLME-AUTHENTICATE.confirm primitive > + * in the MLME SAP interface (kernel providing MLME, userspace SME). In > + * addition, this event is used as MLME-RESOURCE_REQUEST.confirm primitive > + * which is also reporting a reception of an Authentication frame. The > + * included NL80211_ATTR_FRAME attribute contains the management frame > + * (including both the header and frame body, but not FCS). > + * @NL80211_CMD_RX_ASSOC: association notification (on the "mlme" multicast > + * group). This event reports reception of an Association Response or > + * Reassociation Response frame in station and IBSS modes similarly to > + * MLME-ASSOCIATE.confirm or MLME-REASSOCIATE.confirm primitive in the > + * MLME SAP interface (kernel providing MLME, userspace SME). The included > + * NL80211_ATTR_FRAME contains the management frame (including both the > + * header and frame body, but not FCS). Shouldn't this specify that we send only frames that actually matter to us? > +void cfg80211_send_rx_auth(struct wiphy *wiphy, struct net_device *dev, > + struct sk_buff *skb); > +void cfg80211_send_rx_assoc(struct wiphy *wiphy, struct net_device *dev, > + struct sk_buff *skb); The wiphy parameter is somewhat useless, you can get it from dev->ieee80211_ptr->wiphy. I'd also prefer to not pass the skb but rather data/len separately since (a) that is all we use, and (b) in case some fullmac driver later doesn't actually have this in skb form it can still "build" a frame and then pass it. > @@ -1592,12 +1593,15 @@ static void ieee80211_sta_rx_queued_mgmt > break; > case IEEE80211_STYPE_AUTH: > ieee80211_rx_mgmt_auth(sdata, mgmt, skb->len); > + cfg80211_send_rx_auth(local->hw.wiphy, sdata->dev, skb); > break; > case IEEE80211_STYPE_ASSOC_RESP: > ieee80211_rx_mgmt_assoc_resp(sdata, mgmt, skb->len, 0); > + cfg80211_send_rx_assoc(local->hw.wiphy, sdata->dev, skb); > break; > case IEEE80211_STYPE_REASSOC_RESP: > ieee80211_rx_mgmt_assoc_resp(sdata, mgmt, skb->len, 1); > + cfg80211_send_rx_assoc(local->hw.wiphy, sdata->dev, skb); This seems somewhat wrong... imho we shouldn't be sending these events to userspace if we didn't act on the frames. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part