Ticket #966: 005-state_machine_sta_init-run_fix.diff
| File 005-state_machine_sta_init-run_fix.diff, 2.8 kB (added by xmxwx@asn.pl, 6 years ago) |
|---|
-
madwifi/net80211/ieee80211_proto.c
old new 1580 1580 nrunning = nscanning = 0; 1581 1581 TAILQ_FOREACH(tmpvap, &ic->ic_vaps, iv_next) { 1582 1582 if (vap != tmpvap) { 1583 if (tmpvap->iv_opmode == IEEE80211_M_MONITOR) 1584 /* skip monitor vaps as their 1585 * S_RUN shouldn't have any 1586 * influence on modifying state 1587 * transition */ 1588 continue; 1583 1589 if (tmpvap->iv_state == IEEE80211_S_RUN) 1584 1590 nrunning++; 1585 1591 else if (tmpvap->iv_state == IEEE80211_S_SCAN || … … 1594 1594 } else if (!nscanning && nrunning) { 1595 1595 /* when no one is scanning but someone is running, bypass 1596 1596 * scan and go to run state immediately */ 1597 __ieee80211_newstate(vap, IEEE80211_S_RUN, arg); 1597 if (vap->iv_opmode == IEEE80211_M_MONITOR || 1598 vap->iv_opmode == IEEE80211_M_WDS || 1599 vap->iv_opmode == IEEE80211_M_HOSTAP) { 1600 __ieee80211_newstate(vap, IEEE80211_S_RUN, arg); 1601 } else { 1602 /* MW: avoid invalid S_INIT -> S_RUN transition */ 1603 __ieee80211_newstate(vap, nstate, arg); 1604 } 1598 1605 } else if (nscanning && !nrunning) { 1599 1606 /* when someone is scanning and no one is running, set 1600 1607 * the scan pending flag. Don't go through state machine */
