Deleted Added
full compact
if_urtw.c (292080) if_urtw.c (292165)
1/*-
2 * Copyright (c) 2008 Weongyo Jeong <weongyo@FreeBSD.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2008 Weongyo Jeong <weongyo@FreeBSD.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#include <sys/cdefs.h>
18__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_urtw.c 292080 2015-12-11 05:28:00Z imp $");
18__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_urtw.c 292165 2015-12-13 20:48:24Z avos $");
19#include <sys/param.h>
20#include <sys/sockio.h>
21#include <sys/sysctl.h>
22#include <sys/lock.h>
23#include <sys/mutex.h>
24#include <sys/mbuf.h>
25#include <sys/kernel.h>
26#include <sys/socket.h>

--- 4259 unchanged lines hidden (view full) ---

4286 URTW_LOCK(sc);
4287 if ((sc->sc_flags & URTW_RUNNING) == 0) {
4288 URTW_UNLOCK(sc);
4289 return;
4290 }
4291 if (sc->sc_flags & URTW_RTL8187B) {
4292 urtw_write8_m(sc, URTW_SIFS, 0x22);
4293 if (IEEE80211_IS_CHAN_ANYG(ic->ic_curchan))
19#include <sys/param.h>
20#include <sys/sockio.h>
21#include <sys/sysctl.h>
22#include <sys/lock.h>
23#include <sys/mutex.h>
24#include <sys/mbuf.h>
25#include <sys/kernel.h>
26#include <sys/socket.h>

--- 4259 unchanged lines hidden (view full) ---

4286 URTW_LOCK(sc);
4287 if ((sc->sc_flags & URTW_RUNNING) == 0) {
4288 URTW_UNLOCK(sc);
4289 return;
4290 }
4291 if (sc->sc_flags & URTW_RTL8187B) {
4292 urtw_write8_m(sc, URTW_SIFS, 0x22);
4293 if (IEEE80211_IS_CHAN_ANYG(ic->ic_curchan))
4294 urtw_write8_m(sc, URTW_SLOT, 0x9);
4294 urtw_write8_m(sc, URTW_SLOT, IEEE80211_DUR_SHSLOT);
4295 else
4295 else
4296 urtw_write8_m(sc, URTW_SLOT, 0x14);
4296 urtw_write8_m(sc, URTW_SLOT, IEEE80211_DUR_SLOT);
4297 urtw_write8_m(sc, URTW_8187B_EIFS, 0x5b);
4298 urtw_write8_m(sc, URTW_CARRIER_SCOUNT, 0x5b);
4299 } else {
4300 urtw_write8_m(sc, URTW_SIFS, 0x22);
4301 if (sc->sc_state == IEEE80211_S_ASSOC &&
4302 ic->ic_flags & IEEE80211_F_SHSLOT)
4297 urtw_write8_m(sc, URTW_8187B_EIFS, 0x5b);
4298 urtw_write8_m(sc, URTW_CARRIER_SCOUNT, 0x5b);
4299 } else {
4300 urtw_write8_m(sc, URTW_SIFS, 0x22);
4301 if (sc->sc_state == IEEE80211_S_ASSOC &&
4302 ic->ic_flags & IEEE80211_F_SHSLOT)
4303 urtw_write8_m(sc, URTW_SLOT, 0x9);
4303 urtw_write8_m(sc, URTW_SLOT, IEEE80211_DUR_SHSLOT);
4304 else
4304 else
4305 urtw_write8_m(sc, URTW_SLOT, 0x14);
4305 urtw_write8_m(sc, URTW_SLOT, IEEE80211_DUR_SLOT);
4306 if (IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) {
4307 urtw_write8_m(sc, URTW_DIFS, 0x14);
4308 urtw_write8_m(sc, URTW_EIFS, 0x5b - 0x14);
4309 urtw_write8_m(sc, URTW_CW_VAL, 0x73);
4310 } else {
4311 urtw_write8_m(sc, URTW_DIFS, 0x24);
4312 urtw_write8_m(sc, URTW_EIFS, 0x5b - 0x24);
4313 urtw_write8_m(sc, URTW_CW_VAL, 0xa5);

--- 72 unchanged lines hidden ---
4306 if (IEEE80211_IS_CHAN_ANYG(ic->ic_curchan)) {
4307 urtw_write8_m(sc, URTW_DIFS, 0x14);
4308 urtw_write8_m(sc, URTW_EIFS, 0x5b - 0x14);
4309 urtw_write8_m(sc, URTW_CW_VAL, 0x73);
4310 } else {
4311 urtw_write8_m(sc, URTW_DIFS, 0x24);
4312 urtw_write8_m(sc, URTW_EIFS, 0x5b - 0x24);
4313 urtw_write8_m(sc, URTW_CW_VAL, 0xa5);

--- 72 unchanged lines hidden ---