if_iwn.c (234321) | if_iwn.c (234324) |
---|---|
1/*- 2 * Copyright (c) 2007-2009 3 * Damien Bergamini <damien.bergamini@free.fr> 4 * Copyright (c) 2008 5 * Benjamin Close <benjsc@FreeBSD.org> 6 * Copyright (c) 2008 Sam Leffler, Errno Consulting 7 * 8 * Permission to use, copy, modify, and distribute this software for any --- 10 unchanged lines hidden (view full) --- 19 */ 20 21/* 22 * Driver for Intel WiFi Link 4965 and 1000/5000/6000 Series 802.11 network 23 * adapters. 24 */ 25 26#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2007-2009 3 * Damien Bergamini <damien.bergamini@free.fr> 4 * Copyright (c) 2008 5 * Benjamin Close <benjsc@FreeBSD.org> 6 * Copyright (c) 2008 Sam Leffler, Errno Consulting 7 * 8 * Permission to use, copy, modify, and distribute this software for any --- 10 unchanged lines hidden (view full) --- 19 */ 20 21/* 22 * Driver for Intel WiFi Link 4965 and 1000/5000/6000 Series 802.11 network 23 * adapters. 24 */ 25 26#include <sys/cdefs.h> |
27__FBSDID("$FreeBSD: head/sys/dev/iwn/if_iwn.c 234321 2012-04-15 18:25:17Z bschmidt $"); | 27__FBSDID("$FreeBSD: head/sys/dev/iwn/if_iwn.c 234324 2012-04-15 20:29:39Z adrian $"); |
28 29#include <sys/param.h> 30#include <sys/sockio.h> 31#include <sys/sysctl.h> 32#include <sys/mbuf.h> 33#include <sys/kernel.h> 34#include <sys/socket.h> 35#include <sys/systm.h> --- 2404 unchanged lines hidden (view full) --- 2440 uint64_t bitmap; 2441 uint8_t tid; 2442 int ackfailcnt = 0, i, shift; 2443 2444 bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); 2445 2446 txq = &sc->txq[le16toh(ba->qid)]; 2447 tap = sc->qid2tap[le16toh(ba->qid)]; | 28 29#include <sys/param.h> 30#include <sys/sockio.h> 31#include <sys/sysctl.h> 32#include <sys/mbuf.h> 33#include <sys/kernel.h> 34#include <sys/socket.h> 35#include <sys/systm.h> --- 2404 unchanged lines hidden (view full) --- 2440 uint64_t bitmap; 2441 uint8_t tid; 2442 int ackfailcnt = 0, i, shift; 2443 2444 bus_dmamap_sync(sc->rxq.data_dmat, data->map, BUS_DMASYNC_POSTREAD); 2445 2446 txq = &sc->txq[le16toh(ba->qid)]; 2447 tap = sc->qid2tap[le16toh(ba->qid)]; |
2448 tid = WME_AC_TO_TID(tap->txa_ac); | 2448 tid = tap->txa_tid; |
2449 ni = tap->txa_ni; 2450 wn = (void *)ni; 2451 2452 if (wn->agg[tid].bitmap == 0) 2453 return; 2454 2455 shift = wn->agg[tid].startidx - ((le16toh(ba->seq) >> 4) & 0xff); 2456 if (shift < 0) --- 342 unchanged lines hidden (view full) --- 2799 start = idx; 2800 bit = 0; 2801 } 2802 bitmap = bitmap << shift; 2803 bitmap |= 1ULL << bit; 2804 } 2805 tap = sc->qid2tap[qid]; 2806 if (tap != NULL) { | 2449 ni = tap->txa_ni; 2450 wn = (void *)ni; 2451 2452 if (wn->agg[tid].bitmap == 0) 2453 return; 2454 2455 shift = wn->agg[tid].startidx - ((le16toh(ba->seq) >> 4) & 0xff); 2456 if (shift < 0) --- 342 unchanged lines hidden (view full) --- 2799 start = idx; 2800 bit = 0; 2801 } 2802 bitmap = bitmap << shift; 2803 bitmap |= 1ULL << bit; 2804 } 2805 tap = sc->qid2tap[qid]; 2806 if (tap != NULL) { |
2807 tid = WME_AC_TO_TID(tap->txa_ac); | 2807 tid = tap->txa_tid; |
2808 wn = (void *)tap->txa_ni; 2809 wn->agg[tid].bitmap = bitmap; 2810 wn->agg[tid].startidx = start; 2811 wn->agg[tid].nframes = nframes; 2812 } 2813 2814 seqno = le32toh(*(status + nframes)) & 0xfff; 2815 for (lastidx = (seqno & 0xff); ring->read != lastidx;) { --- 2764 unchanged lines hidden (view full) --- 5580} 5581 5582static int 5583iwn_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, 5584 int code, int baparamset, int batimeout) 5585{ 5586 struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc; 5587 int qid = *(int *)tap->txa_private; | 2808 wn = (void *)tap->txa_ni; 2809 wn->agg[tid].bitmap = bitmap; 2810 wn->agg[tid].startidx = start; 2811 wn->agg[tid].nframes = nframes; 2812 } 2813 2814 seqno = le32toh(*(status + nframes)) & 0xfff; 2815 for (lastidx = (seqno & 0xff); ring->read != lastidx;) { --- 2764 unchanged lines hidden (view full) --- 5580} 5581 5582static int 5583iwn_addba_response(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap, 5584 int code, int baparamset, int batimeout) 5585{ 5586 struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc; 5587 int qid = *(int *)tap->txa_private; |
5588 uint8_t tid = WME_AC_TO_TID(tap->txa_ac); | 5588 uint8_t tid = tap->txa_tid; |
5589 int ret; 5590 5591 if (code == IEEE80211_STATUS_SUCCESS) { 5592 ni->ni_txseqs[tid] = tap->txa_start & 0xfff; 5593 ret = iwn_ampdu_tx_start(ni->ni_ic, ni, tid); 5594 if (ret != 1) 5595 return ret; 5596 } else { --- 7 unchanged lines hidden (view full) --- 5604/* 5605 * This function is called by upper layer when an ADDBA response is received 5606 * from another STA. 5607 */ 5608static int 5609iwn_ampdu_tx_start(struct ieee80211com *ic, struct ieee80211_node *ni, 5610 uint8_t tid) 5611{ | 5589 int ret; 5590 5591 if (code == IEEE80211_STATUS_SUCCESS) { 5592 ni->ni_txseqs[tid] = tap->txa_start & 0xfff; 5593 ret = iwn_ampdu_tx_start(ni->ni_ic, ni, tid); 5594 if (ret != 1) 5595 return ret; 5596 } else { --- 7 unchanged lines hidden (view full) --- 5604/* 5605 * This function is called by upper layer when an ADDBA response is received 5606 * from another STA. 5607 */ 5608static int 5609iwn_ampdu_tx_start(struct ieee80211com *ic, struct ieee80211_node *ni, 5610 uint8_t tid) 5611{ |
5612 struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[TID_TO_WME_AC(tid)]; | 5612 struct ieee80211_tx_ampdu *tap = &ni->ni_tx_ampdu[tid]; |
5613 struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc; 5614 struct iwn_ops *ops = &sc->ops; 5615 struct iwn_node *wn = (void *)ni; 5616 struct iwn_node_info node; 5617 int error, qid; 5618 5619 /* Enable TX for the specified RA/TID. */ 5620 wn->disable_tid &= ~(1 << tid); --- 16 unchanged lines hidden (view full) --- 5637 return 1; 5638} 5639 5640static void 5641iwn_ampdu_tx_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) 5642{ 5643 struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc; 5644 struct iwn_ops *ops = &sc->ops; | 5613 struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc; 5614 struct iwn_ops *ops = &sc->ops; 5615 struct iwn_node *wn = (void *)ni; 5616 struct iwn_node_info node; 5617 int error, qid; 5618 5619 /* Enable TX for the specified RA/TID. */ 5620 wn->disable_tid &= ~(1 << tid); --- 16 unchanged lines hidden (view full) --- 5637 return 1; 5638} 5639 5640static void 5641iwn_ampdu_tx_stop(struct ieee80211_node *ni, struct ieee80211_tx_ampdu *tap) 5642{ 5643 struct iwn_softc *sc = ni->ni_ic->ic_ifp->if_softc; 5644 struct iwn_ops *ops = &sc->ops; |
5645 uint8_t tid = WME_AC_TO_TID(tap->txa_ac); | 5645 uint8_t tid = tap->txa_tid; |
5646 int qid; 5647 5648 if (tap->txa_private == NULL) 5649 return; 5650 5651 qid = *(int *)tap->txa_private; 5652 if (iwn_nic_lock(sc) != 0) 5653 return; --- 1378 unchanged lines hidden --- | 5646 int qid; 5647 5648 if (tap->txa_private == NULL) 5649 return; 5650 5651 qid = *(int *)tap->txa_private; 5652 if (iwn_nic_lock(sc) != 0) 5653 return; --- 1378 unchanged lines hidden --- |