summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorQuaker Fang <Quaker.Fang@Sun.COM>2009-12-02 11:11:14 +0800
committerQuaker Fang <Quaker.Fang@Sun.COM>2009-12-02 11:11:14 +0800
commit216e0daa70a0058c5dc883bc667cd6925015df0a (patch)
treec9923faacf1499d212d0ddf9a71179e899b9e692 /usr/src
parente8f5b3f5917b8c9ec939f5a505922bab6e7b6f3f (diff)
downloadillumos-gate-216e0daa70a0058c5dc883bc667cd6925015df0a.tar.gz
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
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/uts/common/io/iwh/iwh.c22
-rw-r--r--usr/src/uts/common/io/iwk/iwk2.c7
-rw-r--r--usr/src/uts/common/io/net80211/net80211_input.c2
-rw-r--r--usr/src/uts/common/sys/net80211.h1
4 files changed, 18 insertions, 14 deletions
diff --git a/usr/src/uts/common/io/iwh/iwh.c b/usr/src/uts/common/io/iwh/iwh.c
index 43606f4d77..1f0bb23f12 100644
--- a/usr/src/uts/common/io/iwh/iwh.c
+++ b/usr/src/uts/common/io/iwh/iwh.c
@@ -2822,22 +2822,9 @@ iwh_rx_softintr(caddr_t arg, caddr_t unused)
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 @@ iwh_thread(iwh_sc_t *sc)
}
}
+ 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);
diff --git a/usr/src/uts/common/io/iwk/iwk2.c b/usr/src/uts/common/io/iwk/iwk2.c
index 7df0269a51..fbf600039c 100644
--- a/usr/src/uts/common/io/iwk/iwk2.c
+++ b/usr/src/uts/common/io/iwk/iwk2.c
@@ -3395,6 +3395,13 @@ iwk_thread(iwk_sc_t *sc)
}
}
+ 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);
diff --git a/usr/src/uts/common/io/net80211/net80211_input.c b/usr/src/uts/common/io/net80211/net80211_input.c
index 7e720932e6..899e40f312 100644
--- a/usr/src/uts/common/io/net80211/net80211_input.c
+++ b/usr/src/uts/common/io/net80211/net80211_input.c
@@ -836,6 +836,8 @@ ieee80211_recv_beacon(ieee80211com_t *ic, mblk_t *mp, struct ieee80211_node *in,
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
diff --git a/usr/src/uts/common/sys/net80211.h b/usr/src/uts/common/sys/net80211.h
index 6414156e34..a8d45c6174 100644
--- a/usr/src/uts/common/sys/net80211.h
+++ b/usr/src/uts/common/sys/net80211.h
@@ -538,6 +538,7 @@ struct ieee80211com {
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 */