Skip to content

Commit 98072b2

Browse files
authored
Merge pull request #11748 from cydriftcloud/pr-dev/fix-spurious-link-down-up
Fix spurious link up/down when AP IP address range change
2 parents e1c3de6 + d411d72 commit 98072b2

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

features/netsocket/emac-drivers/TARGET_WHD/interface/WhdSTAInterface.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,13 +162,21 @@ static void *whd_wifi_link_state_change_handler(whd_interface_t ifp,
162162
return NULL;
163163
}
164164

165-
if (event_header->event_type == WLC_E_DEAUTH_IND ||
166-
event_header->event_type == WLC_E_DISASSOC_IND) {
165+
if ((event_header->event_type == WLC_E_DEAUTH_IND) ||
166+
(event_header->event_type == WLC_E_DISASSOC_IND) ||
167+
((event_header->event_type == WLC_E_PSK_SUP) &&
168+
(event_header->status == WLC_SUP_KEYED) &&
169+
(event_header->reason == WLC_E_SUP_DEAUTH))) {
167170
whd_emac_wifi_link_state_changed(ifp, WHD_FALSE);
171+
return handler_user_data;
168172
}
169173

170-
if (whd_wifi_is_ready_to_transceive(ifp) == WHD_SUCCESS) {
174+
if (((event_header->event_type == WLC_E_PSK_SUP) &&
175+
(event_header->status == WLC_SUP_KEYED) &&
176+
(event_header->reason == WLC_E_SUP_OTHER)) ||
177+
(whd_wifi_is_ready_to_transceive(ifp) == WHD_SUCCESS)) {
171178
whd_emac_wifi_link_state_changed(ifp, WHD_TRUE);
179+
return handler_user_data;
172180
}
173181

174182
return handler_user_data;

0 commit comments

Comments
 (0)