mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-22 23:09:34 +01:00
scan: Remove unreachable code
We should never reach a point where NEW_SCAN_RESULTS or SCAN_ABORTED are received before a corresponding TRIGGER_SCAN is received. Even if this does happen, there's no harm from processing the commands anyway.
This commit is contained in:
parent
c4c86ea1df
commit
280620d7ac
@ -1844,9 +1844,6 @@ static void scan_notify(struct l_genl_msg *msg, void *user_data)
|
|||||||
bool retry = false;
|
bool retry = false;
|
||||||
bool get_results = false;
|
bool get_results = false;
|
||||||
|
|
||||||
if (sc->state == SCAN_STATE_NOT_RUNNING)
|
|
||||||
break;
|
|
||||||
|
|
||||||
sc->state = SCAN_STATE_NOT_RUNNING;
|
sc->state = SCAN_STATE_NOT_RUNNING;
|
||||||
|
|
||||||
/* Was this our own scan or an external scan */
|
/* Was this our own scan or an external scan */
|
||||||
@ -1936,9 +1933,6 @@ static void scan_notify(struct l_genl_msg *msg, void *user_data)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case NL80211_CMD_SCAN_ABORTED:
|
case NL80211_CMD_SCAN_ABORTED:
|
||||||
if (sc->state == SCAN_STATE_NOT_RUNNING)
|
|
||||||
break;
|
|
||||||
|
|
||||||
sc->state = SCAN_STATE_NOT_RUNNING;
|
sc->state = SCAN_STATE_NOT_RUNNING;
|
||||||
|
|
||||||
if (sc->triggered) {
|
if (sc->triggered) {
|
||||||
|
Loading…
Reference in New Issue
Block a user