Commit 09ea8089 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'staging-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "This is the "big" staging driver update for 6.11-rc1. Not really all
  that much happened this release cycle, just lots of tiny cleanups,
  overall about 3000 lines removed, so the cleanups were worth it.

  Included in here are:

   - loads of rtl8723bs driver cleanups

   - lots of rtl8192e driver cleanups

   - vc04_services reworks and cleanups as that codebase gets slowly
     evolved into something that will make it into the "real" part of
     the kernel hopefully soon.

   - other tiny staging driver cleanups

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'staging-6.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (124 commits)
  staging: rtl8723bs: Remove constant result function CheckNegative()
  staging: rtl8723bs: Remove unused macros in rtw_mlme_ext.h
  staging: rtl8723bs: Remove unused macros in hal_pwr_seq.h
  staging: rtl8723bs: Remove unused macros in rtw_efuse.h
  staging: rtl8723bs: Remove unused macros in rtw_mlme.h
  staging: rtl8723bs: Remove unused macros in HalPwrSeqCmd.h
  staging: rtl8723bs: Remove unused macros in Hal8723BReg.h
  staging: rtl8723bs: Remove unused macros in Hal8192CPhyReg.h
  staging: rtl8723bs: Delete file hal_phy_reg_8723b.h
  staging: rtl8723bs: Move last macro from hal_phy_reg_8723b.h
  staging: rtl8723bs: Remove unused macros in hal_phy_reg_8723b.h
  staging: rtl8723bs: Remove unused macros in hal_com_reg.h
  staging: rtl8723bs: Remove unused macros in rtw_ht.h
  staging: rtl8723bs: Remove unused macros in hal_com_h2c.h
  staging: vc04_services: vchiq_core: Stop kthreads on vchiq module unload
  staging: vchiq_core: Bubble up wait_event_interruptible() return value
  staging: nvec: Use x instead of x != NULL to improve readability.
  staging: rtl8192e: Fix conflicting types error with net_device.
  staging: rtl8723bs: Remove unused variable pwdev_priv
  staging: vc04_services: Update testing instructions
  ...
parents 04d17331 104e0047
...@@ -1276,4 +1276,5 @@ void fbtft_remove_common(struct device *dev, struct fb_info *info) ...@@ -1276,4 +1276,5 @@ void fbtft_remove_common(struct device *dev, struct fb_info *info)
} }
EXPORT_SYMBOL(fbtft_remove_common); EXPORT_SYMBOL(fbtft_remove_common);
MODULE_DESCRIPTION("Core FB support for small TFT LCD display modules");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -182,5 +182,6 @@ static void __exit manager_exit(void) ...@@ -182,5 +182,6 @@ static void __exit manager_exit(void)
module_init(manager_init); module_init(manager_init);
module_exit(manager_exit); module_exit(manager_exit);
MODULE_DESCRIPTION("Greybus audio operations manager");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Svetlin Ankov <ankov_svetlin@projectara.com>"); MODULE_AUTHOR("Svetlin Ankov <ankov_svetlin@projectara.com>");
...@@ -10,12 +10,6 @@ ...@@ -10,12 +10,6 @@
#define GBAUDIO_INVALID_ID 0xFF #define GBAUDIO_INVALID_ID 0xFF
/* mixer control */
struct gb_mixer_control {
int min, max;
unsigned int reg, rreg, shift, rshift, invert;
};
struct gbaudio_ctl_pvt { struct gbaudio_ctl_pvt {
unsigned int ctl_id; unsigned int ctl_id;
unsigned int data_cport; unsigned int data_cport;
......
...@@ -522,4 +522,5 @@ static struct greybus_driver gb_bootrom_driver = { ...@@ -522,4 +522,5 @@ static struct greybus_driver gb_bootrom_driver = {
module_greybus_driver(gb_bootrom_driver); module_greybus_driver(gb_bootrom_driver);
MODULE_DESCRIPTION("BOOTROM Greybus driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -1374,4 +1374,5 @@ static struct greybus_driver gb_camera_driver = { ...@@ -1374,4 +1374,5 @@ static struct greybus_driver gb_camera_driver = {
module_greybus_driver(gb_camera_driver); module_greybus_driver(gb_camera_driver);
MODULE_DESCRIPTION("Greybus Camera protocol driver.");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -354,4 +354,5 @@ static void __exit gbphy_exit(void) ...@@ -354,4 +354,5 @@ static void __exit gbphy_exit(void)
} }
module_exit(gbphy_exit); module_exit(gbphy_exit);
MODULE_DESCRIPTION("Greybus Bridged-Phy Bus driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -631,4 +631,5 @@ static struct gbphy_driver gpio_driver = { ...@@ -631,4 +631,5 @@ static struct gbphy_driver gpio_driver = {
}; };
module_gbphy_driver(gpio_driver); module_gbphy_driver(gpio_driver);
MODULE_DESCRIPTION("GPIO Greybus driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -516,4 +516,5 @@ static struct greybus_driver gb_hid_driver = { ...@@ -516,4 +516,5 @@ static struct greybus_driver gb_hid_driver = {
}; };
module_greybus_driver(gb_hid_driver); module_greybus_driver(gb_hid_driver);
MODULE_DESCRIPTION("HID class driver for the Greybus");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -318,4 +318,5 @@ static struct gbphy_driver i2c_driver = { ...@@ -318,4 +318,5 @@ static struct gbphy_driver i2c_driver = {
}; };
module_gbphy_driver(i2c_driver); module_gbphy_driver(i2c_driver);
MODULE_DESCRIPTION("I2C bridge driver for the Greybus 'generic' I2C module");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -1339,4 +1339,5 @@ static struct greybus_driver gb_lights_driver = { ...@@ -1339,4 +1339,5 @@ static struct greybus_driver gb_lights_driver = {
}; };
module_greybus_driver(gb_lights_driver); module_greybus_driver(gb_lights_driver);
MODULE_DESCRIPTION("Greybus Lights protocol driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -129,4 +129,5 @@ static struct greybus_driver gb_log_driver = { ...@@ -129,4 +129,5 @@ static struct greybus_driver gb_log_driver = {
}; };
module_greybus_driver(gb_log_driver); module_greybus_driver(gb_log_driver);
MODULE_DESCRIPTION("Greybus driver for the log protocol");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -1175,4 +1175,5 @@ static void __exit loopback_exit(void) ...@@ -1175,4 +1175,5 @@ static void __exit loopback_exit(void)
} }
module_exit(loopback_exit); module_exit(loopback_exit);
MODULE_DESCRIPTION("Loopback bridge driver for the Greybus loopback module");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -1136,4 +1136,5 @@ static struct greybus_driver gb_power_supply_driver = { ...@@ -1136,4 +1136,5 @@ static struct greybus_driver gb_power_supply_driver = {
}; };
module_greybus_driver(gb_power_supply_driver); module_greybus_driver(gb_power_supply_driver);
MODULE_DESCRIPTION("Power Supply driver for a Greybus module");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -327,4 +327,5 @@ static struct gbphy_driver pwm_driver = { ...@@ -327,4 +327,5 @@ static struct gbphy_driver pwm_driver = {
}; };
module_gbphy_driver(pwm_driver); module_gbphy_driver(pwm_driver);
MODULE_DESCRIPTION("PWM Greybus driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -377,4 +377,5 @@ static void __exit raw_exit(void) ...@@ -377,4 +377,5 @@ static void __exit raw_exit(void)
} }
module_exit(raw_exit); module_exit(raw_exit);
MODULE_DESCRIPTION("Greybus driver for the Raw protocol");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -880,4 +880,5 @@ static struct gbphy_driver sdio_driver = { ...@@ -880,4 +880,5 @@ static struct gbphy_driver sdio_driver = {
}; };
module_gbphy_driver(sdio_driver); module_gbphy_driver(sdio_driver);
MODULE_DESCRIPTION("SD/MMC Greybus driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -75,4 +75,5 @@ static struct gbphy_driver spi_driver = { ...@@ -75,4 +75,5 @@ static struct gbphy_driver spi_driver = {
}; };
module_gbphy_driver(spi_driver); module_gbphy_driver(spi_driver);
MODULE_DESCRIPTION("Greybus SPI bridge PHY driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -567,4 +567,5 @@ void gb_spilib_master_exit(struct gb_connection *connection) ...@@ -567,4 +567,5 @@ void gb_spilib_master_exit(struct gb_connection *connection)
} }
EXPORT_SYMBOL_GPL(gb_spilib_master_exit); EXPORT_SYMBOL_GPL(gb_spilib_master_exit);
MODULE_DESCRIPTION("Greybus SPI library");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -1024,4 +1024,5 @@ static void gb_uart_driver_exit(void) ...@@ -1024,4 +1024,5 @@ static void gb_uart_driver_exit(void)
} }
module_exit(gb_uart_driver_exit); module_exit(gb_uart_driver_exit);
MODULE_DESCRIPTION("UART driver for the Greybus 'generic' UART module");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -242,4 +242,5 @@ static struct gbphy_driver usb_driver = { ...@@ -242,4 +242,5 @@ static struct gbphy_driver usb_driver = {
}; };
module_gbphy_driver(usb_driver); module_gbphy_driver(usb_driver);
MODULE_DESCRIPTION("USB host driver for the Greybus 'generic' USB module");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -245,4 +245,5 @@ static __exit void gb_vibrator_exit(void) ...@@ -245,4 +245,5 @@ static __exit void gb_vibrator_exit(void)
} }
module_exit(gb_vibrator_exit); module_exit(gb_vibrator_exit);
MODULE_DESCRIPTION("Greybus Vibrator protocol driver");
MODULE_LICENSE("GPL v2"); MODULE_LICENSE("GPL v2");
...@@ -300,7 +300,7 @@ int nvec_write_sync(struct nvec_chip *nvec, ...@@ -300,7 +300,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
{ {
mutex_lock(&nvec->sync_write_mutex); mutex_lock(&nvec->sync_write_mutex);
if (msg != NULL) if (msg)
*msg = NULL; *msg = NULL;
nvec->sync_write_pending = (data[1] << 8) + data[0]; nvec->sync_write_pending = (data[1] << 8) + data[0];
...@@ -322,7 +322,7 @@ int nvec_write_sync(struct nvec_chip *nvec, ...@@ -322,7 +322,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
dev_dbg(nvec->dev, "nvec_sync_write: pong!\n"); dev_dbg(nvec->dev, "nvec_sync_write: pong!\n");
if (msg != NULL) if (msg)
*msg = nvec->last_sync_msg; *msg = nvec->last_sync_msg;
else else
nvec_msg_free(nvec, nvec->last_sync_msg); nvec_msg_free(nvec, nvec->last_sync_msg);
...@@ -570,6 +570,22 @@ static void nvec_tx_set(struct nvec_chip *nvec) ...@@ -570,6 +570,22 @@ static void nvec_tx_set(struct nvec_chip *nvec)
(uint)nvec->tx->size, nvec->tx->data[1]); (uint)nvec->tx->size, nvec->tx->data[1]);
} }
/**
* tegra_i2c_writel - safely write to an I2C client controller register
* @val: value to be written
* @reg: register to write to
*
* A write to an I2C controller register needs to be read back to make sure
* that the value has arrived.
*/
static void tegra_i2c_writel(u32 val, void *reg)
{
writel_relaxed(val, reg);
/* read back register to make sure that register writes completed */
readl_relaxed(reg);
}
/** /**
* nvec_interrupt - Interrupt handler * nvec_interrupt - Interrupt handler
* @irq: The IRQ * @irq: The IRQ
...@@ -604,7 +620,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) ...@@ -604,7 +620,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
if ((status & RNW) == 0) { if ((status & RNW) == 0) {
received = readl(nvec->base + I2C_SL_RCVD); received = readl(nvec->base + I2C_SL_RCVD);
if (status & RCVD) if (status & RCVD)
writel(0, nvec->base + I2C_SL_RCVD); tegra_i2c_writel(0, nvec->base + I2C_SL_RCVD);
} }
if (status == (I2C_SL_IRQ | RCVD)) if (status == (I2C_SL_IRQ | RCVD))
...@@ -696,7 +712,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) ...@@ -696,7 +712,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
/* Send data if requested, but not on end of transmission */ /* Send data if requested, but not on end of transmission */
if ((status & (RNW | END_TRANS)) == RNW) if ((status & (RNW | END_TRANS)) == RNW)
writel(to_send, nvec->base + I2C_SL_RCVD); tegra_i2c_writel(to_send, nvec->base + I2C_SL_RCVD);
/* If we have send the first byte */ /* If we have send the first byte */
if (status == (I2C_SL_IRQ | RNW | RCVD)) if (status == (I2C_SL_IRQ | RNW | RCVD))
...@@ -713,15 +729,6 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) ...@@ -713,15 +729,6 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
status & RCVD ? " RCVD" : "", status & RCVD ? " RCVD" : "",
status & RNW ? " RNW" : ""); status & RNW ? " RNW" : "");
/*
* TODO: replace the udelay with a read back after each writel above
* in order to work around a hardware issue, see i2c-tegra.c
*
* Unfortunately, this change causes an initialisation issue with the
* touchpad, which needs to be fixed first.
*/
udelay(100);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -737,15 +744,15 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec) ...@@ -737,15 +744,15 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
val = I2C_CNFG_NEW_MASTER_SFM | I2C_CNFG_PACKET_MODE_EN | val = I2C_CNFG_NEW_MASTER_SFM | I2C_CNFG_PACKET_MODE_EN |
(0x2 << I2C_CNFG_DEBOUNCE_CNT_SHIFT); (0x2 << I2C_CNFG_DEBOUNCE_CNT_SHIFT);
writel(val, nvec->base + I2C_CNFG); tegra_i2c_writel(val, nvec->base + I2C_CNFG);
clk_set_rate(nvec->i2c_clk, 8 * 80000); clk_set_rate(nvec->i2c_clk, 8 * 80000);
writel(I2C_SL_NEWSL, nvec->base + I2C_SL_CNFG); tegra_i2c_writel(I2C_SL_NEWSL, nvec->base + I2C_SL_CNFG);
writel(0x1E, nvec->base + I2C_SL_DELAY_COUNT); tegra_i2c_writel(0x1E, nvec->base + I2C_SL_DELAY_COUNT);
writel(nvec->i2c_addr >> 1, nvec->base + I2C_SL_ADDR1); tegra_i2c_writel(nvec->i2c_addr >> 1, nvec->base + I2C_SL_ADDR1);
writel(0, nvec->base + I2C_SL_ADDR2); tegra_i2c_writel(0, nvec->base + I2C_SL_ADDR2);
enable_irq(nvec->irq); enable_irq(nvec->irq);
} }
...@@ -754,7 +761,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec) ...@@ -754,7 +761,7 @@ static void tegra_init_i2c_slave(struct nvec_chip *nvec)
static void nvec_disable_i2c_slave(struct nvec_chip *nvec) static void nvec_disable_i2c_slave(struct nvec_chip *nvec)
{ {
disable_irq(nvec->irq); disable_irq(nvec->irq);
writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG); tegra_i2c_writel(I2C_SL_NEWSL | I2C_SL_NACK, nvec->base + I2C_SL_CNFG);
clk_disable_unprepare(nvec->i2c_clk); clk_disable_unprepare(nvec->i2c_clk);
} }
#endif #endif
......
...@@ -88,9 +88,7 @@ enum version_8190_loopback { ...@@ -88,9 +88,7 @@ enum version_8190_loopback {
VERSION_8190_BE VERSION_8190_BE
}; };
#define IC_VersionCut_C 0x2
#define IC_VersionCut_D 0x3 #define IC_VersionCut_D 0x3
#define IC_VersionCut_E 0x4
enum rf_optype { enum rf_optype {
RF_OP_By_SW_3wire = 0, RF_OP_By_SW_3wire = 0,
...@@ -138,13 +136,6 @@ struct tx_fwinfo_8190pci { ...@@ -138,13 +136,6 @@ struct tx_fwinfo_8190pci {
u32 PacketID:13; u32 PacketID:13;
}; };
struct phy_ofdm_rx_status_rxsc_sgien_exintfflag {
u8 reserved:4;
u8 rxsc:2;
u8 sgi_en:1;
u8 ex_intf_flag:1;
};
struct phy_sts_ofdm_819xpci { struct phy_sts_ofdm_819xpci {
u8 trsw_gain_X[4]; u8 trsw_gain_X[4];
u8 pwdb_all; u8 pwdb_all;
......
...@@ -859,8 +859,8 @@ static u8 _rtl92e_query_is_short(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc) ...@@ -859,8 +859,8 @@ static u8 _rtl92e_query_is_short(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc)
{ {
u8 tmp_Short; u8 tmp_Short;
tmp_Short = (TxHT == 1) ? ((tcb_desc->bUseShortGI) ? 1 : 0) : tmp_Short = (TxHT == 1) ? ((tcb_desc->use_short_gi) ? 1 : 0) :
((tcb_desc->bUseShortPreamble) ? 1 : 0); ((tcb_desc->use_short_preamble) ? 1 : 0);
if (TxHT == 1 && TxRate != DESC90_RATEMCS15) if (TxHT == 1 && TxRate != DESC90_RATEMCS15)
tmp_Short = 0; tmp_Short = 0;
...@@ -892,18 +892,18 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, ...@@ -892,18 +892,18 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
pTxFwInfo->RxAMD = 0; pTxFwInfo->RxAMD = 0;
} }
pTxFwInfo->RtsEnable = (cb_desc->bRTSEnable) ? 1 : 0; pTxFwInfo->RtsEnable = (cb_desc->rts_enable) ? 1 : 0;
pTxFwInfo->CtsEnable = (cb_desc->bCTSEnable) ? 1 : 0; pTxFwInfo->CtsEnable = (cb_desc->cts_enable) ? 1 : 0;
pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ? 1 : 0; pTxFwInfo->RtsSTBC = (cb_desc->rtsstbc) ? 1 : 0;
pTxFwInfo->RtsHT = (cb_desc->rts_rate & 0x80) ? 1 : 0; pTxFwInfo->RtsHT = (cb_desc->rts_rate & 0x80) ? 1 : 0;
pTxFwInfo->RtsRate = _rtl92e_rate_mgn_to_hw(cb_desc->rts_rate); pTxFwInfo->RtsRate = _rtl92e_rate_mgn_to_hw(cb_desc->rts_rate);
pTxFwInfo->RtsBandwidth = 0; pTxFwInfo->RtsBandwidth = 0;
pTxFwInfo->RtsSubcarrier = cb_desc->RTSSC; pTxFwInfo->RtsSubcarrier = cb_desc->RTSSC;
pTxFwInfo->RtsShort = (pTxFwInfo->RtsHT == 0) ? pTxFwInfo->RtsShort = (pTxFwInfo->RtsHT == 0) ?
(cb_desc->rts_use_short_preamble ? 1 : 0) : (cb_desc->rts_use_short_preamble ? 1 : 0) :
(cb_desc->bRTSUseShortGI ? 1 : 0); (cb_desc->rts_use_short_gi ? 1 : 0);
if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20_40) { if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20_40) {
if (cb_desc->bPacketBW) { if (cb_desc->packet_bw) {
pTxFwInfo->TxBandwidth = 1; pTxFwInfo->TxBandwidth = 1;
pTxFwInfo->TxSubCarrier = 0; pTxFwInfo->TxSubCarrier = 0;
} else { } else {
...@@ -934,7 +934,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, ...@@ -934,7 +934,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc,
pdesc->NoEnc = 1; pdesc->NoEnc = 1;
pdesc->SecType = 0x0; pdesc->SecType = 0x0;
if (cb_desc->bHwSec) { if (cb_desc->hw_sec) {
static u8 tmp; static u8 tmp;
if (!tmp) if (!tmp)
...@@ -1640,13 +1640,12 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, ...@@ -1640,13 +1640,12 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
if (stats->Length < 24) if (stats->Length < 24)
stats->bHwError |= 1; stats->bHwError |= 1;
if (stats->bHwError) { if (stats->bHwError)
return false; return false;
}
stats->RxDrvInfoSize = pdesc->RxDrvInfoSize; stats->RxDrvInfoSize = pdesc->RxDrvInfoSize;
stats->RxBufShift = (pdesc->Shift) & 0x03; stats->RxBufShift = (pdesc->Shift) & 0x03;
stats->Decrypted = !pdesc->SWDec; stats->decrypted = !pdesc->SWDec;
pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift); pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift);
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#define _RTL_CAM_H #define _RTL_CAM_H
#include <linux/types.h> #include <linux/types.h>
struct net_device; struct net_device;
void rtl92e_cam_reset(struct net_device *dev); void rtl92e_cam_reset(struct net_device *dev);
......
...@@ -951,10 +951,10 @@ static void _rtl92e_watchdog_wq_cb(void *data) ...@@ -951,10 +951,10 @@ static void _rtl92e_watchdog_wq_cb(void *data)
return; return;
if (priv->rtllib->link_state >= MAC80211_LINKED) { if (priv->rtllib->link_state >= MAC80211_LINKED) {
if (priv->rtllib->CntAfterLink < 2) if (priv->rtllib->cnt_after_link < 2)
priv->rtllib->CntAfterLink++; priv->rtllib->cnt_after_link++;
} else { } else {
priv->rtllib->CntAfterLink = 0; priv->rtllib->cnt_after_link = 0;
} }
rtl92e_dm_watchdog(dev); rtl92e_dm_watchdog(dev);
......
...@@ -377,7 +377,7 @@ static void _rtl92e_dm_init_bandwidth_autoswitch(struct net_device *dev) ...@@ -377,7 +377,7 @@ static void _rtl92e_dm_init_bandwidth_autoswitch(struct net_device *dev)
priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz = BW_AUTO_SWITCH_LOW_HIGH; priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz = BW_AUTO_SWITCH_LOW_HIGH;
priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz = BW_AUTO_SWITCH_HIGH_LOW; priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz = BW_AUTO_SWITCH_HIGH_LOW;
priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false; priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = false;
priv->rtllib->bandwidth_auto_switch.bautoswitch_enable = false; priv->rtllib->bandwidth_auto_switch.bautoswitch_enable = false;
} }
...@@ -388,14 +388,14 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev) ...@@ -388,14 +388,14 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev)
if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20 || if (priv->current_chnl_bw == HT_CHANNEL_WIDTH_20 ||
!priv->rtllib->bandwidth_auto_switch.bautoswitch_enable) !priv->rtllib->bandwidth_auto_switch.bautoswitch_enable)
return; return;
if (!priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz) { if (!priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz) {
if (priv->undecorated_smoothed_pwdb <= if (priv->undecorated_smoothed_pwdb <=
priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz) priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz)
priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = true; priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = true;
} else { } else {
if (priv->undecorated_smoothed_pwdb >= if (priv->undecorated_smoothed_pwdb >=
priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz) priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz)
priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false; priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = false;
} }
} }
...@@ -1335,51 +1335,52 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) ...@@ -1335,51 +1335,52 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev)
for (i = 0; i < RF90_PATH_MAX; i++) { for (i = 0; i < RF90_PATH_MAX; i++) {
dm_rx_path_sel_table.rf_rssi[i] = priv->stats.rx_rssi_percentage[i]; dm_rx_path_sel_table.rf_rssi[i] = priv->stats.rx_rssi_percentage[i];
if (priv->brfpath_rxenable[i]) { if (!priv->brfpath_rxenable[i])
rf_num++; continue;
cur_rf_rssi = dm_rx_path_sel_table.rf_rssi[i];
if (rf_num == 1) { rf_num++;
max_rssi_index = min_rssi_index = sec_rssi_index = i; cur_rf_rssi = dm_rx_path_sel_table.rf_rssi[i];
tmp_max_rssi = tmp_min_rssi = tmp_sec_rssi = cur_rf_rssi;
} else if (rf_num == 2) { if (rf_num == 1) {
if (cur_rf_rssi >= tmp_max_rssi) { max_rssi_index = min_rssi_index = sec_rssi_index = i;
tmp_max_rssi = cur_rf_rssi; tmp_max_rssi = tmp_min_rssi = tmp_sec_rssi = cur_rf_rssi;
max_rssi_index = i; } else if (rf_num == 2) {
} else { if (cur_rf_rssi >= tmp_max_rssi) {
tmp_sec_rssi = tmp_min_rssi = cur_rf_rssi; tmp_max_rssi = cur_rf_rssi;
sec_rssi_index = min_rssi_index = i; max_rssi_index = i;
}
} else { } else {
if (cur_rf_rssi > tmp_max_rssi) { tmp_sec_rssi = tmp_min_rssi = cur_rf_rssi;
tmp_sec_rssi = tmp_max_rssi; sec_rssi_index = min_rssi_index = i;
sec_rssi_index = max_rssi_index; }
tmp_max_rssi = cur_rf_rssi; } else {
max_rssi_index = i; if (cur_rf_rssi > tmp_max_rssi) {
} else if (cur_rf_rssi == tmp_max_rssi) { tmp_sec_rssi = tmp_max_rssi;
tmp_sec_rssi = cur_rf_rssi; sec_rssi_index = max_rssi_index;
sec_rssi_index = i; tmp_max_rssi = cur_rf_rssi;
} else if ((cur_rf_rssi < tmp_max_rssi) && max_rssi_index = i;
(cur_rf_rssi > tmp_sec_rssi)) { } else if (cur_rf_rssi == tmp_max_rssi) {
tmp_sec_rssi = cur_rf_rssi;
sec_rssi_index = i;
} else if ((cur_rf_rssi < tmp_max_rssi) &&
(cur_rf_rssi > tmp_sec_rssi)) {
tmp_sec_rssi = cur_rf_rssi;
sec_rssi_index = i;
} else if (cur_rf_rssi == tmp_sec_rssi) {
if (tmp_sec_rssi == tmp_min_rssi) {
tmp_sec_rssi = cur_rf_rssi; tmp_sec_rssi = cur_rf_rssi;
sec_rssi_index = i; sec_rssi_index = i;
} else if (cur_rf_rssi == tmp_sec_rssi) { }
if (tmp_sec_rssi == tmp_min_rssi) { } else if ((cur_rf_rssi < tmp_sec_rssi) &&
tmp_sec_rssi = cur_rf_rssi; (cur_rf_rssi > tmp_min_rssi)) {
sec_rssi_index = i; ;
} } else if (cur_rf_rssi == tmp_min_rssi) {
} else if ((cur_rf_rssi < tmp_sec_rssi) && if (tmp_sec_rssi == tmp_min_rssi) {
(cur_rf_rssi > tmp_min_rssi)) {
;
} else if (cur_rf_rssi == tmp_min_rssi) {
if (tmp_sec_rssi == tmp_min_rssi) {
tmp_min_rssi = cur_rf_rssi;
min_rssi_index = i;
}
} else if (cur_rf_rssi < tmp_min_rssi) {
tmp_min_rssi = cur_rf_rssi; tmp_min_rssi = cur_rf_rssi;
min_rssi_index = i; min_rssi_index = i;
} }
} else if (cur_rf_rssi < tmp_min_rssi) {
tmp_min_rssi = cur_rf_rssi;
min_rssi_index = i;
} }
} }
} }
...@@ -1387,59 +1388,52 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev) ...@@ -1387,59 +1388,52 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev)
rf_num = 0; rf_num = 0;
if (dm_rx_path_sel_table.cck_method == CCK_Rx_Version_2) { if (dm_rx_path_sel_table.cck_method == CCK_Rx_Version_2) {
for (i = 0; i < RF90_PATH_MAX; i++) { for (i = 0; i < RF90_PATH_MAX; i++) {
if (priv->brfpath_rxenable[i]) { if (!priv->brfpath_rxenable[i])
rf_num++; continue;
cur_cck_pwdb =
dm_rx_path_sel_table.cck_pwdb_sta[i];
if (rf_num == 1) { rf_num++;
cur_cck_pwdb = dm_rx_path_sel_table.cck_pwdb_sta[i];
if (rf_num == 1) {
cck_rx_ver2_max_index = i;
cck_rx_ver2_sec_index = i;
tmp_cck_max_pwdb = cur_cck_pwdb;
tmp_cck_min_pwdb = cur_cck_pwdb;
tmp_cck_sec_pwdb = cur_cck_pwdb;
} else if (rf_num == 2) {
if (cur_cck_pwdb >= tmp_cck_max_pwdb) {
tmp_cck_max_pwdb = cur_cck_pwdb;
cck_rx_ver2_max_index = i; cck_rx_ver2_max_index = i;
} else {
tmp_cck_sec_pwdb = cur_cck_pwdb;
tmp_cck_min_pwdb = cur_cck_pwdb;
cck_rx_ver2_sec_index = i; cck_rx_ver2_sec_index = i;
}
} else {
if (cur_cck_pwdb > tmp_cck_max_pwdb) {
tmp_cck_sec_pwdb = tmp_cck_max_pwdb;
cck_rx_ver2_sec_index = cck_rx_ver2_max_index;
tmp_cck_max_pwdb = cur_cck_pwdb; tmp_cck_max_pwdb = cur_cck_pwdb;
tmp_cck_min_pwdb = cur_cck_pwdb; cck_rx_ver2_max_index = i;
} else if (cur_cck_pwdb == tmp_cck_max_pwdb) {
tmp_cck_sec_pwdb = cur_cck_pwdb; tmp_cck_sec_pwdb = cur_cck_pwdb;
} else if (rf_num == 2) { cck_rx_ver2_sec_index = i;
if (cur_cck_pwdb >= tmp_cck_max_pwdb) { } else if (PWDB_IN_RANGE) {
tmp_cck_max_pwdb = cur_cck_pwdb; tmp_cck_sec_pwdb = cur_cck_pwdb;
cck_rx_ver2_max_index = i; cck_rx_ver2_sec_index = i;
} else { } else if (cur_cck_pwdb == tmp_cck_sec_pwdb) {
if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb) {
tmp_cck_sec_pwdb = cur_cck_pwdb; tmp_cck_sec_pwdb = cur_cck_pwdb;
tmp_cck_min_pwdb = cur_cck_pwdb;
cck_rx_ver2_sec_index = i; cck_rx_ver2_sec_index = i;
} }
} else { } else if ((cur_cck_pwdb < tmp_cck_sec_pwdb) &&
if (cur_cck_pwdb > tmp_cck_max_pwdb) { (cur_cck_pwdb > tmp_cck_min_pwdb)) {
tmp_cck_sec_pwdb = ;
tmp_cck_max_pwdb; } else if (cur_cck_pwdb == tmp_cck_min_pwdb) {
cck_rx_ver2_sec_index = if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb)
cck_rx_ver2_max_index;
tmp_cck_max_pwdb = cur_cck_pwdb;
cck_rx_ver2_max_index = i;
} else if (cur_cck_pwdb ==
tmp_cck_max_pwdb) {
tmp_cck_sec_pwdb = cur_cck_pwdb;
cck_rx_ver2_sec_index = i;
} else if (PWDB_IN_RANGE) {
tmp_cck_sec_pwdb = cur_cck_pwdb;
cck_rx_ver2_sec_index = i;
} else if (cur_cck_pwdb ==
tmp_cck_sec_pwdb) {
if (tmp_cck_sec_pwdb ==
tmp_cck_min_pwdb) {
tmp_cck_sec_pwdb =
cur_cck_pwdb;
cck_rx_ver2_sec_index =
i;
}
} else if ((cur_cck_pwdb < tmp_cck_sec_pwdb) &&
(cur_cck_pwdb > tmp_cck_min_pwdb)) {
;
} else if (cur_cck_pwdb == tmp_cck_min_pwdb) {
if (tmp_cck_sec_pwdb == tmp_cck_min_pwdb)
tmp_cck_min_pwdb = cur_cck_pwdb;
} else if (cur_cck_pwdb < tmp_cck_min_pwdb) {
tmp_cck_min_pwdb = cur_cck_pwdb; tmp_cck_min_pwdb = cur_cck_pwdb;
} } else if (cur_cck_pwdb < tmp_cck_min_pwdb) {
tmp_cck_min_pwdb = cur_cck_pwdb;
} }
} }
} }
...@@ -1758,7 +1752,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) ...@@ -1758,7 +1752,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev)
if (priv->rtllib->link_state == MAC80211_LINKED) { if (priv->rtllib->link_state == MAC80211_LINKED) {
if (priv->undecorated_smoothed_pwdb <= if (priv->undecorated_smoothed_pwdb <=
RegC38_TH) { REG_C38_TH) {
if (reg_c38_State != if (reg_c38_State !=
RegC38_NonFsync_Other_AP) { RegC38_NonFsync_Other_AP) {
rtl92e_writeb(dev, rtl92e_writeb(dev,
...@@ -1769,7 +1763,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) ...@@ -1769,7 +1763,7 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev)
RegC38_NonFsync_Other_AP; RegC38_NonFsync_Other_AP;
} }
} else if (priv->undecorated_smoothed_pwdb >= } else if (priv->undecorated_smoothed_pwdb >=
(RegC38_TH + 5)) { (REG_C38_TH + 5)) {
if (reg_c38_State) { if (reg_c38_State) {
rtl92e_writeb(dev, rtl92e_writeb(dev,
rOFDM0_RxDetector3, rOFDM0_RxDetector3,
......
...@@ -33,8 +33,6 @@ ...@@ -33,8 +33,6 @@
#define RATE_ADAPTIVE_TH_LOW_40M 10 #define RATE_ADAPTIVE_TH_LOW_40M 10
#define VERY_LOW_RSSI 15 #define VERY_LOW_RSSI 15
#define WA_IOT_TH_VAL 25
#define E_FOR_TX_POWER_TRACK 300 #define E_FOR_TX_POWER_TRACK 300
#define TX_POWER_NEAR_FIELD_THRESH_HIGH 68 #define TX_POWER_NEAR_FIELD_THRESH_HIGH 68
#define TX_POWER_NEAR_FIELD_THRESH_LOW 62 #define TX_POWER_NEAR_FIELD_THRESH_LOW 62
...@@ -44,7 +42,7 @@ ...@@ -44,7 +42,7 @@
#define CURRENT_TX_RATE_REG 0x1e0 #define CURRENT_TX_RATE_REG 0x1e0
#define INITIAL_TX_RATE_REG 0x1e1 #define INITIAL_TX_RATE_REG 0x1e1
#define TX_RETRY_COUNT_REG 0x1ac #define TX_RETRY_COUNT_REG 0x1ac
#define RegC38_TH 20 #define REG_C38_TH 20
/*--------------------------Define Parameters-------------------------------*/ /*--------------------------Define Parameters-------------------------------*/
...@@ -135,8 +133,6 @@ extern struct dig_t dm_digtable; ...@@ -135,8 +133,6 @@ extern struct dig_t dm_digtable;
extern const u32 dm_tx_bb_gain[TX_BB_GAIN_TABLE_LEN]; extern const u32 dm_tx_bb_gain[TX_BB_GAIN_TABLE_LEN];
extern const u8 dm_cck_tx_bb_gain[CCK_TX_BB_GAIN_TABLE_LEN][8]; extern const u8 dm_cck_tx_bb_gain[CCK_TX_BB_GAIN_TABLE_LEN][8];
extern const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8]; extern const u8 dm_cck_tx_bb_gain_ch14[CCK_TX_BB_GAIN_TABLE_LEN][8];
/* Maps table index to iq amplify gain (dB, 12 to -24dB) */
#define dm_tx_bb_gain_idx_to_amplify(idx) (-idx + 12)
/*------------------------Export global variable----------------------------*/ /*------------------------Export global variable----------------------------*/
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/pci.h> #include <linux/pci.h>
struct net_device; struct net_device;
bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev); bool rtl92e_check_adapter(struct pci_dev *pdev, struct net_device *dev);
#endif #endif
...@@ -241,7 +241,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, ...@@ -241,7 +241,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
(ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED)) (ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED))
return 0; return 0;
if ((priv->rtllib->link_state == MAC80211_LINKED) && if ((priv->rtllib->link_state == MAC80211_LINKED) &&
(priv->rtllib->CntAfterLink < 2)) (priv->rtllib->cnt_after_link < 2))
return 0; return 0;
} }
......
...@@ -496,7 +496,7 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee) ...@@ -496,7 +496,7 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee)
ieee->HTHighestOperaRate = ht_get_highest_mcs_rate(ieee, ieee->HTHighestOperaRate = ht_get_highest_mcs_rate(ieee,
ieee->dot11ht_oper_rate_set, ieee->dot11ht_oper_rate_set,
pMcsFilter); pMcsFilter);
ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate; ieee->ht_curr_op_rate = ieee->HTHighestOperaRate;
ht_info->current_op_mode = pPeerHTInfo->opt_mode; ht_info->current_op_mode = pPeerHTInfo->opt_mode;
} }
...@@ -625,7 +625,7 @@ EXPORT_SYMBOL(HT_update_self_and_peer_setting); ...@@ -625,7 +625,7 @@ EXPORT_SYMBOL(HT_update_self_and_peer_setting);
u8 ht_c_check(struct rtllib_device *ieee, u8 *pFrame) u8 ht_c_check(struct rtllib_device *ieee, u8 *pFrame)
{ {
if (ieee->ht_info->current_ht_support) { if (ieee->ht_info->current_ht_support) {
if ((IsQoSDataFrame(pFrame) && frame_order(pFrame)) == 1) { if ((is_qos_data_frame(pFrame) && frame_order(pFrame)) == 1) {
netdev_dbg(ieee->dev, "HT CONTROL FILED EXIST!!\n"); netdev_dbg(ieee->dev, "HT CONTROL FILED EXIST!!\n");
return true; return true;
} }
......
...@@ -18,7 +18,7 @@ static void RxPktPendingTimeout(struct timer_list *t) ...@@ -18,7 +18,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
unsigned long flags = 0; unsigned long flags = 0;
u8 index = 0; u8 index = 0;
bool bPktInBuf = false; bool pkt_in_buf = false;
spin_lock_irqsave(&(ieee->reorder_spinlock), flags); spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
if (ts->rx_timeout_indicate_seq != 0xffff) { if (ts->rx_timeout_indicate_seq != 0xffff) {
...@@ -50,7 +50,7 @@ static void RxPktPendingTimeout(struct timer_list *t) ...@@ -50,7 +50,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
list_add_tail(&pReorderEntry->list, list_add_tail(&pReorderEntry->list,
&ieee->RxReorder_Unused_List); &ieee->RxReorder_Unused_List);
} else { } else {
bPktInBuf = true; pkt_in_buf = true;
break; break;
} }
} }
...@@ -68,10 +68,10 @@ static void RxPktPendingTimeout(struct timer_list *t) ...@@ -68,10 +68,10 @@ static void RxPktPendingTimeout(struct timer_list *t)
return; return;
} }
rtllib_indicate_packets(ieee, ieee->stats_IndicateArray, index); rtllib_indicate_packets(ieee, ieee->stats_IndicateArray, index);
bPktInBuf = false; pkt_in_buf = false;
} }
if (bPktInBuf && (ts->rx_timeout_indicate_seq == 0xffff)) { if (pkt_in_buf && (ts->rx_timeout_indicate_seq == 0xffff)) {
ts->rx_timeout_indicate_seq = ts->rx_indicate_seq; ts->rx_timeout_indicate_seq = ts->rx_indicate_seq;
mod_timer(&ts->rx_pkt_pending_timer, jiffies + mod_timer(&ts->rx_pkt_pending_timer, jiffies +
msecs_to_jiffies(ieee->ht_info->rx_reorder_pending_time) msecs_to_jiffies(ieee->ht_info->rx_reorder_pending_time)
...@@ -431,7 +431,7 @@ void remove_all_ts(struct rtllib_device *ieee) ...@@ -431,7 +431,7 @@ void remove_all_ts(struct rtllib_device *ieee)
} }
} }
void TsStartAddBaProcess(struct rtllib_device *ieee, struct tx_ts_record *pTxTS) void rtllib_ts_start_add_ba_process(struct rtllib_device *ieee, struct tx_ts_record *pTxTS)
{ {
if (pTxTS->add_ba_req_in_progress == false) { if (pTxTS->add_ba_req_in_progress == false) {
pTxTS->add_ba_req_in_progress = true; pTxTS->add_ba_req_in_progress = true;
......
...@@ -105,26 +105,26 @@ struct cb_desc { ...@@ -105,26 +105,26 @@ struct cb_desc {
u8 bCmdOrInit:1; u8 bCmdOrInit:1;
u8 tx_dis_rate_fallback:1; u8 tx_dis_rate_fallback:1;
u8 tx_use_drv_assinged_rate:1; u8 tx_use_drv_assinged_rate:1;
u8 bHwSec:1; u8 hw_sec:1;
u8 nStuckCount; u8 nStuckCount;
/* Tx Firmware Related flags (10-11)*/ /* Tx Firmware Related flags (10-11)*/
u8 bCTSEnable:1; u8 cts_enable:1;
u8 bRTSEnable:1; u8 rts_enable:1;
u8 bUseShortGI:1; u8 use_short_gi:1;
u8 bUseShortPreamble:1; u8 use_short_preamble:1;
u8 tx_enable_fw_calc_dur:1; u8 tx_enable_fw_calc_dur:1;
u8 ampdu_enable:1; u8 ampdu_enable:1;
u8 bRTSSTBC:1; u8 rtsstbc:1;
u8 RTSSC:1; u8 RTSSC:1;
u8 bRTSBW:1; u8 rts_bw:1;
u8 bPacketBW:1; u8 packet_bw:1;
u8 rts_use_short_preamble:1; u8 rts_use_short_preamble:1;
u8 bRTSUseShortGI:1; u8 rts_use_short_gi:1;
u8 multicast:1; u8 multicast:1;
u8 bBroadcast:1; u8 broadcast:1;
u8 drv_agg_enable:1; u8 drv_agg_enable:1;
u8 reserved2:1; u8 reserved2:1;
...@@ -338,9 +338,9 @@ enum rt_op_mode { ...@@ -338,9 +338,9 @@ enum rt_op_mode {
#define RTLLIB_QCTL_TID 0x000F #define RTLLIB_QCTL_TID 0x000F
#define FC_QOS_BIT BIT(7) #define FC_QOS_BIT BIT(7)
#define IsDataFrame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false) #define is_data_frame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
#define IsLegacyDataFrame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT))) #define is_legacy_data_frame(pdu) (is_data_frame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
#define IsQoSDataFrame(pframe) \ #define is_qos_data_frame(pframe) \
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \ ((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) (IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
#define frame_order(pframe) (*(u16 *)pframe&IEEE80211_FCTL_ORDER) #define frame_order(pframe) (*(u16 *)pframe&IEEE80211_FCTL_ORDER)
...@@ -481,7 +481,7 @@ struct rtllib_rx_stats { ...@@ -481,7 +481,7 @@ struct rtllib_rx_stats {
u16 bHwError:1; u16 bHwError:1;
u16 bCRC:1; u16 bCRC:1;
u16 bICV:1; u16 bICV:1;
u16 Decrypted:1; u16 decrypted:1;
u32 time_stamp_low; u32 time_stamp_low;
u32 time_stamp_high; u32 time_stamp_high;
...@@ -489,7 +489,7 @@ struct rtllib_rx_stats { ...@@ -489,7 +489,7 @@ struct rtllib_rx_stats {
u8 RxBufShift; u8 RxBufShift;
bool bIsAMPDU; bool bIsAMPDU;
bool bFirstMPDU; bool bFirstMPDU;
bool bContainHTC; bool contain_htc;
u32 RxPWDBAll; u32 RxPWDBAll;
u8 RxMIMOSignalStrength[4]; u8 RxMIMOSignalStrength[4];
s8 RxMIMOSignalQuality[2]; s8 RxMIMOSignalQuality[2];
...@@ -728,7 +728,7 @@ union frameqos { ...@@ -728,7 +728,7 @@ union frameqos {
#define QOS_VERSION_1 1 #define QOS_VERSION_1 1
struct rtllib_qos_information_element { struct rtllib_qos_information_element {
u8 elementID; u8 element_id;
u8 length; u8 length;
u8 qui[QOS_OUI_LEN]; u8 qui[QOS_OUI_LEN];
u8 qui_type; u8 qui_type;
...@@ -799,7 +799,7 @@ static inline const char *eap_get_type(int type) ...@@ -799,7 +799,7 @@ static inline const char *eap_get_type(int type)
eap_types[type]; eap_types[type];
} }
static inline u8 Frame_QoSTID(u8 *buf) static inline u8 frame_qos_tid(u8 *buf)
{ {
struct ieee80211_hdr_3addr *hdr; struct ieee80211_hdr_3addr *hdr;
u16 fc; u16 fc;
...@@ -910,14 +910,14 @@ struct rtllib_network { ...@@ -910,14 +910,14 @@ struct rtllib_network {
u8 hidden_ssid_len; u8 hidden_ssid_len;
struct rtllib_qos_data qos_data; struct rtllib_qos_data qos_data;
bool bWithAironetIE; bool with_aironet_ie;
bool ckip_supported; bool ckip_supported;
bool ccx_rm_enable; bool ccx_rm_enable;
u8 CcxRmState[2]; u8 ccx_rm_state[2];
bool bMBssidValid; bool mb_ssid_valid;
u8 MBssidMask; u8 mb_ssid_mask;
u8 MBssid[ETH_ALEN]; u8 mb_ssid[ETH_ALEN];
bool bWithCcxVerNum; bool with_ccx_ver_num;
u8 bss_ccx_ver_number; u8 bss_ccx_ver_number;
/* These are network statistics */ /* These are network statistics */
struct rtllib_rx_stats stats; struct rtllib_rx_stats stats;
...@@ -949,8 +949,8 @@ struct rtllib_network { ...@@ -949,8 +949,8 @@ struct rtllib_network {
u8 wmm_info; u8 wmm_info;
struct rtllib_wmm_ac_param wmm_param[4]; struct rtllib_wmm_ac_param wmm_param[4];
u8 turbo_enable; u8 turbo_enable;
u16 CountryIeLen; u16 country_ie_len;
u8 CountryIeBuf[MAX_IE_LEN]; u8 country_ie_buf[MAX_IE_LEN];
struct bss_ht bssht; struct bss_ht bssht;
bool broadcom_cap_exist; bool broadcom_cap_exist;
bool realtek_cap_exit; bool realtek_cap_exit;
...@@ -1018,7 +1018,7 @@ struct tx_pending { ...@@ -1018,7 +1018,7 @@ struct tx_pending {
struct bandwidth_autoswitch { struct bandwidth_autoswitch {
long threshold_20Mhzto40Mhz; long threshold_20Mhzto40Mhz;
long threshold_40Mhzto20Mhz; long threshold_40Mhzto20Mhz;
bool bforced_tx20Mhz; bool forced_tx_20MHz;
bool bautoswitch_enable; bool bautoswitch_enable;
}; };
...@@ -1168,7 +1168,7 @@ struct rtllib_device { ...@@ -1168,7 +1168,7 @@ struct rtllib_device {
bool disable_mgnt_queue; bool disable_mgnt_queue;
unsigned long status; unsigned long status;
u8 CntAfterLink; u8 cnt_after_link;
enum rt_op_mode op_mode; enum rt_op_mode op_mode;
...@@ -1198,7 +1198,7 @@ struct rtllib_device { ...@@ -1198,7 +1198,7 @@ struct rtllib_device {
u8 reg_dot11tx_ht_oper_rate_set[16]; u8 reg_dot11tx_ht_oper_rate_set[16];
u8 dot11ht_oper_rate_set[16]; u8 dot11ht_oper_rate_set[16];
u8 reg_ht_supp_rate_set[16]; u8 reg_ht_supp_rate_set[16];
u8 HTCurrentOperaRate; u8 ht_curr_op_rate;
u8 HTHighestOperaRate; u8 HTHighestOperaRate;
u8 tx_dis_rate_fallback; u8 tx_dis_rate_fallback;
u8 tx_use_drv_assinged_rate; u8 tx_use_drv_assinged_rate;
...@@ -1407,9 +1407,9 @@ struct rtllib_device { ...@@ -1407,9 +1407,9 @@ struct rtllib_device {
struct work_struct wx_sync_scan_wq; struct work_struct wx_sync_scan_wq;
union { union {
struct rtllib_rxb *RfdArray[REORDER_WIN_SIZE]; struct rtllib_rxb *rfd_array[REORDER_WIN_SIZE];
struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE]; struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE];
struct rtllib_rxb *prxbIndicateArray[REORDER_WIN_SIZE]; struct rtllib_rxb *prxb_indicate_array[REORDER_WIN_SIZE];
struct { struct {
struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT]; struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT];
struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT]; struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT];
...@@ -1770,7 +1770,7 @@ void rtllib_reset_ba_entry(struct ba_record *ba); ...@@ -1770,7 +1770,7 @@ void rtllib_reset_ba_entry(struct ba_record *ba);
bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *addr, bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *addr,
u8 TID, enum tr_select tx_rx_select, bool bAddNewTs); u8 TID, enum tr_select tx_rx_select, bool bAddNewTs);
void rtllib_ts_init(struct rtllib_device *ieee); void rtllib_ts_init(struct rtllib_device *ieee);
void TsStartAddBaProcess(struct rtllib_device *ieee, void rtllib_ts_start_add_ba_process(struct rtllib_device *ieee,
struct tx_ts_record *pTxTS); struct tx_ts_record *pTxTS);
void remove_peer_ts(struct rtllib_device *ieee, u8 *addr); void remove_peer_ts(struct rtllib_device *ieee, u8 *addr);
void remove_all_ts(struct rtllib_device *ieee); void remove_all_ts(struct rtllib_device *ieee);
...@@ -1803,7 +1803,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, ...@@ -1803,7 +1803,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,
struct rtllib_rx_stats *stats); struct rtllib_rx_stats *stats);
void rtllib_indicate_packets(struct rtllib_device *ieee, void rtllib_indicate_packets(struct rtllib_device *ieee,
struct rtllib_rxb **prxbIndicateArray, u8 index); struct rtllib_rxb **prxb_indicate_array, u8 index);
#define RT_ASOC_RETRY_LIMIT 5 #define RT_ASOC_RETRY_LIMIT 5
u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee); u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee);
......
...@@ -182,7 +182,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -182,7 +182,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
*pos++ = key->tx_pn[0]; *pos++ = key->tx_pn[0];
hdr = (struct ieee80211_hdr *)skb->data; hdr = (struct ieee80211_hdr *)skb->data;
if (!tcb_desc->bHwSec) { if (!tcb_desc->hw_sec) {
struct aead_request *req; struct aead_request *req;
struct scatterlist sg[2]; struct scatterlist sg[2];
u8 *aad = key->tx_aad; u8 *aad = key->tx_aad;
...@@ -265,7 +265,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -265,7 +265,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
key->dot11rsna_stats_ccmp_replays++; key->dot11rsna_stats_ccmp_replays++;
return -4; return -4;
} }
if (!tcb_desc->bHwSec) { if (!tcb_desc->hw_sec) {
size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN; size_t data_len = skb->len - hdr_len - CCMP_HDR_LEN;
struct aead_request *req; struct aead_request *req;
struct scatterlist sg[2]; struct scatterlist sg[2];
...@@ -407,4 +407,5 @@ static void __exit rtllib_crypto_ccmp_exit(void) ...@@ -407,4 +407,5 @@ static void __exit rtllib_crypto_ccmp_exit(void)
module_init(rtllib_crypto_ccmp_init); module_init(rtllib_crypto_ccmp_init);
module_exit(rtllib_crypto_ccmp_exit); module_exit(rtllib_crypto_ccmp_exit);
MODULE_DESCRIPTION("Support module for rtllib CCMP crypto");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -268,7 +268,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -268,7 +268,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
hdr = (struct ieee80211_hdr *)skb->data; hdr = (struct ieee80211_hdr *)skb->data;
if (!tcb_desc->bHwSec) { if (!tcb_desc->hw_sec) {
if (!tkey->tx_phase1_done) { if (!tkey->tx_phase1_done) {
tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2, tkip_mixing_phase1(tkey->tx_ttak, tkey->key, hdr->addr2,
tkey->tx_iv32); tkey->tx_iv32);
...@@ -285,7 +285,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -285,7 +285,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
memmove(pos, pos + 8, hdr_len); memmove(pos, pos + 8, hdr_len);
pos += hdr_len; pos += hdr_len;
if (tcb_desc->bHwSec) { if (tcb_desc->hw_sec) {
*pos++ = Hi8(tkey->tx_iv16); *pos++ = Hi8(tkey->tx_iv16);
*pos++ = (Hi8(tkey->tx_iv16) | 0x20) & 0x7F; *pos++ = (Hi8(tkey->tx_iv16) | 0x20) & 0x7F;
*pos++ = Lo8(tkey->tx_iv16); *pos++ = Lo8(tkey->tx_iv16);
...@@ -301,7 +301,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -301,7 +301,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
*pos++ = (tkey->tx_iv32 >> 16) & 0xff; *pos++ = (tkey->tx_iv32 >> 16) & 0xff;
*pos++ = (tkey->tx_iv32 >> 24) & 0xff; *pos++ = (tkey->tx_iv32 >> 24) & 0xff;
if (!tcb_desc->bHwSec) { if (!tcb_desc->hw_sec) {
icv = skb_put(skb, 4); icv = skb_put(skb, 4);
crc = ~crc32_le(~0, pos, len); crc = ~crc32_le(~0, pos, len);
icv[0] = crc; icv[0] = crc;
...@@ -319,7 +319,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -319,7 +319,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
tkey->tx_iv32++; tkey->tx_iv32++;
} }
if (!tcb_desc->bHwSec) if (!tcb_desc->hw_sec)
return ret; return ret;
return 0; return 0;
} }
...@@ -371,7 +371,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -371,7 +371,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
iv32 = pos[4] | (pos[5] << 8) | (pos[6] << 16) | (pos[7] << 24); iv32 = pos[4] | (pos[5] << 8) | (pos[6] << 16) | (pos[7] << 24);
pos += 8; pos += 8;
if (!tcb_desc->bHwSec || (skb->cb[0] == 1)) { if (!tcb_desc->hw_sec || (skb->cb[0] == 1)) {
if ((iv32 < tkey->rx_iv32 || if ((iv32 < tkey->rx_iv32 ||
(iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) && (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) &&
tkey->initialized) { tkey->initialized) {
...@@ -708,4 +708,5 @@ static void __exit rtllib_crypto_tkip_exit(void) ...@@ -708,4 +708,5 @@ static void __exit rtllib_crypto_tkip_exit(void)
module_init(rtllib_crypto_tkip_init); module_init(rtllib_crypto_tkip_init);
module_exit(rtllib_crypto_tkip_exit); module_exit(rtllib_crypto_tkip_exit);
MODULE_DESCRIPTION("Support module for rtllib TKIP crypto");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -102,7 +102,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -102,7 +102,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)
/* Copy rest of the WEP key (the secret part) */ /* Copy rest of the WEP key (the secret part) */
memcpy(key + 3, wep->key, wep->key_len); memcpy(key + 3, wep->key, wep->key_len);
if (!tcb_desc->bHwSec) { if (!tcb_desc->hw_sec) {
/* Append little-endian CRC32 and encrypt it to produce ICV */ /* Append little-endian CRC32 and encrypt it to produce ICV */
crc = ~crc32_le(~0, pos, len); crc = ~crc32_le(~0, pos, len);
icv = skb_put(skb, 4); icv = skb_put(skb, 4);
...@@ -155,7 +155,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) ...@@ -155,7 +155,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)
/* Apply RC4 to data and compute CRC32 over decrypted data */ /* Apply RC4 to data and compute CRC32 over decrypted data */
plen = skb->len - hdr_len - 8; plen = skb->len - hdr_len - 8;
if (!tcb_desc->bHwSec) { if (!tcb_desc->hw_sec) {
arc4_setkey(&wep->rx_ctx_arc4, key, klen); arc4_setkey(&wep->rx_ctx_arc4, key, klen);
arc4_crypt(&wep->rx_ctx_arc4, pos, pos, plen + 4); arc4_crypt(&wep->rx_ctx_arc4, pos, pos, plen + 4);
...@@ -238,4 +238,5 @@ static void __exit rtllib_crypto_wep_exit(void) ...@@ -238,4 +238,5 @@ static void __exit rtllib_crypto_wep_exit(void)
module_init(rtllib_crypto_wep_init); module_init(rtllib_crypto_wep_init);
module_exit(rtllib_crypto_wep_exit); module_exit(rtllib_crypto_wep_exit);
MODULE_DESCRIPTION("Support module for rtllib WEP crypto");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
...@@ -175,4 +175,5 @@ static void __exit rtllib_exit(void) ...@@ -175,4 +175,5 @@ static void __exit rtllib_exit(void)
module_init(rtllib_init); module_init(rtllib_init);
module_exit(rtllib_exit); module_exit(rtllib_exit);
MODULE_DESCRIPTION("Support module for rtllib wireless devices");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
This diff is collapsed.
...@@ -421,7 +421,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee) ...@@ -421,7 +421,7 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee)
* So we switch to MAC80211_LINKED_SCANNING to remember * So we switch to MAC80211_LINKED_SCANNING to remember
* that we are still logically linked (not interested in * that we are still logically linked (not interested in
* new network events, despite for updating the net list, * new network events, despite for updating the net list,
* but we are temporarly 'unlinked' as the driver shall * but we are temporarily 'unlinked' as the driver shall
* not filter RX frames and the channel is changing. * not filter RX frames and the channel is changing.
* So the only situation in which are interested is to check * So the only situation in which are interested is to check
* if the state become LINKED because of the #1 situation * if the state become LINKED because of the #1 situation
...@@ -934,7 +934,7 @@ static void rtllib_associate_abort(struct rtllib_device *ieee) ...@@ -934,7 +934,7 @@ static void rtllib_associate_abort(struct rtllib_device *ieee)
ieee->associate_seq++; ieee->associate_seq++;
/* don't scan, and avoid to have the RX path possibily /* don't scan, and avoid to have the RX path possibly
* try again to associate. Even do not react to AUTH or * try again to associate. Even do not react to AUTH or
* ASSOC response. Just wait for the retry wq to be scheduled. * ASSOC response. Just wait for the retry wq to be scheduled.
* Here we will check if there are good nets to associate * Here we will check if there are good nets to associate
...@@ -1359,7 +1359,7 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time) ...@@ -1359,7 +1359,7 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
return 0; return 0;
timeout = ieee->current_network.beacon_interval; timeout = ieee->current_network.beacon_interval;
ieee->current_network.dtim_data = RTLLIB_DTIM_INVALID; ieee->current_network.dtim_data = RTLLIB_DTIM_INVALID;
/* there's no need to nofity AP that I find you buffered /* there's no need to notify AP that I find you buffered
* with broadcast packet * with broadcast packet
*/ */
if (dtim & (RTLLIB_DTIM_UCAST & ieee->ps)) if (dtim & (RTLLIB_DTIM_UCAST & ieee->ps))
...@@ -1806,7 +1806,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) ...@@ -1806,7 +1806,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
spin_lock_irqsave(&ieee->lock, flags); spin_lock_irqsave(&ieee->lock, flags);
/* called with 2nd parm 0, no tx mgmt lock required */ /* called with 2nd param 0, no tx mgmt lock required */
rtllib_sta_wakeup(ieee, 0); rtllib_sta_wakeup(ieee, 0);
/* update the tx status */ /* update the tx status */
......
This diff is collapsed.
...@@ -247,7 +247,7 @@ void r8712_construct_txaggr_cmd_desc(struct xmit_buf *pxmitbuf) ...@@ -247,7 +247,7 @@ void r8712_construct_txaggr_cmd_desc(struct xmit_buf *pxmitbuf)
{ {
struct tx_desc *ptx_desc = (struct tx_desc *)pxmitbuf->pbuf; struct tx_desc *ptx_desc = (struct tx_desc *)pxmitbuf->pbuf;
/* Fill up TxCmd Descriptor according as USB FW Tx Aaggregation info.*/ /* Fill up TxCmd Descriptor according as USB FW Tx Aggregation info.*/
/* dw0 */ /* dw0 */
ptx_desc->txdw0 = cpu_to_le32(CMD_HDR_SZ & 0xffff); ptx_desc->txdw0 = cpu_to_le32(CMD_HDR_SZ & 0xffff);
ptx_desc->txdw0 |= ptx_desc->txdw0 |=
......
...@@ -37,7 +37,7 @@ struct surveydone_event { ...@@ -37,7 +37,7 @@ struct surveydone_event {
}; };
/* /*
* Used to report the link result of joinning the given bss * Used to report the link result of joining the given bss
* join_res: * join_res:
* -1: authentication fail * -1: authentication fail
* -2: association fail * -2: association fail
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
#define IO_WR_BURST(x) (IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | \ #define IO_WR_BURST(x) (IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | \
((x) & _IOSZ_MASK_)) ((x) & _IOSZ_MASK_))
#define IO_RD_BURST(x) (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_)) #define IO_RD_BURST(x) (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))
/*below is for the intf_option bit defition...*/ /*below is for the intf_option bit definition...*/
#define _INTF_ASYNC_ BIT(0) /*support async io*/ #define _INTF_ASYNC_ BIT(0) /*support async io*/
struct intf_priv; struct intf_priv;
struct intf_hdl; struct intf_hdl;
......
...@@ -944,7 +944,7 @@ void r8712_cpwm_event_callback(struct _adapter *adapter, u8 *pbuf) ...@@ -944,7 +944,7 @@ void r8712_cpwm_event_callback(struct _adapter *adapter, u8 *pbuf)
/* When the Netgear 3500 AP is with WPA2PSK-AES mode, it will send /* When the Netgear 3500 AP is with WPA2PSK-AES mode, it will send
* the ADDBA req frame with start seq control = 0 to wifi client after * the ADDBA req frame with start seq control = 0 to wifi client after
* the WPA handshake and the seqence number of following data packet * the WPA handshake and the sequence number of following data packet
* will be 0. In this case, the Rx reorder sequence is not longer than 0 * will be 0. In this case, the Rx reorder sequence is not longer than 0
* and the WiFi client will drop the data with seq number 0. * and the WiFi client will drop the data with seq number 0.
* So, the 8712 firmware has to inform driver with receiving the * So, the 8712 firmware has to inform driver with receiving the
......
...@@ -117,12 +117,9 @@ int _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv, ...@@ -117,12 +117,9 @@ int _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
/*init xmit_buf*/ /*init xmit_buf*/
_init_queue(&pxmitpriv->free_xmitbuf_queue); _init_queue(&pxmitpriv->free_xmitbuf_queue);
_init_queue(&pxmitpriv->pending_xmitbuf_queue); _init_queue(&pxmitpriv->pending_xmitbuf_queue);
pxmitpriv->pallocated_xmitbuf = pxmitpriv->pxmitbuf = kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf), GFP_ATOMIC);
kmalloc(NR_XMITBUFF * sizeof(struct xmit_buf) + 4, GFP_ATOMIC); if (!pxmitpriv->pxmitbuf)
if (!pxmitpriv->pallocated_xmitbuf)
goto clean_up_frame_buf; goto clean_up_frame_buf;
pxmitpriv->pxmitbuf = pxmitpriv->pallocated_xmitbuf + 4 -
((addr_t)(pxmitpriv->pallocated_xmitbuf) & 3);
pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf; pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
for (i = 0; i < NR_XMITBUFF; i++) { for (i = 0; i < NR_XMITBUFF; i++) {
INIT_LIST_HEAD(&pxmitbuf->list); INIT_LIST_HEAD(&pxmitbuf->list);
...@@ -165,8 +162,8 @@ int _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv, ...@@ -165,8 +162,8 @@ int _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
for (k = 0; k < 8; k++) /* delete xmit urb's */ for (k = 0; k < 8; k++) /* delete xmit urb's */
usb_free_urb(pxmitbuf->pxmit_urb[k]); usb_free_urb(pxmitbuf->pxmit_urb[k]);
} }
kfree(pxmitpriv->pallocated_xmitbuf); kfree(pxmitpriv->pxmitbuf);
pxmitpriv->pallocated_xmitbuf = NULL; pxmitpriv->pxmitbuf = NULL;
clean_up_frame_buf: clean_up_frame_buf:
kfree(pxmitpriv->pallocated_frame_buf); kfree(pxmitpriv->pallocated_frame_buf);
pxmitpriv->pallocated_frame_buf = NULL; pxmitpriv->pallocated_frame_buf = NULL;
...@@ -193,7 +190,7 @@ void _free_xmit_priv(struct xmit_priv *pxmitpriv) ...@@ -193,7 +190,7 @@ void _free_xmit_priv(struct xmit_priv *pxmitpriv)
pxmitbuf++; pxmitbuf++;
} }
kfree(pxmitpriv->pallocated_frame_buf); kfree(pxmitpriv->pallocated_frame_buf);
kfree(pxmitpriv->pallocated_xmitbuf); kfree(pxmitpriv->pxmitbuf);
free_hwxmits(padapter); free_hwxmits(padapter);
} }
......
...@@ -244,7 +244,6 @@ struct xmit_priv { ...@@ -244,7 +244,6 @@ struct xmit_priv {
int cmdseq; int cmdseq;
struct __queue free_xmitbuf_queue; struct __queue free_xmitbuf_queue;
struct __queue pending_xmitbuf_queue; struct __queue pending_xmitbuf_queue;
u8 *pallocated_xmitbuf;
u8 *pxmitbuf; u8 *pxmitbuf;
uint free_xmitbuf_cnt; uint free_xmitbuf_cnt;
}; };
......
...@@ -26,13 +26,6 @@ ...@@ -26,13 +26,6 @@
#define RTL871X_VENQT_READ 0xc0 #define RTL871X_VENQT_READ 0xc0
#define RTL871X_VENQT_WRITE 0x40 #define RTL871X_VENQT_WRITE 0x40
struct zero_bulkout_context {
void *pbuf;
void *purb;
void *pirp;
void *padapter;
};
uint r8712_usb_init_intf_priv(struct intf_priv *pintfpriv) uint r8712_usb_init_intf_priv(struct intf_priv *pintfpriv)
{ {
pintfpriv->piorw_urb = usb_alloc_urb(0, GFP_ATOMIC); pintfpriv->piorw_urb = usb_alloc_urb(0, GFP_ATOMIC);
......
This diff is collapsed.
...@@ -70,13 +70,6 @@ static bool CheckPositive( ...@@ -70,13 +70,6 @@ static bool CheckPositive(
return false; return false;
} }
static bool CheckNegative(
struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
)
{
return true;
}
/****************************************************************************** /******************************************************************************
* AGC_TAB.TXT * AGC_TAB.TXT
******************************************************************************/ ******************************************************************************/
...@@ -244,10 +237,7 @@ void ODM_ReadAndConfig_MP_8723B_AGC_TAB(struct dm_odm_t *pDM_Odm) ...@@ -244,10 +237,7 @@ void ODM_ReadAndConfig_MP_8723B_AGC_TAB(struct dm_odm_t *pDM_Odm)
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} else { } else {
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
if (!CheckNegative(pDM_Odm, v1, v2)) bMatched = true;
bMatched = false;
else
bMatched = true;
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} }
...@@ -506,10 +496,7 @@ void ODM_ReadAndConfig_MP_8723B_PHY_REG(struct dm_odm_t *pDM_Odm) ...@@ -506,10 +496,7 @@ void ODM_ReadAndConfig_MP_8723B_PHY_REG(struct dm_odm_t *pDM_Odm)
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} else { } else {
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
if (!CheckNegative(pDM_Odm, v1, v2)) bMatched = true;
bMatched = false;
else
bMatched = true;
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} }
......
...@@ -68,13 +68,6 @@ static bool CheckPositive( ...@@ -68,13 +68,6 @@ static bool CheckPositive(
return false; return false;
} }
static bool CheckNegative(
struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
)
{
return true;
}
/****************************************************************************** /******************************************************************************
* MAC_REG.TXT * MAC_REG.TXT
******************************************************************************/ ******************************************************************************/
...@@ -214,10 +207,7 @@ void ODM_ReadAndConfig_MP_8723B_MAC_REG(struct dm_odm_t *pDM_Odm) ...@@ -214,10 +207,7 @@ void ODM_ReadAndConfig_MP_8723B_MAC_REG(struct dm_odm_t *pDM_Odm)
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} else { } else {
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
if (!CheckNegative(pDM_Odm, v1, v2)) bMatched = true;
bMatched = false;
else
bMatched = true;
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} }
......
...@@ -78,13 +78,6 @@ static bool CheckPositive( ...@@ -78,13 +78,6 @@ static bool CheckPositive(
return false; return false;
} }
static bool CheckNegative(
struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
)
{
return true;
}
/****************************************************************************** /******************************************************************************
* RadioA.TXT * RadioA.TXT
******************************************************************************/ ******************************************************************************/
...@@ -245,10 +238,7 @@ void ODM_ReadAndConfig_MP_8723B_RadioA(struct dm_odm_t *pDM_Odm) ...@@ -245,10 +238,7 @@ void ODM_ReadAndConfig_MP_8723B_RadioA(struct dm_odm_t *pDM_Odm)
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} else { } else {
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
if (!CheckNegative(pDM_Odm, v1, v2)) bMatched = true;
bMatched = false;
else
bMatched = true;
READ_NEXT_PAIR(v1, v2, i); READ_NEXT_PAIR(v1, v2, i);
} }
......
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
/* Remove DIG by Yuchen */ /* Remove DIG by Yuchen */
/* Remoce BB power saving by Yuchn */ /* Remove BB power saving by Yuchn */
/* Remove DIG by yuchen */ /* Remove DIG by yuchen */
...@@ -878,7 +878,7 @@ struct dm_odm_t { /* DM_Out_Source_Dynamic_Mechanism_Structure */ ...@@ -878,7 +878,7 @@ struct dm_odm_t { /* DM_Out_Source_Dynamic_Mechanism_Structure */
struct odm_mac_status_info *pMacInfo; struct odm_mac_status_info *pMacInfo;
/* MAC_INFO_88E MacInfo; */ /* MAC_INFO_88E MacInfo; */
/* Different Team independt structure?? */ /* Different Team independent structure?? */
/* */ /* */
/* TX_RTP_CMN TX_retrpo; */ /* TX_RTP_CMN TX_retrpo; */
......
...@@ -700,7 +700,7 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus) ...@@ -700,7 +700,7 @@ void rtl8723b_download_rsvd_page(struct adapter *padapter, u8 mstatus)
rtw_write8(padapter, REG_BCN_CTRL, val8); rtw_write8(padapter, REG_BCN_CTRL, val8);
/* To make sure that if there exists an adapter which would like to send beacon. */ /* To make sure that if there exists an adapter which would like to send beacon. */
/* If exists, the origianl value of 0x422[6] will be 1, we should check this to */ /* If exists, the original value of 0x422[6] will be 1, we should check this to */
/* prevent from setting 0x422[6] to 0 after download reserved page, or it will cause */ /* prevent from setting 0x422[6] to 0 after download reserved page, or it will cause */
/* the beacon cannot be sent by HW. */ /* the beacon cannot be sent by HW. */
/* 2010.06.23. Added by tynli. */ /* 2010.06.23. Added by tynli. */
...@@ -964,7 +964,7 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter) ...@@ -964,7 +964,7 @@ void rtl8723b_download_BTCoex_AP_mode_rsvd_page(struct adapter *padapter)
rtw_write8(padapter, REG_BCN_CTRL, val8); rtw_write8(padapter, REG_BCN_CTRL, val8);
/* To make sure that if there exists an adapter which would like to send beacon. */ /* To make sure that if there exists an adapter which would like to send beacon. */
/* If exists, the origianl value of 0x422[6] will be 1, we should check this to */ /* If exists, the original value of 0x422[6] will be 1, we should check this to */
/* prevent from setting 0x422[6] to 0 after download reserved page, or it will cause */ /* prevent from setting 0x422[6] to 0 after download reserved page, or it will cause */
/* the beacon cannot be sent by HW. */ /* the beacon cannot be sent by HW. */
/* 2010.06.23. Added by tynli. */ /* 2010.06.23. Added by tynli. */
......
...@@ -49,8 +49,6 @@ ...@@ -49,8 +49,6 @@
/*---------------------------------------------*/ /*---------------------------------------------*/
/* define the base address of each block */ /* define the base address of each block */
#define PWR_BASEADDR_MAC 0x00 #define PWR_BASEADDR_MAC 0x00
#define PWR_BASEADDR_USB 0x01
#define PWR_BASEADDR_PCIE 0x02
#define PWR_BASEADDR_SDIO 0x03 #define PWR_BASEADDR_SDIO 0x03
/*---------------------------------------------*/ /*---------------------------------------------*/
...@@ -64,21 +62,12 @@ ...@@ -64,21 +62,12 @@
/*---------------------------------------------*/ /*---------------------------------------------*/
/* 3 The value of fab_msk: 4 bits */ /* 3 The value of fab_msk: 4 bits */
/*---------------------------------------------*/ /*---------------------------------------------*/
#define PWR_FAB_TSMC_MSK BIT(0)
#define PWR_FAB_UMC_MSK BIT(1)
#define PWR_FAB_ALL_MSK (BIT(0)|BIT(1)|BIT(2)|BIT(3)) #define PWR_FAB_ALL_MSK (BIT(0)|BIT(1)|BIT(2)|BIT(3))
/*---------------------------------------------*/ /*---------------------------------------------*/
/* 3 The value of cut_msk: 8 bits */ /* 3 The value of cut_msk: 8 bits */
/*---------------------------------------------*/ /*---------------------------------------------*/
#define PWR_CUT_TESTCHIP_MSK BIT(0) #define PWR_CUT_TESTCHIP_MSK BIT(0)
#define PWR_CUT_A_MSK BIT(1)
#define PWR_CUT_B_MSK BIT(2)
#define PWR_CUT_C_MSK BIT(3)
#define PWR_CUT_D_MSK BIT(4)
#define PWR_CUT_E_MSK BIT(5)
#define PWR_CUT_F_MSK BIT(6)
#define PWR_CUT_G_MSK BIT(7)
#define PWR_CUT_ALL_MSK 0xFF #define PWR_CUT_ALL_MSK 0xFF
......
...@@ -490,7 +490,6 @@ static inline u8 *myid(struct eeprom_priv *peepriv) ...@@ -490,7 +490,6 @@ static inline u8 *myid(struct eeprom_priv *peepriv)
} }
/* HCI Related header file */ /* HCI Related header file */
#include <sdio_osintf.h>
#include <sdio_ops.h> #include <sdio_ops.h>
#include <sdio_hal.h> #include <sdio_hal.h>
......
...@@ -9,86 +9,10 @@ ...@@ -9,86 +9,10 @@
#define H2C_RSVDPAGE_LOC_LEN 5 #define H2C_RSVDPAGE_LOC_LEN 5
#define H2C_MEDIA_STATUS_RPT_LEN 3 #define H2C_MEDIA_STATUS_RPT_LEN 3
#define H2C_KEEP_ALIVE_CTRL_LEN 2
#define H2C_DISCON_DECISION_LEN 3
#define H2C_AP_OFFLOAD_LEN 3
#define H2C_AP_WOW_GPIO_CTRL_LEN 4
#define H2C_AP_PS_LEN 2
#define H2C_PWRMODE_LEN 7 #define H2C_PWRMODE_LEN 7
#define H2C_PSTUNEPARAM_LEN 4 #define H2C_PSTUNEPARAM_LEN 4
#define H2C_MACID_CFG_LEN 7 #define H2C_MACID_CFG_LEN 7
#define H2C_BTMP_OPER_LEN 4
#define H2C_WOWLAN_LEN 4
#define H2C_REMOTE_WAKE_CTRL_LEN 3
#define H2C_AOAC_GLOBAL_INFO_LEN 2
#define H2C_AOAC_RSVDPAGE_LOC_LEN 7
#define H2C_SCAN_OFFLOAD_CTRL_LEN 4
#define H2C_BT_FW_PATCH_LEN 6
#define H2C_RSSI_SETTING_LEN 4 #define H2C_RSSI_SETTING_LEN 4
#define H2C_AP_REQ_TXRPT_LEN 2
#define H2C_FORCE_BT_TXPWR_LEN 3
#define H2C_BCN_RSVDPAGE_LEN 5
#define H2C_PROBERSP_RSVDPAGE_LEN 5
/* _RSVDPAGE_LOC_CMD_0x00 */
#define SET_H2CCMD_RSVDPAGE_LOC_PROBE_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
#define SET_H2CCMD_RSVDPAGE_LOC_PSPOLL(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
#define SET_H2CCMD_RSVDPAGE_LOC_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
#define SET_H2CCMD_RSVDPAGE_LOC_QOS_NULL_DATA(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
#define SET_H2CCMD_RSVDPAGE_LOC_BT_QOS_NULL_DATA(__pH2CCmd, __Value)SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
/* _MEDIA_STATUS_RPT_PARM_CMD_0x01 */
#define SET_H2CCMD_MSRRPT_PARM_OPMODE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_H2CCMD_MSRRPT_PARM_MACID_IND(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
#define SET_H2CCMD_MSRRPT_PARM_MACID(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
#define SET_H2CCMD_MSRRPT_PARM_MACID_END(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+2, 0, 8, __Value)
/* _KEEP_ALIVE_CMD_0x03 */
#define SET_H2CCMD_KEEPALIVE_PARM_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_H2CCMD_KEEPALIVE_PARM_ADOPT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
#define SET_H2CCMD_KEEPALIVE_PARM_PKT_TYPE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
#define SET_H2CCMD_KEEPALIVE_PARM_CHECK_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
/* _DISCONNECT_DECISION_CMD_0x04 */
#define SET_H2CCMD_DISCONDECISION_PARM_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_H2CCMD_DISCONDECISION_PARM_ADOPT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
#define SET_H2CCMD_DISCONDECISION_PARM_CHECK_PERIOD(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+1, 0, 8, __Value)
#define SET_H2CCMD_DISCONDECISION_PARM_TRY_PKT_NUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd+2, 0, 8, __Value)
/* _WoWLAN PARAM_CMD_0x80 */
#define SET_H2CCMD_WOWLAN_FUNC_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_H2CCMD_WOWLAN_PATTERN_MATCH_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
#define SET_H2CCMD_WOWLAN_MAGIC_PKT_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
#define SET_H2CCMD_WOWLAN_UNICAST_PKT_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
#define SET_H2CCMD_WOWLAN_ALL_PKT_DROP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
#define SET_H2CCMD_WOWLAN_GPIO_ACTIVE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 5, 1, __Value)
#define SET_H2CCMD_WOWLAN_REKEY_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 6, 1, __Value)
#define SET_H2CCMD_WOWLAN_DISCONNECT_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
#define SET_H2CCMD_WOWLAN_GPIONUM(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 0, 7, __Value)
#define SET_H2CCMD_WOWLAN_DATAPIN_WAKE_UP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+1, 7, 1, __Value)
#define SET_H2CCMD_WOWLAN_GPIO_DURATION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
/* define SET_H2CCMD_WOWLAN_GPIO_PULSE_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+3, 0, 1, __Value) */
#define SET_H2CCMD_WOWLAN_GPIO_PULSE_COUNT(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
/* _REMOTE_WAKEUP_CMD_0x81 */
#define SET_H2CCMD_REMOTE_WAKECTRL_ENABLE(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 0, 1, __Value)
#define SET_H2CCMD_REMOTE_WAKE_CTRL_ARP_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 1, 1, __Value)
#define SET_H2CCMD_REMOTE_WAKE_CTRL_NDP_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 2, 1, __Value)
#define SET_H2CCMD_REMOTE_WAKE_CTRL_GTK_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 3, 1, __Value)
#define SET_H2CCMD_REMOTE_WAKE_CTRL_NLO_OFFLOAD_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 4, 1, __Value)
#define SET_H2CCMD_REMOTE_WAKE_CTRL_FW_UNICAST_EN(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE(__pH2CCmd, 7, 1, __Value)
#define SET_H2CCMD_REMOTE_WAKE_CTRL_ARP_ACTION(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE((__pH2CCmd)+2, 0, 1, __Value)
/* AOAC_GLOBAL_INFO_0x82 */
#define SET_H2CCMD_AOAC_GLOBAL_INFO_PAIRWISE_ENC_ALG(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT(__pH2CCmd, 0, 8, __Value)
#define SET_H2CCMD_AOAC_GLOBAL_INFO_GROUP_ENC_ALG(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
/* AOAC_RSVDPAGE_LOC_0x83 */
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_REMOTE_WAKE_CTRL_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd), 0, 8, __Value)
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_ARP_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+1, 0, 8, __Value)
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_NEIGHBOR_ADV(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+2, 0, 8, __Value)
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_RSP(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+3, 0, 8, __Value)
#define SET_H2CCMD_AOAC_RSVDPAGE_LOC_GTK_INFO(__pH2CCmd, __Value) SET_BITS_TO_LE_1BYTE_8BIT((__pH2CCmd)+4, 0, 8, __Value)
/* */ /* */
/* Structure -------------------------------------------------- */ /* Structure -------------------------------------------------- */
......
/* SPDX-License-Identifier: GPL-2.0 */
/******************************************************************************
*
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
*
******************************************************************************/
#ifndef __INC_HAL8723BPHYREG_H__
#define __INC_HAL8723BPHYREG_H__
#include <Hal8192CPhyReg.h>
/* BB Register Definition */
/* */
/* 4. Page9(0x900) */
/* */
#define rDPDT_control 0x92c
#define rfe_ctrl_anta_src 0x930
#define rS0S1_PathSwitch 0x948
#define AGC_table_select 0xb2c
/* */
/* PageB(0xB00) */
/* */
#define rPdp_AntA 0xb00
#define rPdp_AntA_4 0xb04
#define rPdp_AntA_8 0xb08
#define rPdp_AntA_C 0xb0c
#define rPdp_AntA_10 0xb10
#define rPdp_AntA_14 0xb14
#define rPdp_AntA_18 0xb18
#define rPdp_AntA_1C 0xb1c
#define rPdp_AntA_20 0xb20
#define rPdp_AntA_24 0xb24
#define rConfig_Pmpd_AntA 0xb28
#define rConfig_ram64x16 0xb2c
#define rBndA 0xb30
#define rHssiPar 0xb34
#define rConfig_AntA 0xb68
#define rConfig_AntB 0xb6c
#define rPdp_AntB 0xb70
#define rPdp_AntB_4 0xb74
#define rPdp_AntB_8 0xb78
#define rPdp_AntB_C 0xb7c
#define rPdp_AntB_10 0xb80
#define rPdp_AntB_14 0xb84
#define rPdp_AntB_18 0xb88
#define rPdp_AntB_1C 0xb8c
#define rPdp_AntB_20 0xb90
#define rPdp_AntB_24 0xb94
#define rConfig_Pmpd_AntB 0xb98
#define rBndB 0xba0
#define rAPK 0xbd8
#define rPm_Rx0_AntA 0xbdc
#define rPm_Rx1_AntA 0xbe0
#define rPm_Rx2_AntA 0xbe4
#define rPm_Rx3_AntA 0xbe8
#define rPm_Rx0_AntB 0xbec
#define rPm_Rx1_AntB 0xbf0
#define rPm_Rx2_AntB 0xbf4
#define rPm_Rx3_AntB 0xbf8
#endif
...@@ -28,9 +28,7 @@ ...@@ -28,9 +28,7 @@
#define RTL8723B_TRANS_CARDEMU_TO_ACT_STEPS 26 #define RTL8723B_TRANS_CARDEMU_TO_ACT_STEPS 26
#define RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS 15 #define RTL8723B_TRANS_ACT_TO_CARDEMU_STEPS 15
#define RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS 15 #define RTL8723B_TRANS_CARDEMU_TO_SUS_STEPS 15
#define RTL8723B_TRANS_SUS_TO_CARDEMU_STEPS 15
#define RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS 15 #define RTL8723B_TRANS_CARDEMU_TO_PDN_STEPS 15
#define RTL8723B_TRANS_PDN_TO_CARDEMU_STEPS 15
#define RTL8723B_TRANS_ACT_TO_LPS_STEPS 15 #define RTL8723B_TRANS_ACT_TO_LPS_STEPS 15
#define RTL8723B_TRANS_LPS_TO_ACT_STEPS 15 #define RTL8723B_TRANS_LPS_TO_ACT_STEPS 15
#define RTL8723B_TRANS_ACT_TO_SWLPS_STEPS 22 #define RTL8723B_TRANS_ACT_TO_SWLPS_STEPS 22
...@@ -128,11 +126,6 @@ ...@@ -128,11 +126,6 @@
{0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0},/* 0x04[16] = 0*/\ {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0},/* 0x04[16] = 0*/\
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7},/* 0x04[15] = 1*/ {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7},/* 0x04[15] = 1*/
#define RTL8723B_TRANS_PDN_TO_CARDEMU \
/* format */ \
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0},/* 0x04[15] = 0*/
#define RTL8723B_TRANS_ACT_TO_LPS \ #define RTL8723B_TRANS_ACT_TO_LPS \
/* format */ \ /* format */ \
/* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \ /* { offset, cut_msk, fab_msk|interface_msk, base|cmd, msk, value }, comments here*/ \
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include "rtl8723b_cmd.h" #include "rtl8723b_cmd.h"
#include "rtw_mp.h" #include "rtw_mp.h"
#include "hal_pwr_seq.h" #include "hal_pwr_seq.h"
#include "hal_phy_reg_8723b.h" #include "Hal8192CPhyReg.h"
#include "hal_phy_cfg.h" #include "hal_phy_cfg.h"
/* */ /* */
......
...@@ -7,19 +7,6 @@ ...@@ -7,19 +7,6 @@
#ifndef __RTW_EFUSE_H__ #ifndef __RTW_EFUSE_H__
#define __RTW_EFUSE_H__ #define __RTW_EFUSE_H__
#define EFUSE_ERROE_HANDLE 1
#define PG_STATE_HEADER 0x01
#define PG_STATE_WORD_0 0x02
#define PG_STATE_WORD_1 0x04
#define PG_STATE_WORD_2 0x08
#define PG_STATE_WORD_3 0x10
#define PG_STATE_DATA 0x20
#define PG_SWBYTE_H 0x01
#define PG_SWBYTE_L 0x02
#define PGPKT_DATA_SIZE 8 #define PGPKT_DATA_SIZE 8
#define EFUSE_WIFI 0 #define EFUSE_WIFI 0
......
...@@ -63,43 +63,21 @@ enum { ...@@ -63,43 +63,21 @@ enum {
#define LDPC_HT_ENABLE_RX BIT0 #define LDPC_HT_ENABLE_RX BIT0
#define LDPC_HT_ENABLE_TX BIT1 #define LDPC_HT_ENABLE_TX BIT1
#define LDPC_HT_TEST_TX_ENABLE BIT2
#define LDPC_HT_CAP_TX BIT3 #define LDPC_HT_CAP_TX BIT3
#define STBC_HT_ENABLE_RX BIT0 #define STBC_HT_ENABLE_RX BIT0
#define STBC_HT_ENABLE_TX BIT1 #define STBC_HT_ENABLE_TX BIT1
#define STBC_HT_TEST_TX_ENABLE BIT2
#define STBC_HT_CAP_TX BIT3 #define STBC_HT_CAP_TX BIT3
#define BEAMFORMING_HT_BEAMFORMER_ENABLE BIT0 /* Declare our NIC supports beamformer */ #define BEAMFORMING_HT_BEAMFORMER_ENABLE BIT0 /* Declare our NIC supports beamformer */
#define BEAMFORMING_HT_BEAMFORMEE_ENABLE BIT1 /* Declare our NIC supports beamformee */ #define BEAMFORMING_HT_BEAMFORMEE_ENABLE BIT1 /* Declare our NIC supports beamformee */
#define BEAMFORMING_HT_BEAMFORMER_TEST BIT2 /* Transmiting Beamforming no matter the target supports it or not */
/* */
/* The HT Control field */
/* */
#define SET_HT_CTRL_CSI_STEERING(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart)+2, 6, 2, _val)
#define SET_HT_CTRL_NDP_ANNOUNCEMENT(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart)+3, 0, 1, _val)
#define GET_HT_CTRL_NDP_ANNOUNCEMENT(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart)+3, 0, 1)
/* 20/40 BSS Coexist */ /* 20/40 BSS Coexist */
#define SET_EXT_CAPABILITY_ELE_BSS_COEXIST(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart), 0, 1, _val) #define SET_EXT_CAPABILITY_ELE_BSS_COEXIST(_pEleStart, _val) SET_BITS_TO_LE_1BYTE((_pEleStart), 0, 1, _val)
#define GET_EXT_CAPABILITY_ELE_BSS_COEXIST(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart), 0, 1)
#define GET_HT_CAPABILITY_ELE_LDPC_CAP(_pEleStart) LE_BITS_TO_1BYTE(_pEleStart, 0, 1) #define GET_HT_CAPABILITY_ELE_LDPC_CAP(_pEleStart) LE_BITS_TO_1BYTE(_pEleStart, 0, 1)
#define GET_HT_CAPABILITY_ELE_TX_STBC(_pEleStart) LE_BITS_TO_1BYTE(_pEleStart, 7, 1) #define GET_HT_CAPABILITY_ELE_TX_STBC(_pEleStart) LE_BITS_TO_1BYTE(_pEleStart, 7, 1)
#define GET_HT_CAPABILITY_ELE_RX_STBC(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart)+1, 0, 2) #define GET_HT_CAPABILITY_ELE_RX_STBC(_pEleStart) LE_BITS_TO_1BYTE((_pEleStart)+1, 0, 2)
/* TXBF Capabilities */
#define SET_HT_CAP_TXBF_RECEIVE_NDP_CAP(_pEleStart, _val) SET_BITS_TO_LE_4BYTE(((u8 *)(_pEleStart))+21, 3, 1, ((u8)_val))
#define SET_HT_CAP_TXBF_TRANSMIT_NDP_CAP(_pEleStart, _val) SET_BITS_TO_LE_4BYTE(((u8 *)(_pEleStart))+21, 4, 1, ((u8)_val))
#define SET_HT_CAP_TXBF_EXPLICIT_COMP_STEERING_CAP(_pEleStart, _val) SET_BITS_TO_LE_4BYTE(((u8 *)(_pEleStart))+21, 10, 1, ((u8)_val))
#define SET_HT_CAP_TXBF_EXPLICIT_COMP_FEEDBACK_CAP(_pEleStart, _val) SET_BITS_TO_LE_4BYTE(((u8 *)(_pEleStart))+21, 15, 2, ((u8)_val))
#define SET_HT_CAP_TXBF_COMP_STEERING_NUM_ANTENNAS(_pEleStart, _val) SET_BITS_TO_LE_4BYTE(((u8 *)(_pEleStart))+21, 23, 2, ((u8)_val))
#define GET_HT_CAP_TXBF_EXPLICIT_COMP_STEERING_CAP(_pEleStart) LE_BITS_TO_4BYTE((_pEleStart)+21, 10, 1)
#define GET_HT_CAP_TXBF_EXPLICIT_COMP_FEEDBACK_CAP(_pEleStart) LE_BITS_TO_4BYTE((_pEleStart)+21, 15, 2)
#endif /* _RTL871X_HT_H_ */ #endif /* _RTL871X_HT_H_ */
This diff is collapsed.
This diff is collapsed.
...@@ -22,14 +22,9 @@ ...@@ -22,14 +22,9 @@
const char *security_type_str(u8 value); const char *security_type_str(u8 value);
#define SHA256_MAC_LEN 32
#define AES_BLOCK_SIZE 16 #define AES_BLOCK_SIZE 16
#define AES_PRIV_SIZE (4 * 44) #define AES_PRIV_SIZE (4 * 44)
#define RTW_KEK_LEN 16
#define RTW_KCK_LEN 16
#define RTW_REPLAY_CTR_LEN 8
enum { enum {
ENCRYP_PROTOCOL_OPENSYS, /* open system */ ENCRYP_PROTOCOL_OPENSYS, /* open system */
ENCRYP_PROTOCOL_WEP, /* WEP */ ENCRYP_PROTOCOL_WEP, /* WEP */
......
...@@ -7,10 +7,6 @@ ...@@ -7,10 +7,6 @@
#ifndef __SDIO_HAL_H__ #ifndef __SDIO_HAL_H__
#define __SDIO_HAL_H__ #define __SDIO_HAL_H__
extern u8 sd_hal_bus_init(struct adapter *padapter);
extern u8 sd_hal_bus_deinit(struct adapter *padapter);
u8 sd_int_isr(struct adapter *padapter); u8 sd_int_isr(struct adapter *padapter);
void sd_int_dpc(struct adapter *padapter); void sd_int_dpc(struct adapter *padapter);
void rtw_set_hal_ops(struct adapter *padapter); void rtw_set_hal_ops(struct adapter *padapter);
......
This diff is collapsed.
This diff is collapsed.
...@@ -106,6 +106,7 @@ static struct vme_dev *vme_user_bridge; /* Pointer to user device */ ...@@ -106,6 +106,7 @@ static struct vme_dev *vme_user_bridge; /* Pointer to user device */
static const struct class vme_user_sysfs_class = { static const struct class vme_user_sysfs_class = {
.name = DRIVER_NAME, .name = DRIVER_NAME,
}; };
static const int type[VME_DEVS] = { MASTER_MINOR, MASTER_MINOR, static const int type[VME_DEVS] = { MASTER_MINOR, MASTER_MINOR,
MASTER_MINOR, MASTER_MINOR, MASTER_MINOR, MASTER_MINOR,
SLAVE_MINOR, SLAVE_MINOR, SLAVE_MINOR, SLAVE_MINOR,
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment