Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178360986
D3626.1796578323.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D3626.1796578323.diff
View Options
Index: head/sys/dev/usb/wlan/if_rum.c
===================================================================
--- head/sys/dev/usb/wlan/if_rum.c
+++ head/sys/dev/usb/wlan/if_rum.c
@@ -1872,25 +1872,21 @@
static void
rum_set_bssid(struct rum_softc *sc, const uint8_t *bssid)
{
- uint32_t tmp;
-
- tmp = bssid[0] | bssid[1] << 8 | bssid[2] << 16 | bssid[3] << 24;
- rum_write(sc, RT2573_MAC_CSR4, tmp);
- tmp = bssid[4] | bssid[5] << 8 | RT2573_ONE_BSSID << 16;
- rum_write(sc, RT2573_MAC_CSR5, tmp);
+ rum_write(sc, RT2573_MAC_CSR4,
+ bssid[0] | bssid[1] << 8 | bssid[2] << 16 | bssid[3] << 24);
+ rum_write(sc, RT2573_MAC_CSR5,
+ bssid[4] | bssid[5] << 8 | RT2573_NUM_BSSID_MSK(1));
}
static void
rum_set_macaddr(struct rum_softc *sc, const uint8_t *addr)
{
- uint32_t tmp;
-
- tmp = addr[0] | addr[1] << 8 | addr[2] << 16 | addr[3] << 24;
- rum_write(sc, RT2573_MAC_CSR2, tmp);
- tmp = addr[4] | addr[5] << 8 | 0xff << 16;
- rum_write(sc, RT2573_MAC_CSR3, tmp);
+ rum_write(sc, RT2573_MAC_CSR2,
+ addr[0] | addr[1] << 8 | addr[2] << 16 | addr[3] << 24);
+ rum_write(sc, RT2573_MAC_CSR3,
+ addr[4] | addr[5] << 8 | 0xff << 16);
}
static void
@@ -1913,11 +1909,8 @@
struct rum_softc *sc = ic->ic_softc;
RUM_LOCK(sc);
- if (!sc->sc_running) {
- RUM_UNLOCK(sc);
- return;
- }
- rum_setpromisc(sc);
+ if (sc->sc_running)
+ rum_setpromisc(sc);
RUM_UNLOCK(sc);
}
Index: head/sys/dev/usb/wlan/if_rumreg.h
===================================================================
--- head/sys/dev/usb/wlan/if_rumreg.h
+++ head/sys/dev/usb/wlan/if_rumreg.h
@@ -101,7 +101,7 @@
#define RT2573_HOST_READY (1 << 2)
/* possible flags for register MAC_CSR5 */
-#define RT2573_ONE_BSSID 3
+#define RT2573_NUM_BSSID_MSK(n) (((n * 3) & 3) << 16)
/* possible flags for register TXRX_CSR0 */
/* Tx filter flags are in the low 16 bits */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Dec 6, 5:32 PM (8 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42261383
Default Alt Text
D3626.1796578323.diff (1 KB)
Attached To
Mode
D3626: rum(4): simplify rum_set_bssid(), rum_set_macaddr() and rum_update_promisc()
Attached
Detach File
Event Timeline