FreeBSD Bugzilla – Attachment 156672 Details for
Bug 200136
[rum] [patch]: add IBSS merge support
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Add IBSS merge support
patch-rum-ibss-merge.diff (text/plain), 2.34 KB, created by
Andriy Voskoboinyk
on 2015-05-12 00:30:02 UTC
(
hide
)
Description:
Add IBSS merge support
Filename:
MIME Type:
Creator:
Andriy Voskoboinyk
Created:
2015-05-12 00:30:02 UTC
Size:
2.34 KB
patch
obsolete
>Index: sys/dev/usb/wlan/if_rum.c >=================================================================== >--- sys/dev/usb/wlan/if_rum.c (revision 282543) >+++ sys/dev/usb/wlan/if_rum.c (working copy) >@@ -163,6 +163,8 @@ > static void rum_tx_free(struct rum_tx_data *, int); > static void rum_setup_tx_list(struct rum_softc *); > static void rum_unsetup_tx_list(struct rum_softc *); >+static void rum_recv_mgmt(struct ieee80211_node *, struct mbuf *, >+ int, int, int); > static int rum_newstate(struct ieee80211vap *, > enum ieee80211_state, int); > static void rum_setup_tx_desc(struct rum_softc *, >@@ -616,6 +618,8 @@ > /* override state transition machine */ > rvp->newstate = vap->iv_newstate; > vap->iv_newstate = rum_newstate; >+ rvp->recv_mgmt = vap->iv_recv_mgmt; >+ vap->iv_recv_mgmt = rum_recv_mgmt; > > usb_callout_init_mtx(&rvp->ratectl_ch, &sc->sc_mtx, 0); > TASK_INIT(&rvp->ratectl_task, 0, rum_ratectl_task, rvp); >@@ -702,6 +706,36 @@ > } > } > >+static void >+rum_recv_mgmt(struct ieee80211_node *ni, struct mbuf *m, int subtype, int rssi, >+ int nf) >+{ >+ struct ieee80211vap *vap = ni->ni_vap; >+ struct rum_softc *sc = vap->iv_ic->ic_ifp->if_softc; >+ struct rum_vap *rvp = RUM_VAP(vap); >+ uint64_t ni_tstamp, rx_tstamp; >+ >+ rvp->recv_mgmt(ni, m, subtype, rssi, nf); >+ >+ if (vap->iv_opmode == IEEE80211_M_IBSS && >+ vap->iv_state == IEEE80211_S_RUN && >+ (subtype == IEEE80211_FC0_SUBTYPE_BEACON || >+ subtype == IEEE80211_FC0_SUBTYPE_PROBE_RESP)) { >+ ni_tstamp = le64toh(ni->ni_tstamp.tsf); >+ RUM_LOCK(sc); >+ rum_read_multi(sc, RT2573_TXRX_CSR12, &rx_tstamp, >+ sizeof(rx_tstamp)); >+ RUM_UNLOCK(sc); >+ rx_tstamp = le64toh(rx_tstamp); >+ >+ if (ni_tstamp >= rx_tstamp) { >+ DPRINTF("ibss merge, tsf %ju tstamp %ju\n", >+ (uintmax_t)rx_tstamp, (uintmax_t)ni_tstamp); >+ (void) ieee80211_ibss_merge(ni); >+ } >+ } >+} >+ > static int > rum_newstate(struct ieee80211vap *vap, enum ieee80211_state nstate, int arg) > { >Index: sys/dev/usb/wlan/if_rumvar.h >=================================================================== >--- sys/dev/usb/wlan/if_rumvar.h (revision 282543) >+++ sys/dev/usb/wlan/if_rumvar.h (working copy) >@@ -77,6 +77,8 @@ > > int (*newstate)(struct ieee80211vap *, > enum ieee80211_state, int); >+ void (*recv_mgmt)(struct ieee80211_node *, >+ struct mbuf *, int, int, int); > }; > #define RUM_VAP(vap) ((struct rum_vap *)(vap)) >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 200136
:
156671
| 156672