Hello,

I have rum driver in host AP mode. Below patch makes it faster
from 100 kB/s to 700 kB/s.

"+++" part is copied from other place in the file. There could be
better choice even.

 - Vesa

Index: sys/dev/usb/if_rum.c
===================================================================
RCS file: /cvs/src/sys/dev/usb/if_rum.c,v
retrieving revision 1.97
diff -u -r1.97 if_rum.c
--- sys/dev/usb/if_rum.c        25 Jan 2011 20:03:35 -0000      1.97
+++ sys/dev/usb/if_rum.c        10 Jul 2012 10:00:14 -0000
@@ -2221,8 +2221,13 @@
 void
 rum_newassoc(struct ieee80211com *ic, struct ieee80211_node *ni, int isnew)
 {
-       /* start with lowest Tx rate */
-       ni->ni_txrate = 0;
+       int i;
+
+       /* set rate to some reasonable initial value */
+       for (i = ni->ni_rates.rs_nrates - 1;
+            i > 0 && (ni->ni_rates.rs_rates[i] & IEEE80211_RATE_VAL) > 72;
+            i--);
+       ni->ni_txrate = i;
 }
 
 void

Reply via email to