Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0b38265 authored by Eliad Peller's avatar Eliad Peller Committed by Luciano Coelho
Browse files

wl12xx: check for ROC on scan_complete



When scan completes, and we are not associated, we should start
the dev role and ROC. however, we might already be in this situation
(e.g. if we got disconnected during scan). check for it.

Signed-off-by: default avatarEliad Peller <eliad@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent 2ec7da25
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -65,8 +65,9 @@ void wl1271_scan_complete_work(struct work_struct *work)
	/* return to ROC if needed */
	is_sta = (wl->bss_type == BSS_TYPE_STA_BSS);
	is_ibss = (wl->bss_type == BSS_TYPE_IBSS);
	if ((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) ||
	    (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) {
	if (((is_sta && !test_bit(WL1271_FLAG_STA_ASSOCIATED, &wl->flags)) ||
	     (is_ibss && !test_bit(WL1271_FLAG_IBSS_JOINED, &wl->flags))) &&
	    !test_bit(wl->dev_role_id, wl->roc_map)) {
		/* restore remain on channel */
		wl12xx_cmd_role_start_dev(wl);
		wl12xx_roc(wl, wl->dev_role_id);