use frame type returned by ieee80211_input to drive softled code

instead of monitoring the input packet count
This commit is contained in:
Sam Leffler 2005-04-04 02:34:15 +00:00
parent 1f29887956
commit 31640eb774
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=144617
2 changed files with 3 additions and 5 deletions

View file

@ -2512,7 +2512,7 @@ ath_rx_proc(void *arg, int npending)
struct mbuf *m;
struct ieee80211_node *ni;
struct ath_node *an;
int len;
int len, type;
u_int phyerr;
HAL_STATUS status;
@ -2719,7 +2719,7 @@ ath_rx_proc(void *arg, int npending)
/*
* Send frame up for processing.
*/
ieee80211_input(ic, m, ni,
type = ieee80211_input(ic, m, ni,
ds->ds_rxstat.rs_rssi, ds->ds_rxstat.rs_tstamp);
if (sc->sc_softled) {
@ -2729,8 +2729,7 @@ ath_rx_proc(void *arg, int npending)
* is mainly for station mode where we depend on
* periodic beacon frames to trigger the poll event.
*/
if (sc->sc_ipackets != ifp->if_ipackets) {
sc->sc_ipackets = ifp->if_ipackets;
if (type == IEEE80211_FC0_TYPE_DATA) {
sc->sc_rxrate = ds->ds_rxstat.rs_rate;
ath_led_event(sc, ATH_LED_RX);
} else if (ticks - sc->sc_ledevent >= sc->sc_ledidle)

View file

@ -212,7 +212,6 @@ struct ath_softc {
u_int sc_ledpin; /* GPIO pin for driving LED */
u_int sc_ledon; /* pin setting for LED on */
u_int sc_ledidle; /* idle polling interval */
u_int32_t sc_ipackets; /* last data packet count */
int sc_ledevent; /* time of last LED event */
u_int8_t sc_rxrate; /* current rx rate for LED */
u_int8_t sc_txrate; /* current tx rate for LED */