diff options
author | sam <sam@FreeBSD.org> | 2005-07-22 17:45:48 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2005-07-22 17:45:48 +0000 |
commit | 7e6c91d028bd32599c1e1f924eb7511dc7c9a542 (patch) | |
tree | b246aa0cc557d8b2b511c0c4fca28e054109d904 | |
parent | dd6e7b2fa5ce5c4d9d47db9ae9c0250f871ecbde (diff) | |
download | FreeBSD-src-7e6c91d028bd32599c1e1f924eb7511dc7c9a542.zip FreeBSD-src-7e6c91d028bd32599c1e1f924eb7511dc7c9a542.tar.gz |
simplify tim callback api
MFC after: 3 days
-rw-r--r-- | sys/net80211/ieee80211_input.c | 8 | ||||
-rw-r--r-- | sys/net80211/ieee80211_node.c | 10 | ||||
-rw-r--r-- | sys/net80211/ieee80211_output.c | 2 | ||||
-rw-r--r-- | sys/net80211/ieee80211_var.h | 3 |
4 files changed, 11 insertions, 12 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index bd5eff9..ac25b76 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -2632,7 +2632,7 @@ ieee80211_node_pwrsave(struct ieee80211_node *ni, int enable) */ if (IEEE80211_NODE_SAVEQ_QLEN(ni) == 0) { if (ic->ic_set_tim != NULL) - ic->ic_set_tim(ic, ni, 0); /* just in case */ + ic->ic_set_tim(ni, 0); /* just in case */ return; } IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER, @@ -2657,7 +2657,7 @@ ieee80211_node_pwrsave(struct ieee80211_node *ni, int enable) IF_ENQUEUE(&ic->ic_ifp->if_snd, m); } if (ic->ic_set_tim != NULL) - ic->ic_set_tim(ic, ni, 0); + ic->ic_set_tim(ni, 0); } /* @@ -2704,7 +2704,7 @@ ieee80211_recv_pspoll(struct ieee80211com *ic, ieee80211_send_nulldata(ni); ic->ic_stats.is_ps_qempty++; /* XXX node stat */ if (ic->ic_set_tim != NULL) - ic->ic_set_tim(ic, ni, 0); /* just in case */ + ic->ic_set_tim(ni, 0); /* just in case */ return; } /* @@ -2722,7 +2722,7 @@ ieee80211_recv_pspoll(struct ieee80211com *ic, "[%s] recv ps-poll, send packet, queue empty\n", ether_sprintf(ni->ni_macaddr)); if (ic->ic_set_tim != NULL) - ic->ic_set_tim(ic, ni, 0); + ic->ic_set_tim(ni, 0); } m->m_flags |= M_PWR_SAV; /* bypass PS handling */ IF_ENQUEUE(&ic->ic_ifp->if_snd, m); diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c index be80bd3..a1181de 100644 --- a/sys/net80211/ieee80211_node.c +++ b/sys/net80211/ieee80211_node.c @@ -72,8 +72,7 @@ static void ieee80211_free_allnodes(struct ieee80211_node_table *); static void ieee80211_timeout_scan_candidates(struct ieee80211_node_table *); static void ieee80211_timeout_stations(struct ieee80211_node_table *); -static void ieee80211_set_tim(struct ieee80211com *, - struct ieee80211_node *, int set); +static void ieee80211_set_tim(struct ieee80211_node *, int set); static void ieee80211_node_table_init(struct ieee80211com *ic, struct ieee80211_node_table *nt, const char *name, int inact, @@ -864,7 +863,7 @@ node_cleanup(struct ieee80211_node *ni) */ IEEE80211_NODE_SAVEQ_DRAIN(ni, qlen); if (qlen != 0 && ic->ic_set_tim != NULL) - ic->ic_set_tim(ic, ni, 0); + ic->ic_set_tim(ni, 0); ni->ni_associd = 0; if (ni->ni_challenge != NULL) { @@ -1464,7 +1463,7 @@ IEEE80211_DPRINTF(ic, IEEE80211_MSG_POWER, "[%s] discard frame, age %u\n", ether IEEE80211_NODE_STAT_ADD(ni, ps_discard, discard); if (IEEE80211_NODE_SAVEQ_QLEN(ni) == 0) - ic->ic_set_tim(ic, ni, 0); + ic->ic_set_tim(ni, 0); } } /* @@ -1860,8 +1859,9 @@ ieee80211_getrssi(struct ieee80211com *ic) * Indicate whether there are frames queued for a station in power-save mode. */ static void -ieee80211_set_tim(struct ieee80211com *ic, struct ieee80211_node *ni, int set) +ieee80211_set_tim(struct ieee80211_node *ni, int set) { + struct ieee80211com *ic = ni->ni_ic; u_int16_t aid; KASSERT(ic->ic_opmode == IEEE80211_M_HOSTAP || diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 024099c..d48d8da 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -1602,5 +1602,5 @@ ieee80211_pwrsave(struct ieee80211com *ic, struct ieee80211_node *ni, ether_sprintf(ni->ni_macaddr), qlen); if (qlen == 1) - ic->ic_set_tim(ic, ni, 1); + ic->ic_set_tim(ni, 1); } diff --git a/sys/net80211/ieee80211_var.h b/sys/net80211/ieee80211_var.h index 07f3f84..ce78635 100644 --- a/sys/net80211/ieee80211_var.h +++ b/sys/net80211/ieee80211_var.h @@ -103,8 +103,7 @@ struct ieee80211com { void (*ic_newassoc)(struct ieee80211com *, struct ieee80211_node *, int); void (*ic_updateslot)(struct ifnet *); - void (*ic_set_tim)(struct ieee80211com *, - struct ieee80211_node *, int); + void (*ic_set_tim)(struct ieee80211_node *, int); u_int8_t ic_myaddr[IEEE80211_ADDR_LEN]; struct ieee80211_rateset ic_sup_rates[IEEE80211_MODE_MAX]; struct ieee80211_channel ic_channels[IEEE80211_CHAN_MAX+1]; |