Page MenuHomeFreeBSD

D9986.id26204.diff
No OneTemporary

D9986.id26204.diff

Index: sys/net80211/ieee80211.c
===================================================================
--- sys/net80211/ieee80211.c
+++ sys/net80211/ieee80211.c
@@ -727,6 +727,7 @@
*/
ieee80211_draintask(ic, &vap->iv_nstate_task);
ieee80211_draintask(ic, &vap->iv_swbmiss_task);
+ ieee80211_draintask(ic, &vap->iv_wme_task);
/* XXX band-aid until ifnet handles this for us */
taskqueue_drain(taskqueue_swi, &ifp->if_linktask);
Index: sys/net80211/ieee80211_ht.c
===================================================================
--- sys/net80211/ieee80211_ht.c
+++ sys/net80211/ieee80211_ht.c
@@ -798,6 +798,16 @@
* this frame completes a run, flush any pending frames. We
* return 1 if the frame is consumed. A 0 is returned if
* the frame should be processed normally by the caller.
+ *
+ * XXX TODO: handle hardware decap'ed A-MSDU frames that are
+ * pretending to be MPDU's. This may mean that we have to
+ * buffer not a single mbuf, but a list of mbufs for the same
+ * MSDU. The receive path may not (yet) have enough metadata
+ * to accurately track A-MSDU boundaries, so this is a tricky
+ * one. (Eg, maybe we should keep a sequence number per MPDU
+ * so MSDUs effectively have a separate sequence number;
+ * or expect the hardware will hand us all MSDUs in one rush
+ * so we can push a list A-MSDUs up in one list? Not sure yet.)
*/
int
ieee80211_ampdu_reorder(struct ieee80211_node *ni, struct mbuf *m)
Index: sys/net80211/ieee80211_proto.c
===================================================================
--- sys/net80211/ieee80211_proto.c
+++ sys/net80211/ieee80211_proto.c
@@ -241,7 +241,7 @@
static void update_promisc(void *, int);
static void update_channel(void *, int);
static void update_chw(void *, int);
-static void update_wme(void *, int);
+static void vap_update_wme(void *, int);
static void restart_vaps(void *, int);
static void ieee80211_newstate_cb(void *, int);
@@ -280,7 +280,6 @@
TASK_INIT(&ic->ic_chan_task, 0, update_channel, ic);
TASK_INIT(&ic->ic_bmiss_task, 0, beacon_miss, ic);
TASK_INIT(&ic->ic_chw_task, 0, update_chw, ic);
- TASK_INIT(&ic->ic_wme_task, 0, update_wme, ic);
TASK_INIT(&ic->ic_restart_task, 0, restart_vaps, ic);
ic->ic_wme.wme_hipri_switch_hysteresis =
@@ -338,6 +337,7 @@
callout_init(&vap->iv_mgtsend, 1);
TASK_INIT(&vap->iv_nstate_task, 0, ieee80211_newstate_cb, vap);
TASK_INIT(&vap->iv_swbmiss_task, 0, beacon_swmiss, vap);
+ TASK_INIT(&vap->iv_wme_task, 0, vap_update_wme, vap);
/*
* Install default tx rate handling: no fixed rate, lowest
* supported rate for mgmt and multicast frames. Default
@@ -1285,7 +1285,7 @@
}
/* schedule the deferred WME update */
- ieee80211_runtask(ic, &ic->ic_wme_task);
+ ieee80211_runtask(ic, &vap->iv_wme_task);
IEEE80211_DPRINTF(vap, IEEE80211_MSG_WME,
"%s: WME params updated, cap_info 0x%x\n", __func__,
@@ -1350,15 +1350,25 @@
ic->ic_update_chw(ic);
}
+/*
+ * Deferred WME update.
+ *
+ * In preparation for per-VAP WME configuration, call the VAP
+ * method if the VAP requires it. Otherwise, just call the
+ * older global method. There isn't a per-VAP WME configuration
+ * just yet so for now just use the global configuration.
+ */
static void
-update_wme(void *arg, int npending)
+vap_update_wme(void *arg, int npending)
{
- struct ieee80211com *ic = arg;
+ struct ieee80211vap *vap = arg;
+ struct ieee80211com *ic = vap->iv_ic;
- /*
- * XXX should we defer the WME configuration update until now?
- */
- ic->ic_wme.wme_update(ic);
+ if (vap->iv_wme_update != NULL)
+ vap->iv_wme_update(vap,
+ ic->ic_wme.wme_chanParams.cap_wmeParams);
+ else
+ ic->ic_wme.wme_update(ic);
}
static void
@@ -1385,7 +1395,6 @@
ieee80211_draintask(ic, &ic->ic_chan_task);
ieee80211_draintask(ic, &ic->ic_bmiss_task);
ieee80211_draintask(ic, &ic->ic_chw_task);
- ieee80211_draintask(ic, &ic->ic_wme_task);
taskqueue_unblock(ic->ic_tq);
}
Index: sys/net80211/ieee80211_var.h
===================================================================
--- sys/net80211/ieee80211_var.h
+++ sys/net80211/ieee80211_var.h
@@ -149,7 +149,6 @@
struct task ic_chan_task; /* deferred channel change */
struct task ic_bmiss_task; /* deferred beacon miss hndlr */
struct task ic_chw_task; /* deferred HT CHW update */
- struct task ic_wme_task; /* deferred WME update */
struct task ic_restart_task; /* deferred device restart */
counter_u64_t ic_ierrors; /* input errors */
@@ -557,6 +556,10 @@
int (*iv_output)(struct ifnet *, struct mbuf *,
const struct sockaddr *, struct route *);
+ int (*iv_wme_update)(struct ieee80211vap *,
+ const struct wmeParams *wme_params);
+ struct task iv_wme_task; /* deferred VAP WME update */
+
uint64_t iv_spare[6];
};
MALLOC_DECLARE(M_80211_VAP);

File Metadata

Mime Type
text/plain
Expires
Thu, Apr 16, 5:30 AM (6 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31581541
Default Alt Text
D9986.id26204.diff (4 KB)

Event Timeline