nl80211: Event notifications for MLME events
Add new nl80211 event notifications (and a new multicast group, "mlme") for informing user space about received and processed Authentication, (Re)Association Response, Deauthentication, and Disassociation frames in station and IBSS modes (i.e., MLME SAP interface primitives MLME-AUTHENTICATE.confirm, MLME-ASSOCIATE.confirm, MLME-REASSOCIATE.confirm, MLME-DEAUTHENTICATE.indicate, and MLME-DISASSOCIATE.indication). The event data is encapsulated as the 802.11 management frame since we already have the frame in that format and it includes all the needed information. This is the initial step in providing MLME SAP interface for authentication and association with nl80211. In other words, kernel code will act as the MLME and a user space application can control it as the SME. Signed-off-by: Jouni Malinen <j@w1.fi> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
a299542e97
commit
6039f6d23f
@@ -1085,11 +1085,13 @@ static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
|
||||
case WLAN_AUTH_OPEN:
|
||||
case WLAN_AUTH_LEAP:
|
||||
ieee80211_auth_completed(sdata);
|
||||
cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len);
|
||||
break;
|
||||
case WLAN_AUTH_SHARED_KEY:
|
||||
if (ifmgd->auth_transaction == 4)
|
||||
if (ifmgd->auth_transaction == 4) {
|
||||
ieee80211_auth_completed(sdata);
|
||||
else
|
||||
cfg80211_send_rx_auth(sdata->dev, (u8 *) mgmt, len);
|
||||
} else
|
||||
ieee80211_auth_challenge(sdata, mgmt, len);
|
||||
break;
|
||||
}
|
||||
@@ -1125,6 +1127,7 @@ static void ieee80211_rx_mgmt_deauth(struct ieee80211_sub_if_data *sdata,
|
||||
|
||||
ieee80211_set_disassoc(sdata, true, false, 0);
|
||||
ifmgd->flags &= ~IEEE80211_STA_AUTHENTICATED;
|
||||
cfg80211_send_rx_deauth(sdata->dev, (u8 *) mgmt, len);
|
||||
}
|
||||
|
||||
|
||||
@@ -1154,6 +1157,7 @@ static void ieee80211_rx_mgmt_disassoc(struct ieee80211_sub_if_data *sdata,
|
||||
}
|
||||
|
||||
ieee80211_set_disassoc(sdata, false, false, reason_code);
|
||||
cfg80211_send_rx_disassoc(sdata->dev, (u8 *) mgmt, len);
|
||||
}
|
||||
|
||||
|
||||
@@ -1370,6 +1374,7 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata,
|
||||
ieee80211_set_associated(sdata, changed);
|
||||
|
||||
ieee80211_associated(sdata);
|
||||
cfg80211_send_rx_assoc(sdata->dev, (u8 *) mgmt, len);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user