Deleted Added
full compact
if_urtwn.c (292080) if_urtwn.c (292165)
1/* $OpenBSD: if_urtwn.c,v 1.16 2011/02/10 17:26:40 jakemsr Exp $ */
2
3/*-
4 * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
5 * Copyright (c) 2014 Kevin Lo <kevlo@FreeBSD.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above

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

13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20#include <sys/cdefs.h>
1/* $OpenBSD: if_urtwn.c,v 1.16 2011/02/10 17:26:40 jakemsr Exp $ */
2
3/*-
4 * Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
5 * Copyright (c) 2014 Kevin Lo <kevlo@FreeBSD.org>
6 *
7 * Permission to use, copy, modify, and distribute this software for any
8 * purpose with or without fee is hereby granted, provided that the above

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

13 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
14 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
15 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
16 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
17 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18 */
19
20#include <sys/cdefs.h>
21__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_urtwn.c 292080 2015-12-11 05:28:00Z imp $");
21__FBSDID("$FreeBSD: head/sys/dev/usb/wlan/if_urtwn.c 292165 2015-12-13 20:48:24Z avos $");
22
23/*
24 * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188EU/RTL8188RU/RTL8192CU.
25 */
26
27#include "opt_wlan.h"
28
29#include <sys/param.h>

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

3616{
3617 const struct wmeParams *wmep =
3618 ic->ic_wme.wme_chanParams.cap_wmeParams;
3619 struct urtwn_softc *sc = ic->ic_softc;
3620 uint8_t aifs, acm, slottime;
3621 int ac;
3622
3623 acm = 0;
22
23/*
24 * Driver for Realtek RTL8188CE-VAU/RTL8188CUS/RTL8188EU/RTL8188RU/RTL8192CU.
25 */
26
27#include "opt_wlan.h"
28
29#include <sys/param.h>

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

3616{
3617 const struct wmeParams *wmep =
3618 ic->ic_wme.wme_chanParams.cap_wmeParams;
3619 struct urtwn_softc *sc = ic->ic_softc;
3620 uint8_t aifs, acm, slottime;
3621 int ac;
3622
3623 acm = 0;
3624 slottime = (ic->ic_flags & IEEE80211_F_SHSLOT) ?
3625 IEEE80211_DUR_SHSLOT : IEEE80211_DUR_SLOT;
3624 slottime = IEEE80211_GET_SLOTTIME(ic);
3626
3627 URTWN_LOCK(sc);
3628 for (ac = WME_AC_BE; ac < WME_NUM_AC; ac++) {
3629 /* AIFS[AC] = AIFSN[AC] * aSlotTime + aSIFSTime. */
3630 aifs = wmep[ac].wmep_aifsn * slottime + IEEE80211_DUR_SIFS;
3631 urtwn_write_4(sc, wme2queue[ac].reg,
3632 SM(R92C_EDCA_PARAM_TXOP, wmep[ac].wmep_txopLimit) |
3633 SM(R92C_EDCA_PARAM_ECWMIN, wmep[ac].wmep_logcwmin) |

--- 526 unchanged lines hidden ---
3625
3626 URTWN_LOCK(sc);
3627 for (ac = WME_AC_BE; ac < WME_NUM_AC; ac++) {
3628 /* AIFS[AC] = AIFSN[AC] * aSlotTime + aSIFSTime. */
3629 aifs = wmep[ac].wmep_aifsn * slottime + IEEE80211_DUR_SIFS;
3630 urtwn_write_4(sc, wme2queue[ac].reg,
3631 SM(R92C_EDCA_PARAM_TXOP, wmep[ac].wmep_txopLimit) |
3632 SM(R92C_EDCA_PARAM_ECWMIN, wmep[ac].wmep_logcwmin) |

--- 526 unchanged lines hidden ---