Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177619014
D3689.1794854807.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D3689.1794854807.diff
View Options
Index: sys/dev/usb/wlan/if_rum.c
===================================================================
--- sys/dev/usb/wlan/if_rum.c
+++ sys/dev/usb/wlan/if_rum.c
@@ -207,6 +207,8 @@
struct ieee80211_channel *);
static void rum_set_chan(struct rum_softc *,
struct ieee80211_channel *);
+static void rum_set_maxretry(struct rum_softc *,
+ struct ieee80211vap *);
static int rum_enable_tsf_sync(struct rum_softc *);
static void rum_enable_tsf(struct rum_softc *);
static void rum_abort_tsf_sync(struct rum_softc *);
@@ -819,7 +821,8 @@
ni = ieee80211_ref_node(vap->iv_bss);
if (vap->iv_opmode != IEEE80211_M_MONITOR) {
- if (ic->ic_bsschan == IEEE80211_CHAN_ANYC) {
+ if (ic->ic_bsschan == IEEE80211_CHAN_ANYC ||
+ ni->ni_chan == IEEE80211_CHAN_ANYC) {
ret = EINVAL;
goto run_fail;
}
@@ -827,6 +830,7 @@
rum_enable_mrr(sc);
rum_set_txpreamble(sc);
rum_set_basicrates(sc);
+ rum_set_maxretry(sc, vap);
IEEE80211_ADDR_COPY(sc->sc_bssid, ni->ni_bssid);
rum_set_bssid(sc, sc->sc_bssid);
}
@@ -1946,6 +1950,21 @@
rum_pause(sc, hz / 100);
}
+static void
+rum_set_maxretry(struct rum_softc *sc, struct ieee80211vap *vap)
+{
+ const struct ieee80211_txparam *tp;
+ struct ieee80211_node *ni = vap->iv_bss;
+ struct rum_vap *rvp = RUM_VAP(vap);
+
+ tp = &vap->iv_txparms[ieee80211_chan2mode(ni->ni_chan)];
+ rvp->maxretry = tp->maxretry < 0xf ? tp->maxretry : 0xf;
+
+ rum_modbits(sc, RT2573_TXRX_CSR4, RT2573_SHORT_RETRY(rvp->maxretry) |
+ RT2573_LONG_RETRY(rvp->maxretry),
+ RT2573_SHORT_RETRY_MASK | RT2573_LONG_RETRY_MASK);
+}
+
/*
* Enable TSF synchronization and tell h/w to start sending beacons for IBSS
* and HostAP operating modes.
Index: sys/dev/usb/wlan/if_rumreg.h
===================================================================
--- sys/dev/usb/wlan/if_rumreg.h
+++ sys/dev/usb/wlan/if_rumreg.h
@@ -151,6 +151,10 @@
#define RT2573_SHORT_PREAMBLE (1 << 18)
#define RT2573_MRR_ENABLED (1 << 19)
#define RT2573_MRR_CCK_FALLBACK (1 << 22)
+#define RT2573_LONG_RETRY(max) ((max) << 24)
+#define RT2573_LONG_RETRY_MASK (0xf << 24)
+#define RT2573_SHORT_RETRY(max) ((max) << 28)
+#define RT2573_SHORT_RETRY_MASK (0xf << 28)
/* possible flags for register TXRX_CSR9 */
#define RT2573_TSF_TIMER_EN (1 << 16)
Index: sys/dev/usb/wlan/if_rumvar.h
===================================================================
--- sys/dev/usb/wlan/if_rumvar.h
+++ sys/dev/usb/wlan/if_rumvar.h
@@ -94,6 +94,7 @@
struct usb_callout ratectl_ch;
struct task ratectl_task;
+ uint8_t maxretry;
int (*newstate)(struct ieee80211vap *,
enum ieee80211_state, int);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 16, 6:46 PM (14 h, 35 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41785594
Default Alt Text
D3689.1794854807.diff (2 KB)
Attached To
Mode
D3689: rum(4): set short/long retry limits
Attached
Detach File
Event Timeline