Date: Fri, 11 Apr 2008 06:07:24 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 139781 for review Message-ID: <200804110607.m3B67OXq032965@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=139781 Change 139781 by sam@sam_ebb on 2008/04/11 06:07:07 o bounce beacon miss through a taskqueue to eliminate a LOR o hookup radio on/off to net80211 Affected files ... .. //depot/projects/vap/sys/dev/iwn/if_iwn.c#9 edit .. //depot/projects/vap/sys/dev/iwn/if_iwnvar.h#6 edit Differences ... ==== //depot/projects/vap/sys/dev/iwn/if_iwn.c#9 (text+kox) ==== @@ -130,6 +130,7 @@ void iwn_rx_statistics(struct iwn_softc *, struct iwn_rx_desc *); void iwn_tx_intr(struct iwn_softc *, struct iwn_rx_desc *); void iwn_cmd_intr(struct iwn_softc *, struct iwn_rx_desc *); +static void iwn_bmiss(void *, int); void iwn_notif_intr(struct iwn_softc *); void iwn_intr(void *); void iwn_read_eeprom(struct iwn_softc *); @@ -300,7 +301,8 @@ taskqueue_start_threads(&sc->sc_tq, 1, PI_NET, "%s taskq", device_get_nameunit(dev)); - TASK_INIT(&sc->sc_opstask, 0, iwn_ops, sc ); + TASK_INIT(&sc->sc_ops_task, 0, iwn_ops, sc ); + TASK_INIT(&sc->sc_bmiss_task, 0, iwn_bmiss, sc); /* * Put adapter into a known state. @@ -1647,6 +1649,15 @@ wakeup(&ring->cmd[desc->idx]); } +static void +iwn_bmiss(void *arg, int npending) +{ + struct iwn_softc *sc = arg; + struct ieee80211com *ic = sc->sc_ifp->if_l2com; + + ieee80211_beacon_miss(ic); +} + void iwn_notif_intr(struct iwn_softc *sc) { @@ -1707,7 +1718,8 @@ if (vap->iv_state == IEEE80211_S_RUN && misses > 5) (void) iwn_init_sensitivity(sc); if (misses >= vap->iv_bmissthreshold) - ieee80211_beacon_miss(ic); + taskqueue_enqueue(taskqueue_swi, + &sc->sc_bmiss_task); break; } case IWN_UC_READY: { @@ -1808,7 +1820,6 @@ iwn_queue_cmd(sc, IWN_RADIO_ENABLE, 0, IWN_QUEUE_CLEAR); else iwn_queue_cmd(sc, IWN_RADIO_DISABLE, 0, IWN_QUEUE_CLEAR); - } if (r1 & IWN_CT_REACHED) device_printf(sc->sc_dev, "critical temperature reached!\n"); @@ -4445,6 +4456,7 @@ break; iwn_stop_locked(sc); iwn_init(sc); + ieee80211_notify_radio(ic, 1); break; case IWN_RADIO_ENABLE: KASSERT(sc->fw_fp != NULL, @@ -4452,6 +4464,7 @@ iwn_init(sc); break; case IWN_RADIO_DISABLE: + ieee80211_notify_radio(ic, 0); iwn_stop_locked(sc); break; } @@ -4486,7 +4499,7 @@ sc->sc_cmd_arg[sc->sc_cmd_next] = arg; sc->sc_cmd_next = (sc->sc_cmd_next + 1) % IWN_CMD_MAXOPS; } - taskqueue_enqueue(sc->sc_tq, &sc->sc_opstask); + taskqueue_enqueue(sc->sc_tq, &sc->sc_ops_task); IWN_CMD_UNLOCK(sc); return 0; } ==== //depot/projects/vap/sys/dev/iwn/if_iwnvar.h#6 (text+kox) ==== @@ -204,7 +204,8 @@ struct taskqueue *sc_tq; /* Main command task queue */ /* Tasks used by the driver */ - struct task sc_opstask; /* operation handling task */ + struct task sc_ops_task; /* deferred ops */ + struct task sc_bmiss_task; /* beacon miss */ /* Thermal calibration */ int calib_cnt;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200804110607.m3B67OXq032965>