Mercurial > illumos > illumos-gate
changeset 11224:adc2f7b39860
6877201 iwh driver takes forever to find new AP when moving out of range
6892870 dladm scan-wifi continues to show excellent signal strength after wireless hub has been powered off
author | Quaker Fang <Quaker.Fang@Sun.COM> |
---|---|
date | Wed, 02 Dec 2009 11:11:14 +0800 |
parents | 8fbbe7960a8e |
children | eb6056029d84 |
files | usr/src/uts/common/io/iwh/iwh.c usr/src/uts/common/io/iwk/iwk2.c usr/src/uts/common/io/net80211/net80211_input.c usr/src/uts/common/sys/net80211.h |
diffstat | 4 files changed, 18 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/iwh/iwh.c Tue Dec 01 18:10:52 2009 -0800 +++ b/usr/src/uts/common/io/iwh/iwh.c Wed Dec 02 11:11:14 2009 +0800 @@ -2822,22 +2822,9 @@ break; case MISSED_BEACONS_NOTIFICATION: - { - struct iwh_beacon_missed *miss = - (struct iwh_beacon_missed *)(desc + 1); - - if ((ic->ic_state == IEEE80211_S_RUN) && - (LE_32(miss->consecutive) > 50)) { - cmn_err(CE_NOTE, "iwh: iwh_rx_softintr(): " - "beacon missed %d/%d\n", - LE_32(miss->consecutive), - LE_32(miss->total)); - (void) ieee80211_new_state(ic, - IEEE80211_S_INIT, -1); - } + /* handle beacon miss by software mechanism */ break; } - } sc->sc_rxq.cur = (sc->sc_rxq.cur + 1) % RX_QUEUE_SIZE; } @@ -3869,6 +3856,13 @@ } } + if ((ic->ic_state == IEEE80211_S_RUN) && + (ic->ic_beaconmiss++ > 100)) { /* 10 seconds */ + cmn_err(CE_WARN, "iwh: beacon missed for 10 seconds\n"); + (void) ieee80211_new_state(ic, + IEEE80211_S_INIT, -1); + } + delay(drv_usectohz(100000)); mutex_enter(&sc->sc_mt_lock);
--- a/usr/src/uts/common/io/iwk/iwk2.c Tue Dec 01 18:10:52 2009 -0800 +++ b/usr/src/uts/common/io/iwk/iwk2.c Wed Dec 02 11:11:14 2009 +0800 @@ -3395,6 +3395,13 @@ } } + if ((ic->ic_state == IEEE80211_S_RUN) && + (ic->ic_beaconmiss++ > 50)) { /* 5 seconds */ + cmn_err(CE_WARN, "iwk: beacon missed for 5 seconds\n"); + (void) ieee80211_new_state(ic, + IEEE80211_S_INIT, -1); + } + mutex_exit(&sc->sc_mt_lock); delay(drv_usectohz(100000)); mutex_enter(&sc->sc_mt_lock);
--- a/usr/src/uts/common/io/net80211/net80211_input.c Tue Dec 01 18:10:52 2009 -0800 +++ b/usr/src/uts/common/io/net80211/net80211_input.c Wed Dec 02 11:11:14 2009 +0800 @@ -836,6 +836,8 @@ frm = (uint8_t *)&wh[1]; efrm = (uint8_t *)mp->b_wptr; + ic->ic_beaconmiss = 0; /* clear beacon miss counter */ + /* * We process beacon/probe response frames: * o when scanning, or
--- a/usr/src/uts/common/sys/net80211.h Tue Dec 01 18:10:52 2009 -0800 +++ b/usr/src/uts/common/sys/net80211.h Wed Dec 02 11:11:14 2009 +0800 @@ -538,6 +538,7 @@ enum ieee80211_protmode ic_htprotmode; /* HT protection mode */ int ic_lastnonerp; /* last time nonERP sta noted */ int ic_lastnonht; /* last time non-HT sta noted */ + int ic_beaconmiss; /* beacon miss counter */ /* callback functions */