realtekwifi/rtwn: Synchronize with FreeBSD trunk as of today.
A few changes ommitted (e.g. NET_EPOCH) as they are not needed. Adds support for a variety of USB devices and one PCI device.
This commit is contained in:
@@ -79,7 +79,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
static void rtwn_radiotap_attach(struct rtwn_softc *);
|
||||
static void rtwn_vap_decrement_counters(struct rtwn_softc *,
|
||||
enum ieee80211_opmode, int);
|
||||
@@ -1541,7 +1540,6 @@ rtwn_getradiocaps(struct ieee80211com *ic,
|
||||
setbit(bands, IEEE80211_MODE_11A);
|
||||
setbit(bands, IEEE80211_MODE_11NA);
|
||||
for (i = 0; i < nitems(sc->chan_num_5ghz); i++) {
|
||||
|
||||
if (sc->chan_num_5ghz[i] == 0)
|
||||
continue;
|
||||
|
||||
|
||||
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
static void
|
||||
rtwn_reset_beacon_valid(struct rtwn_softc *sc, int id)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/if_rtwn_debug.h>
|
||||
#include <dev/rtwn/if_rtwn_task.h>
|
||||
|
||||
|
||||
static void
|
||||
rtwn_temp_calib(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
void
|
||||
rtwn_init_cam(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
static int
|
||||
rtwn_efuse_switch_power(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
static int
|
||||
rtwn_fw_loadpage(struct rtwn_softc *sc, int page, const uint8_t *buf,
|
||||
|
||||
@@ -53,7 +53,6 @@ struct r92c_fw_hdr {
|
||||
uint32_t reserved5;
|
||||
} __packed;
|
||||
|
||||
|
||||
int rtwn_load_firmware(struct rtwn_softc *);
|
||||
|
||||
#endif /* IF_RTWN_FW_H */
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
#define RTWN_RATE_IS_OFDM(rate) \
|
||||
((rate) >= RTWN_RIDX_OFDM6 && (rate) != RTWN_RIDX_UNKNOWN)
|
||||
|
||||
|
||||
static const uint8_t ridx2rate[] =
|
||||
{ 2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108 };
|
||||
|
||||
|
||||
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
void
|
||||
rtwn_get_rates(struct rtwn_softc *sc, const struct ieee80211_rateset *rs,
|
||||
const struct ieee80211_htrateset *rs_ht, uint32_t *rates_p,
|
||||
@@ -366,6 +365,18 @@ rtwn_get_multi_pos(const uint8_t maddr[])
|
||||
return (pos);
|
||||
}
|
||||
|
||||
static u_int
|
||||
rtwm_hash_maddr(void *arg, struct sockaddr_dl *sdl, u_int cnt)
|
||||
{
|
||||
uint32_t *mfilt = arg;
|
||||
uint8_t pos;
|
||||
|
||||
pos = rtwn_get_multi_pos(LLADDR(sdl));
|
||||
mfilt[pos / 32] |= (1 << (pos % 32));
|
||||
|
||||
return (1);
|
||||
}
|
||||
|
||||
void
|
||||
rtwn_set_multi(struct rtwn_softc *sc)
|
||||
{
|
||||
@@ -377,32 +388,16 @@ rtwn_set_multi(struct rtwn_softc *sc)
|
||||
/* general structure was copied from ath(4). */
|
||||
if (ic->ic_allmulti == 0) {
|
||||
struct ieee80211vap *vap;
|
||||
struct ifnet *ifp;
|
||||
struct ifmultiaddr *ifma;
|
||||
|
||||
/*
|
||||
* Merge multicast addresses to form the hardware filter.
|
||||
*/
|
||||
mfilt[0] = mfilt[1] = 0;
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {
|
||||
ifp = vap->iv_ifp;
|
||||
if_maddr_rlock(ifp);
|
||||
TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) {
|
||||
caddr_t dl;
|
||||
uint8_t pos;
|
||||
|
||||
dl = LLADDR((struct sockaddr_dl *)
|
||||
ifma->ifma_addr);
|
||||
pos = rtwn_get_multi_pos(dl);
|
||||
|
||||
mfilt[pos / 32] |= (1 << (pos % 32));
|
||||
}
|
||||
if_maddr_runlock(ifp);
|
||||
}
|
||||
TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next)
|
||||
if_foreach_llmaddr(vap->iv_ifp, rtwm_hash_maddr, mfilt);
|
||||
} else
|
||||
mfilt[0] = mfilt[1] = ~0;
|
||||
|
||||
|
||||
rtwn_write_4(sc, R92C_MAR + 0, mfilt[0]);
|
||||
rtwn_write_4(sc, R92C_MAR + 4, mfilt[1]);
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#define RTWN_NOISE_FLOOR -95
|
||||
|
||||
|
||||
void rtwn_get_rates(struct rtwn_softc *, const struct ieee80211_rateset *,
|
||||
const struct ieee80211_htrateset *, uint32_t *, int *, int);
|
||||
void rtwn_set_basicrates(struct rtwn_softc *, uint32_t);
|
||||
|
||||
@@ -43,7 +43,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/if_rtwn_task.h>
|
||||
|
||||
|
||||
static void
|
||||
rtwn_cmdq_cb(void *arg, int pending)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/if_rtwn_ridx.h>
|
||||
#include <dev/rtwn/if_rtwn_tx.h>
|
||||
|
||||
|
||||
void
|
||||
rtwn_drain_mbufq(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
#define R92C_H2C_NBOX 4
|
||||
|
||||
|
||||
/* Common part of Tx descriptor (named only!). */
|
||||
struct rtwn_tx_desc_common {
|
||||
uint16_t pktlen;
|
||||
@@ -115,7 +114,6 @@ struct rtwn_rx_stat_pci {
|
||||
#define RW(var, field, val) \
|
||||
(((var) & ~field##_M) | SM(field, val))
|
||||
|
||||
|
||||
#define RTWN_MAX_CONDITIONS 3
|
||||
|
||||
/*
|
||||
@@ -155,7 +153,6 @@ struct rtwn_rf_prog {
|
||||
const struct rtwn_rf_prog *next;
|
||||
};
|
||||
|
||||
|
||||
/* XXX move to net80211. */
|
||||
static __inline int
|
||||
rtwn_chan2centieee(const struct ieee80211_channel *c)
|
||||
|
||||
@@ -80,7 +80,6 @@ struct rtwn_tx_phystat {
|
||||
uint32_t phydw[RTWN_PHY_STATUS_SIZE / sizeof(uint32_t)];
|
||||
};
|
||||
|
||||
|
||||
struct rtwn_softc;
|
||||
|
||||
union sec_param {
|
||||
@@ -423,7 +422,6 @@ MALLOC_DECLARE(M_RTWN_PRIV);
|
||||
#define RTWN_NT_LOCK_INITIALIZED(sc) mtx_initialized(&(sc)->nt_mtx)
|
||||
#define RTWN_NT_LOCK_DESTROY(sc) mtx_destroy(&(sc)->nt_mtx)
|
||||
|
||||
|
||||
void rtwn_sysctlattach(struct rtwn_softc *);
|
||||
|
||||
int rtwn_attach(struct rtwn_softc *);
|
||||
@@ -431,7 +429,6 @@ void rtwn_detach(struct rtwn_softc *);
|
||||
void rtwn_resume(struct rtwn_softc *);
|
||||
void rtwn_suspend(struct rtwn_softc *);
|
||||
|
||||
|
||||
/* Interface-specific. */
|
||||
#define rtwn_write_1(_sc, _addr, _val) \
|
||||
(((_sc)->sc_write_1)((_sc), (_addr), (_val)))
|
||||
@@ -591,7 +588,6 @@ void rtwn_suspend(struct rtwn_softc *);
|
||||
#define rtwn_init_bcnq1_boundary(_sc) \
|
||||
(((_sc)->sc_init_bcnq1_boundary)((_sc)))
|
||||
|
||||
|
||||
/*
|
||||
* Methods to access subfields in registers.
|
||||
*/
|
||||
|
||||
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_reg.h>
|
||||
|
||||
|
||||
static device_probe_t rtwn_pci_probe;
|
||||
static device_attach_t rtwn_pci_attach;
|
||||
static device_detach_t rtwn_pci_detach;
|
||||
@@ -92,19 +91,19 @@ static void rtwn_pci_beacon_update_end(struct rtwn_softc *,
|
||||
struct ieee80211vap *);
|
||||
static void rtwn_pci_attach_methods(struct rtwn_softc *);
|
||||
|
||||
|
||||
static const struct rtwn_pci_ident *
|
||||
rtwn_pci_probe_sub(device_t dev)
|
||||
{
|
||||
const struct rtwn_pci_ident *ident;
|
||||
int vendor_id, device_id;
|
||||
int i, vendor_id, device_id;
|
||||
|
||||
vendor_id = pci_get_vendor(dev);
|
||||
device_id = pci_get_device(dev);
|
||||
|
||||
for (ident = rtwn_pci_ident_table; ident->name != NULL; ident++)
|
||||
if (vendor_id == ident->vendor && device_id == ident->device)
|
||||
return (ident);
|
||||
for (i = 0; i < nitems(rtwn_pci_ident_table); i++) {
|
||||
if (vendor_id == rtwn_pci_ident_table[i].vendor &&
|
||||
device_id == rtwn_pci_ident_table[i].device)
|
||||
return (&rtwn_pci_ident_table[i]);
|
||||
}
|
||||
|
||||
return (NULL);
|
||||
}
|
||||
@@ -788,6 +787,8 @@ static devclass_t rtwn_pci_devclass;
|
||||
|
||||
DRIVER_MODULE(rtwn_pci, pci, rtwn_pci_driver, rtwn_pci_devclass, NULL, NULL);
|
||||
MODULE_VERSION(rtwn_pci, 1);
|
||||
MODULE_PNP_INFO("U16:vendor;U16:device;D:#", pci, rtwn, rtwn_pci_ident_table,
|
||||
nitems(rtwn_pci_ident_table));
|
||||
MODULE_DEPEND(rtwn_pci, pci, 1, 1, 1);
|
||||
MODULE_DEPEND(rtwn_pci, wlan, 1, 1, 1);
|
||||
MODULE_DEPEND(rtwn_pci, rtwn, 2, 2, 2);
|
||||
|
||||
@@ -35,7 +35,7 @@ struct rtwn_pci_ident {
|
||||
static const struct rtwn_pci_ident rtwn_pci_ident_table[] = {
|
||||
{ 0x10ec, 0x8176, "Realtek RTL8188CE", RTWN_CHIP_RTL8192CE },
|
||||
{ 0x10ec, 0x8179, "Realtek RTL8188EE", RTWN_CHIP_RTL8188EE },
|
||||
{ 0, 0, NULL, RTWN_CHIP_MAX_PCI }
|
||||
{ 0x10ec, 0x8178, "Realtek RTL8192CE", RTWN_CHIP_RTL8192CE },
|
||||
};
|
||||
|
||||
typedef void (*chip_pci_attach)(struct rtwn_pci_softc *);
|
||||
|
||||
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/pci/rtwn_pci_var.h>
|
||||
#include <dev/rtwn/pci/rtwn_pci_reg.h>
|
||||
|
||||
|
||||
int
|
||||
rtwn_pci_write_1(struct rtwn_softc *sc, uint16_t addr, uint8_t val)
|
||||
{
|
||||
|
||||
@@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/taskqueue.h>
|
||||
#include <sys/bus.h>
|
||||
#include <sys/endian.h>
|
||||
#include <sys/epoch.h>
|
||||
|
||||
#include <machine/bus.h>
|
||||
#include <machine/resource.h>
|
||||
@@ -56,7 +57,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/pci/rtwn_pci_var.h>
|
||||
#include <dev/rtwn/pci/rtwn_pci_rx.h>
|
||||
|
||||
|
||||
void
|
||||
rtwn_pci_dma_map_addr(void *arg, bus_dma_segment_t *segs, int nsegs,
|
||||
int error)
|
||||
@@ -85,6 +85,7 @@ rtwn_pci_setup_rx_desc(struct rtwn_pci_softc *pc,
|
||||
static void
|
||||
rtwn_pci_rx_frame(struct rtwn_pci_softc *pc)
|
||||
{
|
||||
struct epoch_tracker et;
|
||||
struct rtwn_softc *sc = &pc->pc_sc;
|
||||
struct rtwn_rx_ring *ring = &pc->rx_ring;
|
||||
struct rtwn_rx_stat_pci *rx_desc = &ring->desc[ring->cur];
|
||||
@@ -164,12 +165,15 @@ rtwn_pci_rx_frame(struct rtwn_pci_softc *pc)
|
||||
|
||||
/* Send the frame to the 802.11 layer. */
|
||||
RTWN_UNLOCK(sc);
|
||||
|
||||
NET_EPOCH_ENTER(et);
|
||||
if (ni != NULL) {
|
||||
(void)ieee80211_input_mimo(ni, m);
|
||||
/* Node is no longer needed. */
|
||||
ieee80211_free_node(ni);
|
||||
} else
|
||||
(void)ieee80211_input_mimo_all(ic, m);
|
||||
NET_EPOCH_EXIT(et);
|
||||
|
||||
RTWN_LOCK(sc);
|
||||
|
||||
|
||||
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_reg.h>
|
||||
|
||||
|
||||
static struct mbuf *
|
||||
rtwn_mbuf_defrag(struct mbuf *m0, int how)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
@@ -101,7 +101,6 @@ enum {
|
||||
(RTWN_PCI_INTR_RX_ERROR | RTWN_PCI_INTR_RX_OVERFLOW | \
|
||||
RTWN_PCI_INTR_RX_DESC_UNAVAIL | RTWN_PCI_INTR_RX_DONE)
|
||||
|
||||
|
||||
struct rtwn_pci_softc {
|
||||
struct rtwn_softc pc_sc; /* must be the first */
|
||||
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
|
||||
|
||||
/*
|
||||
* Global definitions.
|
||||
*/
|
||||
@@ -33,7 +32,6 @@
|
||||
(R88EE_PUBQ_NPAGES + R88EE_HPQ_NPAGES + \
|
||||
R88EE_NPQ_NPAGES + R88EE_LPQ_NPAGES)
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
@@ -50,4 +48,3 @@ void r88ee_start_xfers(struct rtwn_softc *);
|
||||
void r88ee_post_init(struct rtwn_softc *);
|
||||
|
||||
#endif /* RTL8188EE_H */
|
||||
|
||||
|
||||
@@ -23,4 +23,3 @@
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
|
||||
#endif /* R88EE_REG_H */
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
|
||||
#define R88E_CALIB_THRESHOLD 4
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r88e_beacon_enable(struct rtwn_softc *sc, int id, int enable)
|
||||
{
|
||||
|
||||
@@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
|
||||
|
||||
/* Registers to save and restore during IQ calibration. */
|
||||
struct r88e_iq_cal_reg_vals {
|
||||
uint32_t adda[16];
|
||||
|
||||
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e_priv.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
|
||||
|
||||
static int
|
||||
r88e_get_power_group(struct rtwn_softc *sc, struct ieee80211_channel *c)
|
||||
{
|
||||
|
||||
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_fw_cmd.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
int
|
||||
r88e_fw_cmd(struct rtwn_softc *sc, uint8_t id, const void *buf, int len)
|
||||
|
||||
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
|
||||
|
||||
static void
|
||||
r88e_crystalcap_write(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -49,7 +49,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r88e_set_led(struct rtwn_softc *sc, int led, int on)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,6 @@ struct rtwn_r88e_txpwr {
|
||||
int8_t bw20_tx_pwr_diff;
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* MAC initialization values.
|
||||
*/
|
||||
|
||||
@@ -44,7 +44,6 @@
|
||||
#define R88E_TX_RPT_TIME 0x4f0
|
||||
#define R88E_SCH_TXCMD 0x5f8
|
||||
|
||||
|
||||
/* Bits for R88E_HIMR. */
|
||||
#define R88E_HIMR_ROK 0x00000001 /* receive DMA OK */
|
||||
#define R88E_HIMR_RDU 0x00000002 /* Rx descriptor unavailable */
|
||||
@@ -100,7 +99,6 @@
|
||||
/* Bits for R92C_SECCFG. */
|
||||
#define R88E_SECCFG_CHK_KEYID 0x0100
|
||||
|
||||
|
||||
/*
|
||||
* Baseband registers.
|
||||
*/
|
||||
@@ -108,7 +106,6 @@
|
||||
#define R88E_LSSI_PARAM_ADDR_M 0x0ff00000
|
||||
#define R88E_LSSI_PARAM_ADDR_S 20
|
||||
|
||||
|
||||
/*
|
||||
* RF (6052) registers.
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r88e_rf_write(struct rtwn_softc *sc, int chain, uint8_t addr, uint32_t val)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e_priv.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_rom_image.h>
|
||||
|
||||
|
||||
void
|
||||
r88e_parse_rom(struct rtwn_softc *sc, uint8_t *buf)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
#include <dev/rtwn/rtl8188e/r88e_tx_desc.h>
|
||||
|
||||
|
||||
void
|
||||
r88e_tx_enable_ampdu(void *buf, int enable)
|
||||
{
|
||||
|
||||
@@ -23,14 +23,12 @@
|
||||
|
||||
#include <dev/rtwn/rtl8188e/r88e.h>
|
||||
|
||||
|
||||
/*
|
||||
* Global definitions.
|
||||
*/
|
||||
#define R88EU_PUBQ_NPAGES 142
|
||||
#define R88EU_TX_PAGE_COUNT 169
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
-1
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8188e/usb/r88eu.h>
|
||||
|
||||
|
||||
static struct rtwn_r88e_txpwr r88e_txpwr;
|
||||
|
||||
void r88eu_attach(struct rtwn_usb_softc *);
|
||||
|
||||
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8188e/usb/r88eu.h>
|
||||
#include <dev/rtwn/rtl8188e/usb/r88eu_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r88eu_init_bb(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c.h>
|
||||
|
||||
|
||||
/*
|
||||
* Global definitions.
|
||||
*/
|
||||
@@ -35,7 +34,6 @@
|
||||
#define R92CE_TX_PAGE_COUNT \
|
||||
(R92CE_PUBQ_NPAGES + R92CE_HPQ_NPAGES + R92CE_LPQ_NPAGES)
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
-1
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_reg.h>
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_tx_desc.h>
|
||||
|
||||
|
||||
static struct rtwn_r92c_txpwr r92c_txpwr;
|
||||
|
||||
void r92ce_attach(struct rtwn_pci_softc *);
|
||||
|
||||
-1
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce.h>
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_reg.h>
|
||||
|
||||
|
||||
/* Registers to save and restore during IQ calibration. */
|
||||
struct r92ce_iq_cal_reg_vals {
|
||||
uint32_t adda[16];
|
||||
|
||||
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
void
|
||||
r92ce_fw_reset(struct rtwn_softc *sc, int reason)
|
||||
|
||||
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce.h>
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r92ce_init_intr(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_priv.h>
|
||||
|
||||
|
||||
/*
|
||||
* MAC initialization values.
|
||||
*/
|
||||
@@ -53,7 +52,6 @@ static const struct rtwn_mac_prog rtl8192ce_mac[] = {
|
||||
{ 0x70b, 0x87 }
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Baseband initialization values.
|
||||
*/
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
#define R92C_UART_TX_DES 0x370
|
||||
#define R92C_UART_RX_DES 0x378
|
||||
|
||||
|
||||
/* Bits for R92C_GPIO_MUXCFG. */
|
||||
#define R92C_GPIO_MUXCFG_RFKILL 0x0008
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce.h>
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_reg.h>
|
||||
|
||||
|
||||
int
|
||||
r92ce_get_intr_status(struct rtwn_pci_softc *pc, int *rings)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce.h>
|
||||
#include <dev/rtwn/rtl8192c/pci/r92ce_tx_desc.h>
|
||||
|
||||
|
||||
void
|
||||
r92ce_setup_tx_desc(struct rtwn_pci_softc *pc, void *desc,
|
||||
uint32_t next_desc_addr)
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
|
||||
#define R92C_CALIB_THRESHOLD 2
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_var.h>
|
||||
|
||||
|
||||
void
|
||||
r92c_detach_private(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_tx_desc.h>
|
||||
|
||||
|
||||
void
|
||||
r92c_beacon_init(struct rtwn_softc *sc, void *buf, int id)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
/* Registers to save and restore during IQ calibration. */
|
||||
struct r92c_iq_cal_reg_vals {
|
||||
uint32_t adda[16];
|
||||
|
||||
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_var.h>
|
||||
|
||||
|
||||
static int
|
||||
r92c_get_power_group(struct rtwn_softc *sc, struct ieee80211_channel *c)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_fw_cmd.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_tx_desc.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
static int
|
||||
r92c_fw_cmd(struct rtwn_softc *sc, uint8_t id, const void *buf, int len)
|
||||
|
||||
@@ -53,7 +53,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_var.h>
|
||||
|
||||
|
||||
int
|
||||
r92c_check_condition(struct rtwn_softc *sc, const uint8_t cond[])
|
||||
{
|
||||
@@ -322,6 +321,7 @@ r92c_init_antsel(struct rtwn_softc *sc)
|
||||
rtwn_bb_setbits(sc, R92C_FPGA0_RFPARAM(0), 0, 0x2000);
|
||||
reg = rtwn_bb_read(sc, R92C_FPGA0_RFIFACEOE(0));
|
||||
sc->sc_ant = MS(reg, R92C_FPGA0_RFIFACEOE0_ANT); /* XXX */
|
||||
rtwn_setbits_1(sc, R92C_LEDCFG2, 0x80, 0);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
@@ -36,7 +36,6 @@ struct rtwn_r92c_txpwr {
|
||||
int8_t ht20_max_pwr[R92C_MAX_CHAINS][R92C_GROUP_2G];
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Baseband initialization values (shared parts).
|
||||
*/
|
||||
@@ -132,7 +131,6 @@ static const struct rtwn_agc_prog rtl8192ce_agc[] = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* RF initialization values.
|
||||
*/
|
||||
@@ -331,7 +329,6 @@ static const struct rtwn_rf_prog rtl8192c_rf[] = {
|
||||
{ 0, NULL, NULL, { 0 }, NULL }
|
||||
};
|
||||
|
||||
|
||||
struct rtwn_r92c_txagc {
|
||||
uint8_t pwr[R92C_GROUP_2G][28]; /* RTWN_RIDX_HT_MCS(15) + 1 */
|
||||
};
|
||||
|
||||
@@ -148,6 +148,7 @@
|
||||
#define R92C_RD_RESP_PKT_TH 0x463
|
||||
#define R92C_INIRTS_RATE_SEL 0x480
|
||||
#define R92C_INIDATA_RATE_SEL(macid) (0x484 + (macid))
|
||||
#define R92C_POWER_STATUS 0x4a4
|
||||
#define R92C_QUEUE_CTRL 0x4c6
|
||||
#define R92C_MAX_AGGR_NUM 0x4ca
|
||||
#define R92C_BAR_MODE_CTRL 0x4cc
|
||||
@@ -223,7 +224,6 @@
|
||||
#define R92C_MACID1 0x700
|
||||
#define R92C_BSSID1 0x708
|
||||
|
||||
|
||||
#define R92C_MACID(id) ((id) == 0 ? R92C_MACID0 : R92C_MACID1)
|
||||
#define R92C_BSSID(id) ((id) == 0 ? R92C_BSSID0 : R92C_BSSID1)
|
||||
|
||||
@@ -627,7 +627,6 @@
|
||||
#define R92C_CAMCMD_CLR 0x40000000
|
||||
#define R92C_CAMCMD_POLLING 0x80000000
|
||||
|
||||
|
||||
/*
|
||||
* CAM entries.
|
||||
*/
|
||||
@@ -665,7 +664,6 @@
|
||||
#define R92C_RXFLTMAP_SUBTYPE(subtype) \
|
||||
(1 << ((subtype) >> IEEE80211_FC0_SUBTYPE_SHIFT))
|
||||
|
||||
|
||||
/*
|
||||
* Baseband registers.
|
||||
*/
|
||||
@@ -849,7 +847,6 @@
|
||||
#define R92C_POWER_IQK_RESULT_S 16
|
||||
#define R92C_POWER_IQK_RESULT_M 0x03ff0000
|
||||
|
||||
|
||||
/*
|
||||
* RF (6052) registers.
|
||||
*/
|
||||
|
||||
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_var.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_rom_defs.h>
|
||||
|
||||
|
||||
uint32_t
|
||||
r92c_rf_read(struct rtwn_softc *sc, int chain, uint8_t addr)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_var.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_rom_image.h>
|
||||
|
||||
|
||||
static void
|
||||
r92c_set_chains(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_rx_desc.h>
|
||||
|
||||
|
||||
int
|
||||
r92c_classify_intr(struct rtwn_softc *sc, void *buf, int len)
|
||||
{
|
||||
|
||||
@@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/r92c_var.h>
|
||||
#include <dev/rtwn/rtl8192c/r92c_tx_desc.h>
|
||||
|
||||
|
||||
static int
|
||||
r92c_tx_get_sco(struct rtwn_softc *sc, struct ieee80211_channel *c)
|
||||
{
|
||||
@@ -103,7 +102,7 @@ r92c_tx_protection(struct rtwn_softc *sc, struct r92c_tx_desc *txd,
|
||||
rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx);
|
||||
else
|
||||
rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]);
|
||||
ridx = rate2ridx(rate);
|
||||
ridx = rate2ridx(IEEE80211_RV(rate));
|
||||
|
||||
txd->txdw4 |= htole32(SM(R92C_TXDW4_RTSRATE, ridx));
|
||||
/* RTS rate fallback limit (max). */
|
||||
@@ -211,6 +210,12 @@ r92c_tx_setup_macid(void *buf, int id)
|
||||
struct r92c_tx_desc *txd = (struct r92c_tx_desc *)buf;
|
||||
|
||||
txd->txdw1 |= htole32(SM(R92C_TXDW1_MACID, id));
|
||||
|
||||
/* XXX does not belong here */
|
||||
/* XXX temporary (I hope) */
|
||||
/* Force CCK1 for RTS / CTS frames (driver bug) */
|
||||
txd->txdw4 &= ~htole32(SM(R92C_TXDW4_RTSRATE, R92C_TXDW4_RTSRATE_M));
|
||||
txd->txdw4 &= ~htole32(R92C_TXDW4_RTS_SHORT);
|
||||
}
|
||||
|
||||
void
|
||||
@@ -250,7 +255,6 @@ r92c_fill_tx_desc(struct rtwn_softc *sc, struct ieee80211_node *ni,
|
||||
txd->flags0 |= R92C_FLAGS0_BMCAST;
|
||||
|
||||
if (!ismcast) {
|
||||
struct rtwn_node *un = RTWN_NODE(ni);
|
||||
/* Unicast frame, check if an ACK is expected. */
|
||||
if (!qos || (qos & IEEE80211_QOS_ACKPOLICY) !=
|
||||
IEEE80211_QOS_ACKPOLICY_NOACK) {
|
||||
@@ -259,6 +263,7 @@ r92c_fill_tx_desc(struct rtwn_softc *sc, struct ieee80211_node *ni,
|
||||
maxretry));
|
||||
}
|
||||
|
||||
struct rtwn_node *un = RTWN_NODE(ni);
|
||||
macid = un->id;
|
||||
|
||||
if (type == IEEE80211_FC0_TYPE_DATA) {
|
||||
@@ -330,7 +335,7 @@ r92c_fill_tx_desc(struct rtwn_softc *sc, struct ieee80211_node *ni,
|
||||
uint16_t seqno;
|
||||
|
||||
if (m->m_flags & M_AMPDU_MPDU) {
|
||||
seqno = ni->ni_txseqs[tid];
|
||||
seqno = ni->ni_txseqs[tid] % IEEE80211_SEQ_RANGE;
|
||||
ni->ni_txseqs[tid]++;
|
||||
} else
|
||||
seqno = M_SEQNO_GET(m) % IEEE80211_SEQ_RANGE;
|
||||
|
||||
@@ -109,7 +109,6 @@ struct r92c_tx_desc {
|
||||
#define R92C_TXDW6_MAX_AGG_S 11
|
||||
} __packed __attribute__((aligned(4)));
|
||||
|
||||
|
||||
/* Rate adaptation modes. */
|
||||
#define R92C_RAID_11BGN 0
|
||||
#define R92C_RAID_11GN 1
|
||||
|
||||
@@ -23,14 +23,12 @@
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c.h>
|
||||
|
||||
|
||||
/*
|
||||
* Global definitions.
|
||||
*/
|
||||
#define R92CU_PUBQ_NPAGES 231
|
||||
#define R92CU_TX_PAGE_COUNT 248
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
-1
@@ -57,7 +57,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu_reg.h>
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu_tx_desc.h>
|
||||
|
||||
|
||||
static struct rtwn_r92c_txpwr r92c_txpwr;
|
||||
|
||||
void r92cu_attach(struct rtwn_usb_softc *);
|
||||
|
||||
+2
-1
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu.h>
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r92cu_init_bb(struct rtwn_softc *sc)
|
||||
{
|
||||
@@ -357,6 +356,8 @@ void
|
||||
r92cu_post_init(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
rtwn_write_4(sc, R92C_POWER_STATUS, 0x5);
|
||||
|
||||
/* Perform LO and IQ calibrations. */
|
||||
r92c_iq_calib(sc);
|
||||
/* Perform LC calibration. */
|
||||
|
||||
@@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu.h>
|
||||
|
||||
|
||||
void
|
||||
r92cu_set_led(struct rtwn_softc *sc, int led, int on)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,6 @@
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_priv.h>
|
||||
|
||||
|
||||
/*
|
||||
* MAC initialization values.
|
||||
*/
|
||||
@@ -52,7 +51,6 @@ static const struct rtwn_mac_prog rtl8192cu_mac[] = {
|
||||
{ 0x70a, 0x65 }, { 0x70b, 0x87 }
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Baseband initialization values.
|
||||
*/
|
||||
@@ -274,7 +272,6 @@ static const struct rtwn_bb_prog rtl8192cu_bb[] = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static const uint32_t rtl8188ru_agc_vals[] = {
|
||||
0x7b000001, 0x7b010001, 0x7b020001, 0x7b030001, 0x7b040001,
|
||||
0x7b050001, 0x7b060001, 0x7b070001, 0x7b080001, 0x7a090001,
|
||||
|
||||
@@ -23,14 +23,12 @@
|
||||
|
||||
#include <dev/rtwn/rtl8192c/r92c_reg.h>
|
||||
|
||||
|
||||
/*
|
||||
* MAC registers.
|
||||
*/
|
||||
/* System Configuration. */
|
||||
#define R92C_USB_SIE_INTF 0x0e0
|
||||
|
||||
|
||||
/*
|
||||
* USB registers.
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu.h>
|
||||
|
||||
|
||||
int
|
||||
r92cu_align_rx(int totlen, int len)
|
||||
{
|
||||
|
||||
@@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu.h>
|
||||
#include <dev/rtwn/rtl8192c/usb/r92cu_tx_desc.h>
|
||||
|
||||
|
||||
void
|
||||
r92cu_dump_tx_desc(struct rtwn_softc *sc, const void *desc)
|
||||
{
|
||||
|
||||
+1
-1
@@ -42,4 +42,4 @@ struct r92cu_tx_desc {
|
||||
uint16_t pad;
|
||||
} __packed __attribute__((aligned(4)));
|
||||
|
||||
#endif /* R92CU_TX_DESC_H */
|
||||
#endif /* R92CU_TX_DESC_H */
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
|
||||
#define R92E_MAX_FW_SIZE 0x8000
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
@@ -127,7 +127,6 @@ r92e_get_txpower(struct rtwn_softc *sc, int chain, struct ieee80211_channel *c,
|
||||
min_mcs = RTWN_RIDX_HT_MCS(i * 8);
|
||||
for (ridx = min_mcs; ridx <= max_mcs; ridx++)
|
||||
power[ridx] += pwr_diff;
|
||||
|
||||
}
|
||||
|
||||
/* Apply max limit. */
|
||||
|
||||
@@ -61,7 +61,6 @@ static const struct rtwn_mac_prog rtl8192eu_mac[] = {
|
||||
{ 0x70b, 0x87 }
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Baseband initialization values.
|
||||
*/
|
||||
@@ -147,7 +146,6 @@ static const struct rtwn_bb_prog rtl8192eu_bb[] = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static const uint32_t rtl8192eu_agc_vals[] = {
|
||||
0xfb000001, 0xfb010001, 0xfb020001, 0xfb030001, 0xfb040001,
|
||||
0xfb050001, 0xfa060001, 0xf9070001, 0xf8080001, 0xf7090001,
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
|
||||
#ifndef RTL8192EU_H
|
||||
#define RTL8192EU_H
|
||||
|
||||
|
||||
@@ -52,7 +52,6 @@ static const uint8_t r12a_chan_5ghz_1[] =
|
||||
static const uint8_t r12a_chan_5ghz_2[] =
|
||||
{ 149, 153, 157, 161, 165, 169, 173, 177 };
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_reg.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_tx_desc.h>
|
||||
|
||||
|
||||
void
|
||||
r12a_beacon_init(struct rtwn_softc *sc, void *buf, int id)
|
||||
{
|
||||
|
||||
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_reg.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_var.h>
|
||||
|
||||
|
||||
void
|
||||
r12a_lc_calib(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_reg.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_var.h>
|
||||
|
||||
|
||||
int
|
||||
r12a_ioctl_net(struct ieee80211com *ic, u_long cmd, void *data)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_reg.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_var.h>
|
||||
|
||||
|
||||
static void
|
||||
r12a_write_txpower(struct rtwn_softc *sc, int chain,
|
||||
struct ieee80211_channel *c, uint8_t power[RTWN_RIDX_COUNT])
|
||||
|
||||
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_var.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_fw_cmd.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
void
|
||||
r12a_fw_reset(struct rtwn_softc *sc, int reason)
|
||||
|
||||
@@ -77,7 +77,6 @@ struct r12a_fw_cmd_iq_calib {
|
||||
#define RTWN_CMD_IQ_EXT_LNA_5G(lna) ((lna) << 1)
|
||||
} __packed;
|
||||
|
||||
|
||||
/*
|
||||
* C2H event types.
|
||||
*/
|
||||
|
||||
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_reg.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_var.h>
|
||||
|
||||
|
||||
int
|
||||
r12a_check_condition(struct rtwn_softc *sc, const uint8_t cond[])
|
||||
{
|
||||
|
||||
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r12a_set_led(struct rtwn_softc *sc, int led, int on)
|
||||
{
|
||||
|
||||
@@ -73,7 +73,6 @@ static const struct rtwn_mac_prog rtl8812au_mac_no_ext_pa_lna[] = {
|
||||
RTL8812AU_MAC_PROG_END
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Baseband initialization values.
|
||||
*/
|
||||
@@ -212,7 +211,6 @@ static const struct rtwn_bb_prog rtl8812au_bb[] = {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
static const uint32_t rtl8812au_agc_vals0_lna_g0[] = {
|
||||
0xfc000001, 0xfb020001, 0xfa040001, 0xf9060001, 0xf8080001,
|
||||
0xf70a0001, 0xf60c0001, 0xf50e0001, 0xf4100001, 0xf3120001,
|
||||
@@ -832,7 +830,6 @@ static const struct rtwn_rf_prog rtl8812au_rf[] = {
|
||||
{ 0, NULL, NULL, { 0 }, NULL }
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Registers to save before IQ calibration.
|
||||
*/
|
||||
|
||||
@@ -50,7 +50,6 @@
|
||||
#define R12A_ARFR_2G(i) (0x48c + (i) * 8)
|
||||
#define R12A_HT_SINGLE_AMPDU 0x4c7
|
||||
|
||||
|
||||
/* Bits for R92C_MAC_PHY_CTRL. */
|
||||
#define R12A_MAC_PHY_CRYSTALCAP_M 0x7ff80000
|
||||
#define R12A_MAC_PHY_CRYSTALCAP_S 19
|
||||
@@ -89,7 +88,6 @@
|
||||
#define R12A_RCR_TCP_OFFLD_EN 0x02000000
|
||||
#define R12A_RCR_VHT_ACK 0x04000000
|
||||
|
||||
|
||||
/*
|
||||
* Baseband registers.
|
||||
*/
|
||||
@@ -234,7 +232,6 @@
|
||||
#define R12A_TXAGC_MCS15_M 0xff000000
|
||||
#define R12A_TXAGC_MCS15_S 24
|
||||
|
||||
|
||||
/*
|
||||
* RF (6052) registers.
|
||||
*/
|
||||
|
||||
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_reg.h>
|
||||
|
||||
|
||||
uint32_t
|
||||
r12a_rf_read(struct rtwn_softc *sc, int chain, uint8_t addr)
|
||||
{
|
||||
|
||||
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_var.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_rom_image.h>
|
||||
|
||||
|
||||
void
|
||||
r12a_parse_rom_common(struct rtwn_softc *sc, uint8_t *buf)
|
||||
{
|
||||
|
||||
@@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a_fw_cmd.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_rx_desc.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
void
|
||||
r12a_ratectl_tx_complete(struct rtwn_softc *sc, uint8_t *buf, int len)
|
||||
@@ -322,8 +321,10 @@ r12a_get_rx_stats(struct rtwn_softc *sc, struct ieee80211_rx_stats *rxs,
|
||||
*/
|
||||
#if 0
|
||||
rxs->r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ;
|
||||
rxs->r_flags |= IEEE80211_R_BAND;
|
||||
rxs->c_ieee = MS(le16toh(physt->phyw1), R12A_PHYW1_CHAN);
|
||||
rxs->c_freq = ieee80211_ieee2mhz(rxs->c_ieee,
|
||||
(rxs->c_ieee < 36) ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ);
|
||||
rxs->c_band = (rxs->c_ieee < 36) ? IEEE80211_CHAN_2GHZ : IEEE80211_CHAN_5GHZ;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/r12a.h>
|
||||
#include <dev/rtwn/rtl8812a/r12a_tx_desc.h>
|
||||
|
||||
|
||||
static int
|
||||
r12a_get_primary_channel(struct rtwn_softc *sc, struct ieee80211_channel *c)
|
||||
{
|
||||
@@ -111,7 +110,7 @@ r12a_tx_protection(struct rtwn_softc *sc, struct r12a_tx_desc *txd,
|
||||
rate = rtwn_ctl_mcsrate(ic->ic_rt, ridx);
|
||||
else
|
||||
rate = ieee80211_ctl_rate(ic->ic_rt, ridx2rate[ridx]);
|
||||
ridx = rate2ridx(rate);
|
||||
ridx = rate2ridx(IEEE80211_RV(rate));
|
||||
|
||||
txd->txdw4 |= htole32(SM(R12A_TXDW4_RTSRATE, ridx));
|
||||
/* RTS rate fallback limit (max). */
|
||||
@@ -424,7 +423,6 @@ r12a_fill_tx_desc_null(struct rtwn_softc *sc, void *buf, int is11b, int qos,
|
||||
if (!qos) {
|
||||
txd->txdw8 = htole32(R12A_TXDW8_HWSEQ_EN);
|
||||
txd->txdw3 |= htole32(SM(R12A_TXDW3_SEQ_SEL, id));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -130,7 +130,6 @@ struct r12a_tx_desc {
|
||||
#define R12A_TXDW9_SEQ_S 12
|
||||
} __packed __attribute__((aligned(4)));
|
||||
|
||||
|
||||
/* Rate adaptation modes. */
|
||||
#define R12A_RAID_11BGN_2_40 0
|
||||
#define R12A_RAID_11BGN_1_40 1
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
|
||||
#include <dev/rtwn/rtl8812a/r12a.h>
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
-1
@@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/usb/r12au.h>
|
||||
#include <dev/rtwn/rtl8812a/usb/r12au_tx_desc.h>
|
||||
|
||||
|
||||
void r12au_attach(struct rtwn_usb_softc *);
|
||||
|
||||
static void
|
||||
|
||||
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/usb/r12au.h>
|
||||
#include <dev/rtwn/rtl8812a/usb/r12au_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r12au_init_rx_agg(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -58,7 +58,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include <dev/rtwn/rtl8812a/usb/r12au.h>
|
||||
|
||||
|
||||
int
|
||||
r12au_classify_intr(struct rtwn_softc *sc, void *buf, int len)
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8812a/usb/r12au.h>
|
||||
#include <dev/rtwn/rtl8812a/usb/r12au_tx_desc.h>
|
||||
|
||||
|
||||
void
|
||||
r12au_dump_tx_desc(struct rtwn_softc *sc, const void *desc)
|
||||
{
|
||||
|
||||
@@ -39,7 +39,6 @@
|
||||
|
||||
#define R21A_TX_PAGE_SIZE 256
|
||||
|
||||
|
||||
/*
|
||||
* Function declarations.
|
||||
*/
|
||||
|
||||
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8821a/r21a.h>
|
||||
#include <dev/rtwn/rtl8821a/r21a_reg.h>
|
||||
|
||||
|
||||
void
|
||||
r21a_beacon_init(struct rtwn_softc *sc, void *buf, int id)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8821a/r21a_reg.h>
|
||||
#include <dev/rtwn/rtl8821a/r21a_priv.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
int
|
||||
r21a_iq_calib_fw_supported(struct rtwn_softc *sc)
|
||||
|
||||
@@ -60,7 +60,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8821a/r21a.h>
|
||||
#include <dev/rtwn/rtl8821a/r21a_reg.h>
|
||||
|
||||
|
||||
static void
|
||||
r21a_bypass_ext_lna_2ghz(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8821a/r21a.h>
|
||||
#include <dev/rtwn/rtl8821a/r21a_reg.h>
|
||||
|
||||
|
||||
#ifndef RTWN_WITHOUT_UCODE
|
||||
void
|
||||
r21a_fw_reset(struct rtwn_softc *sc, int reason)
|
||||
|
||||
@@ -61,7 +61,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <dev/rtwn/rtl8821a/r21a_priv.h>
|
||||
#include <dev/rtwn/rtl8821a/r21a_reg.h>
|
||||
|
||||
|
||||
int
|
||||
r21a_power_on(struct rtwn_softc *sc)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user