* IEEE 802.1X/WPA code will start accounting after the station has
* been authorized. */
if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen) {
- ap_sta_set_authorized(hapd, sta, 1);
+ if (ap_sta_set_authorized(hapd, sta, 1)) {
+ /* Update driver authorized flag for the STA to cover
+ * the case where AP SME is in the driver and there is
+ * no separate event for handling TX status event for
+ * the (Re)Association Response frame. */
+ hostapd_set_sta_flags(hapd, sta);
+ }
os_get_reltime(&sta->connected_time);
accounting_sta_start(hapd, sta);
}
}
-void ap_sta_set_authorized(struct hostapd_data *hapd, struct sta_info *sta,
+bool ap_sta_set_authorized(struct hostapd_data *hapd, struct sta_info *sta,
int authorized)
{
if (!ap_sta_set_authorized_flag(hapd, sta, authorized))
- return;
+ return false;
ap_sta_set_authorized_event(hapd, sta, authorized);
+ return true;
}
int authorized);
void ap_sta_set_authorized_event(struct hostapd_data *hapd,
struct sta_info *sta, int authorized);
-void ap_sta_set_authorized(struct hostapd_data *hapd,
+bool ap_sta_set_authorized(struct hostapd_data *hapd,
struct sta_info *sta, int authorized);
static inline int ap_sta_is_authorized(struct sta_info *sta)
{