Merge b707512b8b ("Merge tag 'staging-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging") into android-mainline
Steps on the way to 6.12-rc1 Bug: 367265496 Change-Id: I87ff5d7aa09efc1706d23d4342953b694f9258a3 Signed-off-by: Matthias Maennich <maennich@google.com>
This commit is contained in:
@@ -56,8 +56,6 @@ source "drivers/staging/fbtft/Kconfig"
|
||||
|
||||
source "drivers/staging/most/Kconfig"
|
||||
|
||||
source "drivers/staging/ks7010/Kconfig"
|
||||
|
||||
source "drivers/staging/greybus/Kconfig"
|
||||
|
||||
source "drivers/staging/vc04_services/Kconfig"
|
||||
|
||||
@@ -18,7 +18,6 @@ obj-$(CONFIG_ASHMEM) += android/
|
||||
obj-$(CONFIG_LTE_GDM724X) += gdm724x/
|
||||
obj-$(CONFIG_FB_TFT) += fbtft/
|
||||
obj-$(CONFIG_MOST) += most/
|
||||
obj-$(CONFIG_KS7010) += ks7010/
|
||||
obj-$(CONFIG_GREYBUS) += greybus/
|
||||
obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
|
||||
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
|
||||
|
||||
@@ -35,8 +35,6 @@ static int init_display(struct fbtft_par *par)
|
||||
par->fbtftops.reset(par);
|
||||
|
||||
devcode = read_devicecode(par);
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: 0x%04X\n",
|
||||
devcode);
|
||||
if ((devcode != 0x0000) && (devcode != 0x9320))
|
||||
dev_warn(par->info->device,
|
||||
"Unrecognized Device code: 0x%04X (expected 0x9320)\n",
|
||||
|
||||
@@ -41,13 +41,6 @@ static int init_display(struct fbtft_par *par)
|
||||
{
|
||||
gpiod_set_value(par->gpio.dc, 1);
|
||||
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
|
||||
"%s()\n", __func__);
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
|
||||
"display size %dx%d\n",
|
||||
par->info->var.xres,
|
||||
par->info->var.yres);
|
||||
|
||||
par->fbtftops.reset(par);
|
||||
|
||||
if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) {
|
||||
|
||||
@@ -88,9 +88,6 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
||||
|
||||
static int blank(struct fbtft_par *par, bool on)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
|
||||
__func__, on ? "true" : "false");
|
||||
|
||||
write_reg(par, on ? 0xAE : 0xAF);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -93,9 +93,6 @@ static int set_var(struct fbtft_par *par)
|
||||
{
|
||||
if (par->fbtftops.init_display != init_display) {
|
||||
/* don't risk messing up register 11h */
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
|
||||
"%s: skipping since custom init_display() is used\n",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -148,9 +148,6 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
||||
|
||||
static int blank(struct fbtft_par *par, bool on)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
|
||||
__func__, on ? "true" : "false");
|
||||
|
||||
if (on)
|
||||
write_reg(par, 0xAE);
|
||||
else
|
||||
|
||||
@@ -72,10 +72,6 @@ static uint8_t rgb565_to_g16(u16 pixel)
|
||||
|
||||
static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_SET_ADDR_WIN, par,
|
||||
"%s(xs=%d, ys=%d, xe=%d, ye=%d)\n", __func__, xs, ys, xe,
|
||||
ye);
|
||||
|
||||
write_reg(par, 0x75);
|
||||
write_reg(par, 0x00);
|
||||
write_reg(par, 0x3f);
|
||||
@@ -86,9 +82,6 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
||||
|
||||
static int blank(struct fbtft_par *par, bool on)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
|
||||
__func__, on ? "true" : "false");
|
||||
|
||||
if (on)
|
||||
write_reg(par, 0xAE);
|
||||
else
|
||||
@@ -109,8 +102,6 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
|
||||
{
|
||||
int i;
|
||||
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
|
||||
|
||||
for (i = 0; i < GAMMA_LEN; i++) {
|
||||
if (i > 0 && curves[i] < 1) {
|
||||
dev_err(par->info->device,
|
||||
|
||||
@@ -167,8 +167,6 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
|
||||
|
||||
static int blank(struct fbtft_par *par, bool on)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
|
||||
__func__, on ? "true" : "false");
|
||||
if (on)
|
||||
write_reg(par, 0xAE);
|
||||
else
|
||||
|
||||
@@ -72,9 +72,6 @@ static int set_var(struct fbtft_par *par)
|
||||
|
||||
if (par->fbtftops.init_display != init_display) {
|
||||
/* don't risk messing up register A0h */
|
||||
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par,
|
||||
"%s: skipping since custom init_display() is used\n",
|
||||
__func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -213,7 +210,7 @@ static void register_onboard_backlight(struct fbtft_par *par)
|
||||
struct backlight_properties bl_props = { 0, };
|
||||
|
||||
bl_props.type = BACKLIGHT_RAW;
|
||||
bl_props.power = FB_BLANK_POWERDOWN;
|
||||
bl_props.power = BACKLIGHT_POWER_OFF;
|
||||
|
||||
bd = backlight_device_register(dev_driver_string(par->info->device),
|
||||
par->info->device, par, &bl_ops,
|
||||
|
||||
@@ -135,9 +135,6 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye)
|
||||
|
||||
static int blank(struct fbtft_par *par, bool on)
|
||||
{
|
||||
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
|
||||
__func__, on ? "true" : "false");
|
||||
|
||||
if (on)
|
||||
write_reg(par, 0xA8 | 0x00);
|
||||
else
|
||||
|
||||
@@ -129,9 +129,6 @@ int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
|
||||
int ret = 0;
|
||||
size_t startbyte_size = 0;
|
||||
|
||||
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
|
||||
__func__, offset, len);
|
||||
|
||||
remain = len / 2;
|
||||
vmem16 = (u16 *)(par->info->screen_buffer + offset);
|
||||
|
||||
@@ -182,9 +179,6 @@ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len)
|
||||
int i;
|
||||
int ret = 0;
|
||||
|
||||
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
|
||||
__func__, offset, len);
|
||||
|
||||
if (!par->txbuf.buf) {
|
||||
dev_err(par->info->device, "%s: txbuf.buf is NULL\n", __func__);
|
||||
return -1;
|
||||
@@ -232,9 +226,6 @@ int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len)
|
||||
{
|
||||
u16 *vmem16;
|
||||
|
||||
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
|
||||
__func__, offset, len);
|
||||
|
||||
vmem16 = (u16 *)(par->info->screen_buffer + offset);
|
||||
|
||||
/* no need for buffered write with 16-bit bus */
|
||||
|
||||
@@ -152,7 +152,7 @@ static int fbtft_backlight_get_brightness(struct backlight_device *bd)
|
||||
void fbtft_unregister_backlight(struct fbtft_par *par)
|
||||
{
|
||||
if (par->info->bl_dev) {
|
||||
par->info->bl_dev->props.power = FB_BLANK_POWERDOWN;
|
||||
par->info->bl_dev->props.power = BACKLIGHT_POWER_OFF;
|
||||
backlight_update_status(par->info->bl_dev);
|
||||
backlight_device_unregister(par->info->bl_dev);
|
||||
par->info->bl_dev = NULL;
|
||||
@@ -178,7 +178,7 @@ void fbtft_register_backlight(struct fbtft_par *par)
|
||||
|
||||
bl_props.type = BACKLIGHT_RAW;
|
||||
/* Assume backlight is off, get polarity from current state of pin */
|
||||
bl_props.power = FB_BLANK_POWERDOWN;
|
||||
bl_props.power = BACKLIGHT_POWER_OFF;
|
||||
if (!gpiod_get_value(par->gpio.led[0]))
|
||||
par->polarity = true;
|
||||
|
||||
@@ -215,8 +215,6 @@ static void fbtft_reset(struct fbtft_par *par)
|
||||
if (!par->gpio.reset)
|
||||
return;
|
||||
|
||||
fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__);
|
||||
|
||||
gpiod_set_value_cansleep(par->gpio.reset, 1);
|
||||
usleep_range(20, 40);
|
||||
gpiod_set_value_cansleep(par->gpio.reset, 0);
|
||||
@@ -801,7 +799,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
|
||||
|
||||
/* Turn on backlight if available */
|
||||
if (fb_info->bl_dev) {
|
||||
fb_info->bl_dev->props.power = FB_BLANK_UNBLANK;
|
||||
fb_info->bl_dev->props.power = BACKLIGHT_POWER_ON;
|
||||
fb_info->bl_dev->ops->update_status(fb_info->bl_dev);
|
||||
}
|
||||
|
||||
@@ -1052,8 +1050,6 @@ static int fbtft_verify_gpios(struct fbtft_par *par)
|
||||
struct fbtft_platform_data *pdata = par->pdata;
|
||||
int i;
|
||||
|
||||
fbtft_par_dbg(DEBUG_VERIFY_GPIOS, par, "%s()\n", __func__);
|
||||
|
||||
if (pdata->display.buswidth != 9 && par->startbyte == 0 &&
|
||||
!par->gpio.dc) {
|
||||
dev_err(par->info->device,
|
||||
@@ -1157,9 +1153,6 @@ int fbtft_probe_common(struct fbtft_display *display,
|
||||
else
|
||||
dev = &pdev->dev;
|
||||
|
||||
if (unlikely(display->debug & DEBUG_DRIVER_INIT_FUNCTIONS))
|
||||
dev_info(dev, "%s()\n", __func__);
|
||||
|
||||
pdata = dev->platform_data;
|
||||
if (!pdata) {
|
||||
pdata = fbtft_properties_read(dev);
|
||||
|
||||
@@ -27,13 +27,9 @@ int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves,
|
||||
int curve_counter, value_counter;
|
||||
int _count;
|
||||
|
||||
fbtft_par_dbg(DEBUG_SYSFS, par, "%s() str=\n", __func__);
|
||||
|
||||
if (!str || !curves)
|
||||
return -EINVAL;
|
||||
|
||||
fbtft_par_dbg(DEBUG_SYSFS, par, "%s\n", str);
|
||||
|
||||
tmp = kmemdup(str, size + 1, GFP_KERNEL);
|
||||
if (!tmp)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -202,6 +202,7 @@ struct fbtft_par {
|
||||
u8 *buf;
|
||||
u8 startbyte;
|
||||
struct fbtft_ops fbtftops;
|
||||
/* Spinlock to ensure thread-safe access to dirty_lines_start and dirty_lines_end */
|
||||
spinlock_t dirty_lock;
|
||||
unsigned int dirty_lines_start;
|
||||
unsigned int dirty_lines_end;
|
||||
@@ -218,6 +219,7 @@ struct fbtft_par {
|
||||
} gpio;
|
||||
const s16 *init_sequence;
|
||||
struct {
|
||||
/* Mutex to synchronize access to gamma curve locking */
|
||||
struct mutex lock;
|
||||
u32 *curves;
|
||||
int num_values;
|
||||
|
||||
@@ -92,8 +92,8 @@ struct gb_camera_ops {
|
||||
unsigned int *flags, struct gb_camera_stream *streams,
|
||||
struct gb_camera_csi_params *csi_params);
|
||||
int (*capture)(void *priv, u32 request_id,
|
||||
unsigned int streams, unsigned int num_frames,
|
||||
size_t settings_size, const void *settings);
|
||||
unsigned int streams, unsigned int num_frames,
|
||||
size_t settings_size, const void *settings);
|
||||
int (*flush)(void *priv, u32 *request_id);
|
||||
};
|
||||
|
||||
|
||||
@@ -490,10 +490,10 @@ int gb_spilib_master_init(struct gb_connection *connection, struct device *dev,
|
||||
int ret;
|
||||
u8 i;
|
||||
|
||||
/* Allocate master with space for data */
|
||||
ctlr = spi_alloc_master(dev, sizeof(*spi));
|
||||
/* Allocate host with space for data */
|
||||
ctlr = spi_alloc_host(dev, sizeof(*spi));
|
||||
if (!ctlr) {
|
||||
dev_err(dev, "cannot alloc SPI master\n");
|
||||
dev_err(dev, "cannot alloc SPI host\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
config KS7010
|
||||
tristate "KeyStream KS7010 SDIO support"
|
||||
depends on MMC && WIRELESS
|
||||
select WIRELESS_EXT
|
||||
select WEXT_PRIV
|
||||
select FW_LOADER
|
||||
select CRYPTO
|
||||
select CRYPTO_HASH
|
||||
select CRYPTO_MICHAEL_MIC
|
||||
help
|
||||
This is a driver for KeyStream KS7010 based SDIO WIFI cards. It is
|
||||
found on at least later Spectec SDW-821 (FCC-ID "S2Y-WLAN-11G-K" only,
|
||||
sadly not FCC-ID "S2Y-WLAN-11B-G") and Spectec SDW-823 microSD cards.
|
||||
@@ -1,4 +0,0 @@
|
||||
# SPDX-License-Identifier: GPL-2.0
|
||||
obj-$(CONFIG_KS7010) += ks7010.o
|
||||
|
||||
ks7010-y := ks_hostif.o ks_wlan_net.o ks7010_sdio.o
|
||||
@@ -1,36 +0,0 @@
|
||||
KS7010 Linux driver
|
||||
===================
|
||||
|
||||
This driver is based on source code from the Ben Nanonote extra repository [1]
|
||||
which is based on the original v007 release from Renesas [2]. Some more
|
||||
background info about the chipset can be found here [3] and here [4]. Thank
|
||||
you to all which already participated in cleaning up the driver so far!
|
||||
|
||||
[1] http://projects.qi-hardware.com/index.php/p/openwrt-packages/source/tree/master/ks7010/src
|
||||
[2] http://downloads.qi-hardware.com/software/ks7010_sdio_v007.tar.bz2
|
||||
[3] http://en.qi-hardware.com/wiki/Ben_NanoNote_Wi-Fi
|
||||
[4] https://wikidevi.com/wiki/Renesas
|
||||
|
||||
TODO
|
||||
----
|
||||
|
||||
First a few words what not to do (at least not blindly):
|
||||
|
||||
- don't be overly strict with the 80 char limit. Only if it REALLY makes the
|
||||
code more readable
|
||||
|
||||
Now the TODOs:
|
||||
|
||||
- fix codechecker warnings (checkpatch, sparse, smatch). But PLEASE make sure
|
||||
that you are not only silencing the warning but really fixing code. You
|
||||
should understand the change you submit.
|
||||
- fix the 'card removal' event when card is inserted when booting
|
||||
- check what other upstream wireless mechanisms can be used instead of the
|
||||
custom ones here
|
||||
- Switch to use LIB80211.
|
||||
- Switch to use MAC80211.
|
||||
- Switch to use CFG80211.
|
||||
|
||||
Please send any patches to:
|
||||
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
||||
Linux Driver Project Developer List <driverdev-devel@linuxdriverproject.org>
|
||||
@@ -1,70 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
#ifndef EAP_PACKET_H
|
||||
#define EAP_PACKET_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/bitops.h>
|
||||
#include <uapi/linux/if_ether.h>
|
||||
|
||||
struct ether_hdr {
|
||||
unsigned char h_dest[ETH_ALEN]; /* destination eth addr */
|
||||
unsigned char h_source[ETH_ALEN]; /* source ether addr */
|
||||
unsigned char h_dest_snap;
|
||||
unsigned char h_source_snap;
|
||||
unsigned char h_command;
|
||||
unsigned char h_vendor_id[3];
|
||||
__be16 h_proto; /* packet type ID field */
|
||||
/* followed by length octets of data */
|
||||
} __packed;
|
||||
|
||||
#define ETHER_HDR_SIZE sizeof(struct ether_hdr)
|
||||
|
||||
struct ieee802_1x_hdr {
|
||||
unsigned char version;
|
||||
unsigned char type;
|
||||
unsigned short length;
|
||||
/* followed by length octets of data */
|
||||
} __packed;
|
||||
|
||||
enum {
|
||||
IEEE802_1X_TYPE_EAP_PACKET = 0,
|
||||
IEEE802_1X_TYPE_EAPOL_START = 1,
|
||||
IEEE802_1X_TYPE_EAPOL_LOGOFF = 2,
|
||||
IEEE802_1X_TYPE_EAPOL_KEY = 3,
|
||||
IEEE802_1X_TYPE_EAPOL_ENCAPSULATED_ASF_ALERT = 4
|
||||
};
|
||||
|
||||
#define WPA_NONCE_LEN 32
|
||||
#define WPA_REPLAY_COUNTER_LEN 8
|
||||
|
||||
struct wpa_eapol_key {
|
||||
unsigned char type;
|
||||
__be16 key_info;
|
||||
unsigned short key_length;
|
||||
unsigned char replay_counter[WPA_REPLAY_COUNTER_LEN];
|
||||
unsigned char key_nonce[WPA_NONCE_LEN];
|
||||
unsigned char key_iv[16];
|
||||
unsigned char key_rsc[8];
|
||||
unsigned char key_id[8]; /* Reserved in IEEE 802.11i/RSN */
|
||||
unsigned char key_mic[16];
|
||||
unsigned short key_data_length;
|
||||
/* followed by key_data_length bytes of key_data */
|
||||
} __packed;
|
||||
|
||||
#define WPA_KEY_INFO_TYPE_MASK GENMASK(2, 0)
|
||||
#define WPA_KEY_INFO_TYPE_HMAC_MD5_RC4 BIT(0)
|
||||
#define WPA_KEY_INFO_TYPE_HMAC_SHA1_AES BIT(1)
|
||||
#define WPA_KEY_INFO_KEY_TYPE BIT(3) /* 1 = Pairwise, 0 = Group key */
|
||||
/* bit4..5 is used in WPA, but is reserved in IEEE 802.11i/RSN */
|
||||
#define WPA_KEY_INFO_KEY_INDEX_MASK GENMASK(5, 4)
|
||||
#define WPA_KEY_INFO_KEY_INDEX_SHIFT 4
|
||||
#define WPA_KEY_INFO_INSTALL BIT(6) /* pairwise */
|
||||
#define WPA_KEY_INFO_TXRX BIT(6) /* group */
|
||||
#define WPA_KEY_INFO_ACK BIT(7)
|
||||
#define WPA_KEY_INFO_MIC BIT(8)
|
||||
#define WPA_KEY_INFO_SECURE BIT(9)
|
||||
#define WPA_KEY_INFO_ERROR BIT(10)
|
||||
#define WPA_KEY_INFO_REQUEST BIT(11)
|
||||
#define WPA_KEY_INFO_ENCR_KEY_DATA BIT(12) /* IEEE 802.11i/RSN only */
|
||||
|
||||
#endif /* EAP_PACKET_H */
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,617 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Driver for KeyStream wireless LAN
|
||||
*
|
||||
* Copyright (c) 2005-2008 KeyStream Corp.
|
||||
* Copyright (C) 2009 Renesas Technology Corp.
|
||||
*/
|
||||
|
||||
#ifndef _KS_HOSTIF_H_
|
||||
#define _KS_HOSTIF_H_
|
||||
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/ieee80211.h>
|
||||
|
||||
/*
|
||||
* HOST-MAC I/F events
|
||||
*/
|
||||
#define HIF_DATA_REQ 0xE001
|
||||
#define HIF_DATA_IND 0xE801
|
||||
#define HIF_MIB_GET_REQ 0xE002
|
||||
#define HIF_MIB_GET_CONF 0xE802
|
||||
#define HIF_MIB_SET_REQ 0xE003
|
||||
#define HIF_MIB_SET_CONF 0xE803
|
||||
#define HIF_POWER_MGMT_REQ 0xE004
|
||||
#define HIF_POWER_MGMT_CONF 0xE804
|
||||
#define HIF_START_REQ 0xE005
|
||||
#define HIF_START_CONF 0xE805
|
||||
#define HIF_CONNECT_IND 0xE806
|
||||
#define HIF_STOP_REQ 0xE006
|
||||
#define HIF_STOP_CONF 0xE807
|
||||
#define HIF_PS_ADH_SET_REQ 0xE007
|
||||
#define HIF_PS_ADH_SET_CONF 0xE808
|
||||
#define HIF_INFRA_SET_REQ 0xE008
|
||||
#define HIF_INFRA_SET_CONF 0xE809
|
||||
#define HIF_ADH_SET_REQ 0xE009
|
||||
#define HIF_ADH_SET_CONF 0xE80A
|
||||
#define HIF_AP_SET_REQ 0xE00A
|
||||
#define HIF_AP_SET_CONF 0xE80B
|
||||
#define HIF_ASSOC_INFO_IND 0xE80C
|
||||
#define HIF_MIC_FAILURE_REQ 0xE00B
|
||||
#define HIF_MIC_FAILURE_CONF 0xE80D
|
||||
#define HIF_SCAN_REQ 0xE00C
|
||||
#define HIF_SCAN_CONF 0xE80E
|
||||
#define HIF_PHY_INFO_REQ 0xE00D
|
||||
#define HIF_PHY_INFO_CONF 0xE80F
|
||||
#define HIF_SLEEP_REQ 0xE00E
|
||||
#define HIF_SLEEP_CONF 0xE810
|
||||
#define HIF_PHY_INFO_IND 0xE811
|
||||
#define HIF_SCAN_IND 0xE812
|
||||
#define HIF_INFRA_SET2_REQ 0xE00F
|
||||
#define HIF_INFRA_SET2_CONF 0xE813
|
||||
#define HIF_ADH_SET2_REQ 0xE010
|
||||
#define HIF_ADH_SET2_CONF 0xE814
|
||||
|
||||
#define HIF_REQ_MAX 0xE010
|
||||
|
||||
/*
|
||||
* HOST-MAC I/F data structure
|
||||
* Byte alignment Little Endian
|
||||
*/
|
||||
|
||||
struct hostif_hdr {
|
||||
__le16 size;
|
||||
__le16 event;
|
||||
} __packed;
|
||||
|
||||
struct hostif_data_request {
|
||||
struct hostif_hdr header;
|
||||
__le16 auth_type;
|
||||
#define TYPE_DATA 0x0000
|
||||
#define TYPE_AUTH 0x0001
|
||||
__le16 reserved;
|
||||
u8 data[];
|
||||
} __packed;
|
||||
|
||||
#define TYPE_PMK1 0x0001
|
||||
#define TYPE_GMK1 0x0002
|
||||
#define TYPE_GMK2 0x0003
|
||||
|
||||
#define CHANNEL_LIST_MAX_SIZE 14
|
||||
struct channel_list {
|
||||
u8 size;
|
||||
u8 body[CHANNEL_LIST_MAX_SIZE];
|
||||
u8 pad;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* enum mib_attribute - Management Information Base attribute
|
||||
* Attribute value used for accessing and updating MIB
|
||||
*
|
||||
* @DOT11_MAC_ADDRESS: MAC Address (R)
|
||||
* @DOT11_PRODUCT_VERSION: FirmWare Version (R)
|
||||
* @DOT11_RTS_THRESHOLD: RTS Threshold (R/W)
|
||||
* @DOT11_FRAGMENTATION_THRESHOLD: Fragment Threshold (R/W)
|
||||
* @DOT11_PRIVACY_INVOKED: WEP ON/OFF (W)
|
||||
* @DOT11_WEP_DEFAULT_KEY_ID: WEP Index (W)
|
||||
* @DOT11_WEP_DEFAULT_KEY_VALUE1: WEP Key#1(TKIP AES: PairwiseTemporalKey) (W)
|
||||
* @DOT11_WEP_DEFAULT_KEY_VALUE2: WEP Key#2(TKIP AES: GroupKey1) (W)
|
||||
* @DOT11_WEP_DEFAULT_KEY_VALUE3: WEP Key#3(TKIP AES: GroupKey2) (W)
|
||||
* @DOT11_WEP_DEFAULT_KEY_VALUE4: WEP Key#4 (W)
|
||||
* @DOT11_WEP_LIST: WEP LIST
|
||||
* @DOT11_DESIRED_SSID: SSID
|
||||
* @DOT11_CURRENT_CHANNEL: channel set
|
||||
* @DOT11_OPERATION_RATE_SET: rate set
|
||||
* @LOCAL_AP_SEARCH_INTERVAL: AP search interval (R/W)
|
||||
* @LOCAL_CURRENTADDRESS: MAC Address change (W)
|
||||
* @LOCAL_MULTICAST_ADDRESS: Multicast Address (W)
|
||||
* @LOCAL_MULTICAST_FILTER: Multicast Address Filter enable/disable (W)
|
||||
* @LOCAL_SEARCHED_AP_LIST: AP list (R)
|
||||
* @LOCAL_LINK_AP_STATUS: Link AP status (R)
|
||||
* @LOCAL_PACKET_STATISTICS: tx,rx packets statistics
|
||||
* @LOCAL_AP_SCAN_LIST_TYPE_SET: AP_SCAN_LIST_TYPE
|
||||
* @DOT11_RSN_ENABLED: WPA enable/disable (W)
|
||||
* @LOCAL_RSN_MODE: RSN mode WPA/WPA2 (W)
|
||||
* @DOT11_RSN_CONFIG_MULTICAST_CIPHER: GroupKeyCipherSuite (W)
|
||||
* @DOT11_RSN_CONFIG_UNICAST_CIPHER: PairwiseKeyCipherSuite (W)
|
||||
* @DOT11_RSN_CONFIG_AUTH_SUITE: AuthenticationKeyManagementSuite (W)
|
||||
* @DOT11_RSN_CONFIG_VERSION: RSN version (W)
|
||||
* @LOCAL_RSN_CONFIG_ALL: RSN CONFIG ALL (W)
|
||||
* @DOT11_PMK_TSC: PMK_TSC (W)
|
||||
* @DOT11_GMK1_TSC: GMK1_TSC (W)
|
||||
* @DOT11_GMK2_TSC: GMK2_TSC (W)
|
||||
* @DOT11_GMK3_TSC: GMK3_TSC
|
||||
* @LOCAL_PMK: Pairwise Master Key cache (W)
|
||||
* @LOCAL_REGION: Region setting
|
||||
* @LOCAL_WPS_ENABLE: WiFi Protected Setup
|
||||
* @LOCAL_WPS_PROBE_REQ: WPS Probe Request
|
||||
* @LOCAL_GAIN: Carrer sense threshold for demo ato show
|
||||
* @LOCAL_EEPROM_SUM: EEPROM checksum information
|
||||
*/
|
||||
enum mib_attribute {
|
||||
DOT11_MAC_ADDRESS = 0x21010100,
|
||||
DOT11_PRODUCT_VERSION = 0x31024100,
|
||||
DOT11_RTS_THRESHOLD = 0x21020100,
|
||||
DOT11_FRAGMENTATION_THRESHOLD = 0x21050100,
|
||||
DOT11_PRIVACY_INVOKED = 0x15010100,
|
||||
DOT11_WEP_DEFAULT_KEY_ID = 0x15020100,
|
||||
DOT11_WEP_DEFAULT_KEY_VALUE1 = 0x13020101,
|
||||
DOT11_WEP_DEFAULT_KEY_VALUE2 = 0x13020102,
|
||||
DOT11_WEP_DEFAULT_KEY_VALUE3 = 0x13020103,
|
||||
DOT11_WEP_DEFAULT_KEY_VALUE4 = 0x13020104,
|
||||
DOT11_WEP_LIST = 0x13020100,
|
||||
DOT11_DESIRED_SSID = 0x11090100,
|
||||
DOT11_CURRENT_CHANNEL = 0x45010100,
|
||||
DOT11_OPERATION_RATE_SET = 0x11110100,
|
||||
LOCAL_AP_SEARCH_INTERVAL = 0xF1010100,
|
||||
LOCAL_CURRENTADDRESS = 0xF1050100,
|
||||
LOCAL_MULTICAST_ADDRESS = 0xF1060100,
|
||||
LOCAL_MULTICAST_FILTER = 0xF1060200,
|
||||
LOCAL_SEARCHED_AP_LIST = 0xF1030100,
|
||||
LOCAL_LINK_AP_STATUS = 0xF1040100,
|
||||
LOCAL_PACKET_STATISTICS = 0xF1020100,
|
||||
LOCAL_AP_SCAN_LIST_TYPE_SET = 0xF1030200,
|
||||
DOT11_RSN_ENABLED = 0x15070100,
|
||||
LOCAL_RSN_MODE = 0x56010100,
|
||||
DOT11_RSN_CONFIG_MULTICAST_CIPHER = 0x51040100,
|
||||
DOT11_RSN_CONFIG_UNICAST_CIPHER = 0x52020100,
|
||||
DOT11_RSN_CONFIG_AUTH_SUITE = 0x53020100,
|
||||
DOT11_RSN_CONFIG_VERSION = 0x51020100,
|
||||
LOCAL_RSN_CONFIG_ALL = 0x5F010100,
|
||||
DOT11_PMK_TSC = 0x55010100,
|
||||
DOT11_GMK1_TSC = 0x55010101,
|
||||
DOT11_GMK2_TSC = 0x55010102,
|
||||
DOT11_GMK3_TSC = 0x55010103,
|
||||
LOCAL_PMK = 0x58010100,
|
||||
LOCAL_REGION = 0xF10A0100,
|
||||
LOCAL_WPS_ENABLE = 0xF10B0100,
|
||||
LOCAL_WPS_PROBE_REQ = 0xF10C0100,
|
||||
LOCAL_GAIN = 0xF10D0100,
|
||||
LOCAL_EEPROM_SUM = 0xF10E0100
|
||||
};
|
||||
|
||||
struct hostif_mib_get_request {
|
||||
struct hostif_hdr header;
|
||||
__le32 mib_attribute;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* enum mib_data_type - Message Information Base data type.
|
||||
* @MIB_VALUE_TYPE_NULL: NULL type
|
||||
* @MIB_VALUE_TYPE_INT: INTEGER type
|
||||
* @MIB_VALUE_TYPE_BOOL: BOOL type
|
||||
* @MIB_VALUE_TYPE_COUNT32: unused
|
||||
* @MIB_VALUE_TYPE_OSTRING: Chunk of memory
|
||||
*/
|
||||
enum mib_data_type {
|
||||
MIB_VALUE_TYPE_NULL = 0,
|
||||
MIB_VALUE_TYPE_INT,
|
||||
MIB_VALUE_TYPE_BOOL,
|
||||
MIB_VALUE_TYPE_COUNT32,
|
||||
MIB_VALUE_TYPE_OSTRING
|
||||
};
|
||||
|
||||
struct hostif_mib_value {
|
||||
__le16 size;
|
||||
__le16 type;
|
||||
u8 body[];
|
||||
} __packed;
|
||||
|
||||
struct hostif_mib_get_confirm_t {
|
||||
struct hostif_hdr header;
|
||||
__le32 mib_status;
|
||||
#define MIB_SUCCESS 0
|
||||
#define MIB_INVALID 1
|
||||
#define MIB_READ_ONLY 2
|
||||
#define MIB_WRITE_ONLY 3
|
||||
__le32 mib_attribute;
|
||||
struct hostif_mib_value mib_value;
|
||||
} __packed;
|
||||
|
||||
struct hostif_mib_set_request_t {
|
||||
struct hostif_hdr header;
|
||||
__le32 mib_attribute;
|
||||
struct hostif_mib_value mib_value;
|
||||
} __packed;
|
||||
|
||||
struct hostif_power_mgmt_request {
|
||||
struct hostif_hdr header;
|
||||
__le32 mode;
|
||||
#define POWER_ACTIVE 1
|
||||
#define POWER_SAVE 2
|
||||
__le32 wake_up;
|
||||
#define SLEEP_FALSE 0
|
||||
#define SLEEP_TRUE 1 /* not used */
|
||||
__le32 receive_dtims;
|
||||
#define DTIM_FALSE 0
|
||||
#define DTIM_TRUE 1
|
||||
} __packed;
|
||||
|
||||
enum power_mgmt_mode_type {
|
||||
POWER_MGMT_ACTIVE,
|
||||
POWER_MGMT_SAVE1,
|
||||
POWER_MGMT_SAVE2
|
||||
};
|
||||
|
||||
#define RESULT_SUCCESS 0
|
||||
#define RESULT_INVALID_PARAMETERS 1
|
||||
#define RESULT_NOT_SUPPORTED 2
|
||||
/* #define RESULT_ALREADY_RUNNING 3 */
|
||||
#define RESULT_ALREADY_RUNNING 7
|
||||
|
||||
struct hostif_start_request {
|
||||
struct hostif_hdr header;
|
||||
__le16 mode;
|
||||
#define MODE_PSEUDO_ADHOC 0
|
||||
#define MODE_INFRASTRUCTURE 1
|
||||
#define MODE_AP 2 /* not used */
|
||||
#define MODE_ADHOC 3
|
||||
} __packed;
|
||||
|
||||
struct ssid {
|
||||
u8 size;
|
||||
u8 body[IEEE80211_MAX_SSID_LEN];
|
||||
u8 ssid_pad;
|
||||
} __packed;
|
||||
|
||||
#define RATE_SET_MAX_SIZE 16
|
||||
struct rate_set8 {
|
||||
u8 size;
|
||||
u8 body[8];
|
||||
u8 rate_pad;
|
||||
} __packed;
|
||||
|
||||
struct fh_parms {
|
||||
__le16 dwell_time;
|
||||
u8 hop_set;
|
||||
u8 hop_pattern;
|
||||
u8 hop_index;
|
||||
} __packed;
|
||||
|
||||
struct ds_parms {
|
||||
u8 channel;
|
||||
} __packed;
|
||||
|
||||
struct cf_parms {
|
||||
u8 count;
|
||||
u8 period;
|
||||
__le16 max_duration;
|
||||
__le16 dur_remaining;
|
||||
} __packed;
|
||||
|
||||
struct ibss_parms {
|
||||
__le16 atim_window;
|
||||
} __packed;
|
||||
|
||||
struct rsn_t {
|
||||
u8 size;
|
||||
#define RSN_BODY_SIZE 64
|
||||
u8 body[RSN_BODY_SIZE];
|
||||
} __packed;
|
||||
|
||||
struct erp_params_t {
|
||||
u8 erp_info;
|
||||
} __packed;
|
||||
|
||||
struct rate_set16 {
|
||||
u8 size;
|
||||
u8 body[16];
|
||||
u8 rate_pad;
|
||||
} __packed;
|
||||
|
||||
struct ap_info {
|
||||
u8 bssid[6]; /* +00 */
|
||||
u8 rssi; /* +06 */
|
||||
u8 sq; /* +07 */
|
||||
u8 noise; /* +08 */
|
||||
u8 pad0; /* +09 */
|
||||
__le16 beacon_period; /* +10 */
|
||||
__le16 capability; /* +12 */
|
||||
u8 frame_type; /* +14 */
|
||||
u8 ch_info; /* +15 */
|
||||
__le16 body_size; /* +16 */
|
||||
u8 body[1024]; /* +18 */
|
||||
/* +1032 */
|
||||
} __packed;
|
||||
|
||||
struct link_ap_info {
|
||||
u8 bssid[6]; /* +00 */
|
||||
u8 rssi; /* +06 */
|
||||
u8 sq; /* +07 */
|
||||
u8 noise; /* +08 */
|
||||
u8 pad0; /* +09 */
|
||||
__le16 beacon_period; /* +10 */
|
||||
__le16 capability; /* +12 */
|
||||
struct rate_set8 rate_set; /* +14 */
|
||||
struct fh_parms fh_parameter; /* +24 */
|
||||
struct ds_parms ds_parameter; /* +29 */
|
||||
struct cf_parms cf_parameter; /* +30 */
|
||||
struct ibss_parms ibss_parameter; /* +36 */
|
||||
struct erp_params_t erp_parameter; /* +38 */
|
||||
u8 pad1; /* +39 */
|
||||
struct rate_set8 ext_rate_set; /* +40 */
|
||||
u8 DTIM_period; /* +50 */
|
||||
u8 rsn_mode; /* +51 */
|
||||
#define RSN_MODE_NONE 0
|
||||
#define RSN_MODE_WPA 1
|
||||
#define RSN_MODE_WPA2 2
|
||||
struct {
|
||||
u8 size; /* +52 */
|
||||
u8 body[128]; /* +53 */
|
||||
} __packed rsn;
|
||||
} __packed;
|
||||
|
||||
#define RESULT_CONNECT 0
|
||||
#define RESULT_DISCONNECT 1
|
||||
|
||||
struct hostif_stop_request {
|
||||
struct hostif_hdr header;
|
||||
} __packed;
|
||||
|
||||
#define D_11B_ONLY_MODE 0
|
||||
#define D_11G_ONLY_MODE 1
|
||||
#define D_11BG_COMPATIBLE_MODE 2
|
||||
#define D_11A_ONLY_MODE 3
|
||||
|
||||
#define CTS_MODE_FALSE 0
|
||||
#define CTS_MODE_TRUE 1
|
||||
|
||||
struct hostif_request {
|
||||
__le16 phy_type;
|
||||
__le16 cts_mode;
|
||||
__le16 scan_type;
|
||||
__le16 capability;
|
||||
struct rate_set16 rate_set;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct hostif_ps_adhoc_set_request - pseudo adhoc mode
|
||||
* @capability: bit5 : preamble
|
||||
* bit6 : pbcc - Not supported always 0
|
||||
* bit10 : ShortSlotTime
|
||||
* bit13 : DSSS-OFDM - Not supported always 0
|
||||
*/
|
||||
struct hostif_ps_adhoc_set_request {
|
||||
struct hostif_hdr header;
|
||||
struct hostif_request request;
|
||||
__le16 channel;
|
||||
} __packed;
|
||||
|
||||
#define AUTH_TYPE_OPEN_SYSTEM 0
|
||||
#define AUTH_TYPE_SHARED_KEY 1
|
||||
|
||||
/**
|
||||
* struct hostif_infrastructure_set_request
|
||||
* @capability: bit5 : preamble
|
||||
* bit6 : pbcc - Not supported always 0
|
||||
* bit10 : ShortSlotTime
|
||||
* bit13 : DSSS-OFDM - Not supported always 0
|
||||
*/
|
||||
struct hostif_infrastructure_set_request {
|
||||
struct hostif_hdr header;
|
||||
struct hostif_request request;
|
||||
struct ssid ssid;
|
||||
__le16 beacon_lost_count;
|
||||
__le16 auth_type;
|
||||
struct channel_list channel_list;
|
||||
u8 bssid[ETH_ALEN];
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct hostif_adhoc_set_request
|
||||
* @capability: bit5 : preamble
|
||||
* bit6 : pbcc - Not supported always 0
|
||||
* bit10 : ShortSlotTime
|
||||
* bit13 : DSSS-OFDM - Not supported always 0
|
||||
*/
|
||||
struct hostif_adhoc_set_request {
|
||||
struct hostif_hdr header;
|
||||
struct hostif_request request;
|
||||
struct ssid ssid;
|
||||
__le16 channel;
|
||||
} __packed;
|
||||
|
||||
/**
|
||||
* struct hostif_adhoc_set2_request
|
||||
* @capability: bit5 : preamble
|
||||
* bit6 : pbcc - Not supported always 0
|
||||
* bit10 : ShortSlotTime
|
||||
* bit13 : DSSS-OFDM - Not supported always 0
|
||||
*/
|
||||
struct hostif_adhoc_set2_request {
|
||||
struct hostif_hdr header;
|
||||
struct hostif_request request;
|
||||
__le16 reserved;
|
||||
struct ssid ssid;
|
||||
struct channel_list channel_list;
|
||||
u8 bssid[ETH_ALEN];
|
||||
} __packed;
|
||||
|
||||
struct association_request {
|
||||
u8 type;
|
||||
u8 pad;
|
||||
__le16 capability;
|
||||
__le16 listen_interval;
|
||||
u8 ap_address[6];
|
||||
__le16 req_ies_size;
|
||||
} __packed;
|
||||
|
||||
struct association_response {
|
||||
u8 type;
|
||||
u8 pad;
|
||||
__le16 capability;
|
||||
__le16 status;
|
||||
__le16 association_id;
|
||||
__le16 resp_ies_size;
|
||||
} __packed;
|
||||
|
||||
struct hostif_bss_scan_request {
|
||||
struct hostif_hdr header;
|
||||
u8 scan_type;
|
||||
#define ACTIVE_SCAN 0
|
||||
#define PASSIVE_SCAN 1
|
||||
u8 pad[3];
|
||||
__le32 ch_time_min;
|
||||
__le32 ch_time_max;
|
||||
struct channel_list channel_list;
|
||||
struct ssid ssid;
|
||||
} __packed;
|
||||
|
||||
struct hostif_phy_information_request {
|
||||
struct hostif_hdr header;
|
||||
__le16 type;
|
||||
#define NORMAL_TYPE 0
|
||||
#define TIME_TYPE 1
|
||||
__le16 time; /* unit 100ms */
|
||||
} __packed;
|
||||
|
||||
enum sleep_mode_type {
|
||||
SLP_ACTIVE,
|
||||
SLP_SLEEP
|
||||
};
|
||||
|
||||
struct hostif_sleep_request {
|
||||
struct hostif_hdr header;
|
||||
} __packed;
|
||||
|
||||
struct hostif_mic_failure_request {
|
||||
struct hostif_hdr header;
|
||||
__le16 failure_count;
|
||||
__le16 timer;
|
||||
} __packed;
|
||||
|
||||
#define BASIC_RATE 0x80
|
||||
#define RATE_MASK 0x7F
|
||||
|
||||
#define TX_RATE_AUTO 0xff
|
||||
#define TX_RATE_1M_FIXED 0
|
||||
#define TX_RATE_2M_FIXED 1
|
||||
#define TX_RATE_1_2M_AUTO 2
|
||||
#define TX_RATE_5M_FIXED 3
|
||||
#define TX_RATE_11M_FIXED 4
|
||||
|
||||
#define TX_RATE_FULL_AUTO 0
|
||||
#define TX_RATE_11_AUTO 1
|
||||
#define TX_RATE_11B_AUTO 2
|
||||
#define TX_RATE_11BG_AUTO 3
|
||||
#define TX_RATE_MANUAL_AUTO 4
|
||||
#define TX_RATE_FIXED 5
|
||||
|
||||
/* 11b rate */
|
||||
#define TX_RATE_1M ((u8)(10 / 5)) /* 11b 11g basic rate */
|
||||
#define TX_RATE_2M ((u8)(20 / 5)) /* 11b 11g basic rate */
|
||||
#define TX_RATE_5M ((u8)(55 / 5)) /* 11g basic rate */
|
||||
#define TX_RATE_11M ((u8)(110 / 5)) /* 11g basic rate */
|
||||
|
||||
/* 11g rate */
|
||||
#define TX_RATE_6M ((u8)(60 / 5)) /* 11g basic rate */
|
||||
#define TX_RATE_12M ((u8)(120 / 5)) /* 11g basic rate */
|
||||
#define TX_RATE_24M ((u8)(240 / 5)) /* 11g basic rate */
|
||||
#define TX_RATE_9M ((u8)(90 / 5))
|
||||
#define TX_RATE_18M ((u8)(180 / 5))
|
||||
#define TX_RATE_36M ((u8)(360 / 5))
|
||||
#define TX_RATE_48M ((u8)(480 / 5))
|
||||
#define TX_RATE_54M ((u8)(540 / 5))
|
||||
|
||||
static inline bool is_11b_rate(u8 rate)
|
||||
{
|
||||
return (((rate & RATE_MASK) == TX_RATE_1M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_2M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_5M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_11M));
|
||||
}
|
||||
|
||||
static inline bool is_ofdm_rate(u8 rate)
|
||||
{
|
||||
return (((rate & RATE_MASK) == TX_RATE_6M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_12M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_24M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_9M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_18M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_36M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_48M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_54M));
|
||||
}
|
||||
|
||||
static inline bool is_11bg_rate(u8 rate)
|
||||
{
|
||||
return (is_11b_rate(rate) || is_ofdm_rate(rate));
|
||||
}
|
||||
|
||||
static inline bool is_ofdm_ext_rate(u8 rate)
|
||||
{
|
||||
return (((rate & RATE_MASK) == TX_RATE_9M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_18M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_36M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_48M) ||
|
||||
((rate & RATE_MASK) == TX_RATE_54M));
|
||||
}
|
||||
|
||||
enum connect_status_type {
|
||||
CONNECT_STATUS,
|
||||
DISCONNECT_STATUS
|
||||
};
|
||||
|
||||
enum preamble_type {
|
||||
LONG_PREAMBLE,
|
||||
SHORT_PREAMBLE
|
||||
};
|
||||
|
||||
enum multicast_filter_type {
|
||||
MCAST_FILTER_MCAST,
|
||||
MCAST_FILTER_MCASTALL,
|
||||
MCAST_FILTER_PROMISC,
|
||||
};
|
||||
|
||||
#define NIC_MAX_MCAST_LIST 32
|
||||
|
||||
#define HIF_EVENT_MASK 0xE800
|
||||
|
||||
static inline bool is_hif_ind(unsigned short event)
|
||||
{
|
||||
return (((event & HIF_EVENT_MASK) == HIF_EVENT_MASK) &&
|
||||
(((event & ~HIF_EVENT_MASK) == 0x0001) ||
|
||||
((event & ~HIF_EVENT_MASK) == 0x0006) ||
|
||||
((event & ~HIF_EVENT_MASK) == 0x000C) ||
|
||||
((event & ~HIF_EVENT_MASK) == 0x0011) ||
|
||||
((event & ~HIF_EVENT_MASK) == 0x0012)));
|
||||
}
|
||||
|
||||
static inline bool is_hif_conf(unsigned short event)
|
||||
{
|
||||
return (((event & HIF_EVENT_MASK) == HIF_EVENT_MASK) &&
|
||||
((event & ~HIF_EVENT_MASK) > 0x0000) &&
|
||||
((event & ~HIF_EVENT_MASK) < 0x0012) &&
|
||||
!is_hif_ind(event));
|
||||
}
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include "ks_wlan.h"
|
||||
|
||||
/* function prototype */
|
||||
int hostif_data_request(struct ks_wlan_private *priv, struct sk_buff *skb);
|
||||
void hostif_receive(struct ks_wlan_private *priv, unsigned char *p,
|
||||
unsigned int size);
|
||||
void hostif_sme_enqueue(struct ks_wlan_private *priv, u16 event);
|
||||
int hostif_init(struct ks_wlan_private *priv);
|
||||
void hostif_exit(struct ks_wlan_private *priv);
|
||||
int ks_wlan_hw_tx(struct ks_wlan_private *priv, void *p, unsigned long size,
|
||||
void (*complete_handler)(struct ks_wlan_private *priv,
|
||||
struct sk_buff *skb),
|
||||
struct sk_buff *skb);
|
||||
void send_packet_complete(struct ks_wlan_private *priv, struct sk_buff *skb);
|
||||
|
||||
void ks_wlan_hw_wakeup_request(struct ks_wlan_private *priv);
|
||||
int ks_wlan_hw_power_save(struct ks_wlan_private *priv);
|
||||
|
||||
#define KS7010_SIZE_ALIGNMENT 32
|
||||
|
||||
static inline size_t hif_align_size(size_t size)
|
||||
{
|
||||
return ALIGN(size, KS7010_SIZE_ALIGNMENT);
|
||||
}
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _KS_HOSTIF_H_ */
|
||||
@@ -1,567 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Driver for KeyStream IEEE802.11 b/g wireless LAN cards.
|
||||
*
|
||||
* Copyright (C) 2006-2008 KeyStream Corp.
|
||||
* Copyright (C) 2009 Renesas Technology Corp.
|
||||
*/
|
||||
|
||||
#ifndef _KS_WLAN_H
|
||||
#define _KS_WLAN_H
|
||||
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/circ_buf.h>
|
||||
#include <linux/completion.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/wireless.h>
|
||||
|
||||
struct ks_wlan_parameter {
|
||||
u8 operation_mode;
|
||||
u8 channel;
|
||||
u8 tx_rate;
|
||||
struct {
|
||||
u8 size;
|
||||
u8 body[16];
|
||||
} rate_set;
|
||||
u8 bssid[ETH_ALEN];
|
||||
struct {
|
||||
u8 size;
|
||||
u8 body[32 + 1];
|
||||
} ssid;
|
||||
u8 preamble;
|
||||
u8 power_mgmt;
|
||||
u32 scan_type;
|
||||
#define BEACON_LOST_COUNT_MAX 65535
|
||||
u32 beacon_lost_count;
|
||||
u32 rts;
|
||||
u32 fragment;
|
||||
u32 privacy_invoked;
|
||||
u32 wep_index;
|
||||
struct {
|
||||
u8 size;
|
||||
u8 val[13 * 2 + 1];
|
||||
} wep_key[4];
|
||||
u16 authenticate_type;
|
||||
u16 phy_type;
|
||||
u16 cts_mode;
|
||||
u16 phy_info_timer;
|
||||
};
|
||||
|
||||
enum {
|
||||
DEVICE_STATE_OFF = 0, /* this means hw_unavailable is != 0 */
|
||||
DEVICE_STATE_PREBOOT, /* we are in a pre-boot state (empty RAM) */
|
||||
DEVICE_STATE_BOOT, /* boot state (fw upload, run fw) */
|
||||
DEVICE_STATE_PREINIT, /* pre-init state */
|
||||
DEVICE_STATE_INIT, /* init state (restore MIB backup to device) */
|
||||
DEVICE_STATE_READY, /* driver&device are in operational state */
|
||||
DEVICE_STATE_SLEEP /* device in sleep mode */
|
||||
};
|
||||
|
||||
/* SME flag */
|
||||
#define SME_MODE_SET BIT(0)
|
||||
#define SME_RTS BIT(1)
|
||||
#define SME_FRAG BIT(2)
|
||||
#define SME_WEP_FLAG BIT(3)
|
||||
#define SME_WEP_INDEX BIT(4)
|
||||
#define SME_WEP_VAL1 BIT(5)
|
||||
#define SME_WEP_VAL2 BIT(6)
|
||||
#define SME_WEP_VAL3 BIT(7)
|
||||
#define SME_WEP_VAL4 BIT(8)
|
||||
#define SME_WEP_VAL_MASK GENMASK(8, 5)
|
||||
#define SME_RSN BIT(9)
|
||||
#define SME_RSN_MULTICAST BIT(10)
|
||||
#define SME_RSN_UNICAST BIT(11)
|
||||
#define SME_RSN_AUTH BIT(12)
|
||||
|
||||
#define SME_AP_SCAN BIT(13)
|
||||
#define SME_MULTICAST BIT(14)
|
||||
|
||||
/* SME Event */
|
||||
enum {
|
||||
SME_START,
|
||||
|
||||
SME_MULTICAST_REQUEST,
|
||||
SME_MACADDRESS_SET_REQUEST,
|
||||
SME_BSS_SCAN_REQUEST,
|
||||
SME_SET_FLAG,
|
||||
SME_SET_TXKEY,
|
||||
SME_SET_KEY1,
|
||||
SME_SET_KEY2,
|
||||
SME_SET_KEY3,
|
||||
SME_SET_KEY4,
|
||||
SME_SET_PMK_TSC,
|
||||
SME_SET_GMK1_TSC,
|
||||
SME_SET_GMK2_TSC,
|
||||
SME_SET_GMK3_TSC,
|
||||
SME_SET_PMKSA,
|
||||
SME_POW_MNGMT_REQUEST,
|
||||
SME_PHY_INFO_REQUEST,
|
||||
SME_MIC_FAILURE_REQUEST,
|
||||
SME_GET_MAC_ADDRESS,
|
||||
SME_GET_PRODUCT_VERSION,
|
||||
SME_STOP_REQUEST,
|
||||
SME_RTS_THRESHOLD_REQUEST,
|
||||
SME_FRAGMENTATION_THRESHOLD_REQUEST,
|
||||
SME_WEP_INDEX_REQUEST,
|
||||
SME_WEP_KEY1_REQUEST,
|
||||
SME_WEP_KEY2_REQUEST,
|
||||
SME_WEP_KEY3_REQUEST,
|
||||
SME_WEP_KEY4_REQUEST,
|
||||
SME_WEP_FLAG_REQUEST,
|
||||
SME_RSN_UCAST_REQUEST,
|
||||
SME_RSN_MCAST_REQUEST,
|
||||
SME_RSN_AUTH_REQUEST,
|
||||
SME_RSN_ENABLED_REQUEST,
|
||||
SME_RSN_MODE_REQUEST,
|
||||
SME_WPS_ENABLE_REQUEST,
|
||||
SME_WPS_PROBE_REQUEST,
|
||||
SME_SET_GAIN,
|
||||
SME_GET_GAIN,
|
||||
SME_SLEEP_REQUEST,
|
||||
SME_SET_REGION,
|
||||
SME_MODE_SET_REQUEST,
|
||||
SME_START_REQUEST,
|
||||
SME_GET_EEPROM_CKSUM,
|
||||
|
||||
SME_MIC_FAILURE_CONFIRM,
|
||||
SME_START_CONFIRM,
|
||||
|
||||
SME_MULTICAST_CONFIRM,
|
||||
SME_BSS_SCAN_CONFIRM,
|
||||
SME_GET_CURRENT_AP,
|
||||
SME_POW_MNGMT_CONFIRM,
|
||||
SME_PHY_INFO_CONFIRM,
|
||||
SME_STOP_CONFIRM,
|
||||
SME_RTS_THRESHOLD_CONFIRM,
|
||||
SME_FRAGMENTATION_THRESHOLD_CONFIRM,
|
||||
SME_WEP_INDEX_CONFIRM,
|
||||
SME_WEP_KEY1_CONFIRM,
|
||||
SME_WEP_KEY2_CONFIRM,
|
||||
SME_WEP_KEY3_CONFIRM,
|
||||
SME_WEP_KEY4_CONFIRM,
|
||||
SME_WEP_FLAG_CONFIRM,
|
||||
SME_RSN_UCAST_CONFIRM,
|
||||
SME_RSN_MCAST_CONFIRM,
|
||||
SME_RSN_AUTH_CONFIRM,
|
||||
SME_RSN_ENABLED_CONFIRM,
|
||||
SME_RSN_MODE_CONFIRM,
|
||||
SME_MODE_SET_CONFIRM,
|
||||
SME_SLEEP_CONFIRM,
|
||||
|
||||
SME_RSN_SET_CONFIRM,
|
||||
SME_WEP_SET_CONFIRM,
|
||||
SME_TERMINATE,
|
||||
|
||||
SME_EVENT_SIZE
|
||||
};
|
||||
|
||||
/* SME Status */
|
||||
enum {
|
||||
SME_IDLE,
|
||||
SME_SETUP,
|
||||
SME_DISCONNECT,
|
||||
SME_CONNECT
|
||||
};
|
||||
|
||||
#define SME_EVENT_BUFF_SIZE 128
|
||||
|
||||
struct sme_info {
|
||||
int sme_status;
|
||||
int event_buff[SME_EVENT_BUFF_SIZE];
|
||||
unsigned int qhead;
|
||||
unsigned int qtail;
|
||||
spinlock_t sme_spin;
|
||||
unsigned long sme_flag;
|
||||
};
|
||||
|
||||
struct hostt {
|
||||
int buff[SME_EVENT_BUFF_SIZE];
|
||||
unsigned int qhead;
|
||||
unsigned int qtail;
|
||||
};
|
||||
|
||||
#define RSN_IE_BODY_MAX 64
|
||||
struct rsn_ie {
|
||||
u8 id; /* 0xdd = WPA or 0x30 = RSN */
|
||||
u8 size; /* max ? 255 ? */
|
||||
u8 body[RSN_IE_BODY_MAX];
|
||||
} __packed;
|
||||
|
||||
#define WPA_INFO_ELEM_ID 0xdd
|
||||
#define RSN_INFO_ELEM_ID 0x30
|
||||
|
||||
#define WPS_IE_BODY_MAX 255
|
||||
struct wps_ie {
|
||||
u8 id; /* 221 'dd <len> 00 50 F2 04' */
|
||||
u8 size; /* max ? 255 ? */
|
||||
u8 body[WPS_IE_BODY_MAX];
|
||||
} __packed;
|
||||
|
||||
struct local_ap {
|
||||
u8 bssid[6];
|
||||
u8 rssi;
|
||||
u8 sq;
|
||||
struct {
|
||||
u8 size;
|
||||
u8 body[32];
|
||||
u8 ssid_pad;
|
||||
} ssid;
|
||||
struct {
|
||||
u8 size;
|
||||
u8 body[16];
|
||||
u8 rate_pad;
|
||||
} rate_set;
|
||||
u16 capability;
|
||||
u8 channel;
|
||||
u8 noise;
|
||||
struct rsn_ie wpa_ie;
|
||||
struct rsn_ie rsn_ie;
|
||||
struct wps_ie wps_ie;
|
||||
};
|
||||
|
||||
#define LOCAL_APLIST_MAX 31
|
||||
#define LOCAL_CURRENT_AP LOCAL_APLIST_MAX
|
||||
struct local_aplist {
|
||||
int size;
|
||||
struct local_ap ap[LOCAL_APLIST_MAX + 1];
|
||||
};
|
||||
|
||||
struct local_gain {
|
||||
u8 tx_mode;
|
||||
u8 rx_mode;
|
||||
u8 tx_gain;
|
||||
u8 rx_gain;
|
||||
};
|
||||
|
||||
struct local_eeprom_sum {
|
||||
u8 type;
|
||||
u8 result;
|
||||
};
|
||||
|
||||
enum {
|
||||
EEPROM_OK,
|
||||
EEPROM_CHECKSUM_NONE,
|
||||
EEPROM_FW_NOT_SUPPORT,
|
||||
EEPROM_NG,
|
||||
};
|
||||
|
||||
/* Power Save Status */
|
||||
enum {
|
||||
PS_NONE,
|
||||
PS_ACTIVE_SET,
|
||||
PS_SAVE_SET,
|
||||
PS_CONF_WAIT,
|
||||
PS_SNOOZE,
|
||||
PS_WAKEUP
|
||||
};
|
||||
|
||||
struct power_save_status {
|
||||
atomic_t status; /* initialvalue 0 */
|
||||
struct completion wakeup_wait;
|
||||
atomic_t confirm_wait;
|
||||
atomic_t snooze_guard;
|
||||
};
|
||||
|
||||
struct sleep_status {
|
||||
atomic_t status; /* initialvalue 0 */
|
||||
atomic_t doze_request;
|
||||
atomic_t wakeup_request;
|
||||
};
|
||||
|
||||
/* WPA */
|
||||
struct scan_ext {
|
||||
unsigned int flag;
|
||||
char ssid[IW_ESSID_MAX_SIZE + 1];
|
||||
};
|
||||
|
||||
#define CIPHER_ID_WPA_NONE "\x00\x50\xf2\x00"
|
||||
#define CIPHER_ID_WPA_WEP40 "\x00\x50\xf2\x01"
|
||||
#define CIPHER_ID_WPA_TKIP "\x00\x50\xf2\x02"
|
||||
#define CIPHER_ID_WPA_CCMP "\x00\x50\xf2\x04"
|
||||
#define CIPHER_ID_WPA_WEP104 "\x00\x50\xf2\x05"
|
||||
|
||||
#define CIPHER_ID_WPA2_NONE "\x00\x0f\xac\x00"
|
||||
#define CIPHER_ID_WPA2_WEP40 "\x00\x0f\xac\x01"
|
||||
#define CIPHER_ID_WPA2_TKIP "\x00\x0f\xac\x02"
|
||||
#define CIPHER_ID_WPA2_CCMP "\x00\x0f\xac\x04"
|
||||
#define CIPHER_ID_WPA2_WEP104 "\x00\x0f\xac\x05"
|
||||
|
||||
#define CIPHER_ID_LEN 4
|
||||
|
||||
enum {
|
||||
KEY_MGMT_802_1X,
|
||||
KEY_MGMT_PSK,
|
||||
KEY_MGMT_WPANONE,
|
||||
};
|
||||
|
||||
#define KEY_MGMT_ID_WPA_NONE "\x00\x50\xf2\x00"
|
||||
#define KEY_MGMT_ID_WPA_1X "\x00\x50\xf2\x01"
|
||||
#define KEY_MGMT_ID_WPA_PSK "\x00\x50\xf2\x02"
|
||||
#define KEY_MGMT_ID_WPA_WPANONE "\x00\x50\xf2\xff"
|
||||
|
||||
#define KEY_MGMT_ID_WPA2_NONE "\x00\x0f\xac\x00"
|
||||
#define KEY_MGMT_ID_WPA2_1X "\x00\x0f\xac\x01"
|
||||
#define KEY_MGMT_ID_WPA2_PSK "\x00\x0f\xac\x02"
|
||||
#define KEY_MGMT_ID_WPA2_WPANONE "\x00\x0f\xac\xff"
|
||||
|
||||
#define KEY_MGMT_ID_LEN 4
|
||||
|
||||
#define MIC_KEY_SIZE 8
|
||||
|
||||
struct wpa_key {
|
||||
u32 ext_flags; /* IW_ENCODE_EXT_xxx */
|
||||
u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
|
||||
u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
|
||||
struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast
|
||||
* (group) keys or unicast address for
|
||||
* individual keys
|
||||
*/
|
||||
u16 alg;
|
||||
u16 key_len; /* WEP: 5 or 13, TKIP: 32, CCMP: 16 */
|
||||
u8 key_val[IW_ENCODING_TOKEN_MAX];
|
||||
u8 tx_mic_key[MIC_KEY_SIZE];
|
||||
u8 rx_mic_key[MIC_KEY_SIZE];
|
||||
};
|
||||
|
||||
#define WPA_KEY_INDEX_MAX 4
|
||||
#define WPA_RX_SEQ_LEN 6
|
||||
|
||||
struct mic_failure {
|
||||
u16 failure; /* MIC Failure counter 0 or 1 or 2 */
|
||||
u16 counter; /* 1sec counter 0-60 */
|
||||
u32 last_failure_time;
|
||||
int stop;
|
||||
};
|
||||
|
||||
struct wpa_status {
|
||||
int wpa_enabled;
|
||||
bool rsn_enabled;
|
||||
int version;
|
||||
int pairwise_suite; /* unicast cipher */
|
||||
int group_suite; /* multicast cipher */
|
||||
int key_mgmt_suite;
|
||||
int auth_alg;
|
||||
int txkey;
|
||||
struct wpa_key key[WPA_KEY_INDEX_MAX];
|
||||
struct scan_ext scan_ext;
|
||||
struct mic_failure mic_failure;
|
||||
};
|
||||
|
||||
#include <linux/list.h>
|
||||
#define PMK_LIST_MAX 8
|
||||
struct pmk_list {
|
||||
u16 size;
|
||||
struct list_head head;
|
||||
struct pmk {
|
||||
struct list_head list;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 pmkid[IW_PMKID_LEN];
|
||||
} pmk[PMK_LIST_MAX];
|
||||
};
|
||||
|
||||
struct wps_status {
|
||||
int wps_enabled;
|
||||
int ielen;
|
||||
u8 ie[255];
|
||||
};
|
||||
|
||||
/* Tx Device struct */
|
||||
#define TX_DEVICE_BUFF_SIZE 1024
|
||||
|
||||
struct ks_wlan_private;
|
||||
|
||||
/**
|
||||
* struct tx_device_buffer - Queue item for the tx queue.
|
||||
* @sendp: Pointer to the send request data.
|
||||
* @size: Size of @sendp data.
|
||||
* @complete_handler: Function called once data write to device is complete.
|
||||
* @arg1: First argument to @complete_handler.
|
||||
* @arg2: Second argument to @complete_handler.
|
||||
*/
|
||||
struct tx_device_buffer {
|
||||
unsigned char *sendp;
|
||||
unsigned int size;
|
||||
void (*complete_handler)(struct ks_wlan_private *priv,
|
||||
struct sk_buff *skb);
|
||||
struct sk_buff *skb;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct tx_device - Tx buffer queue.
|
||||
* @tx_device_buffer: Queue buffer.
|
||||
* @qhead: Head of tx queue.
|
||||
* @qtail: Tail of tx queue.
|
||||
* @tx_dev_lock: Queue lock.
|
||||
*/
|
||||
struct tx_device {
|
||||
struct tx_device_buffer tx_dev_buff[TX_DEVICE_BUFF_SIZE];
|
||||
unsigned int qhead;
|
||||
unsigned int qtail;
|
||||
spinlock_t tx_dev_lock; /* protect access to the queue */
|
||||
};
|
||||
|
||||
/* Rx Device struct */
|
||||
#define RX_DATA_SIZE (2 + 2 + 2347 + 1)
|
||||
#define RX_DEVICE_BUFF_SIZE 32
|
||||
|
||||
/**
|
||||
* struct rx_device_buffer - Queue item for the rx queue.
|
||||
* @data: rx data.
|
||||
* @size: Size of @data.
|
||||
*/
|
||||
struct rx_device_buffer {
|
||||
unsigned char data[RX_DATA_SIZE];
|
||||
unsigned int size;
|
||||
};
|
||||
|
||||
/**
|
||||
* struct rx_device - Rx buffer queue.
|
||||
* @rx_device_buffer: Queue buffer.
|
||||
* @qhead: Head of rx queue.
|
||||
* @qtail: Tail of rx queue.
|
||||
* @rx_dev_lock: Queue lock.
|
||||
*/
|
||||
struct rx_device {
|
||||
struct rx_device_buffer rx_dev_buff[RX_DEVICE_BUFF_SIZE];
|
||||
unsigned int qhead;
|
||||
unsigned int qtail;
|
||||
spinlock_t rx_dev_lock; /* protect access to the queue */
|
||||
};
|
||||
|
||||
struct ks_wlan_private {
|
||||
/* hardware information */
|
||||
void *if_hw;
|
||||
struct workqueue_struct *wq;
|
||||
struct delayed_work rw_dwork;
|
||||
struct tasklet_struct rx_bh_task;
|
||||
|
||||
struct net_device *net_dev;
|
||||
struct net_device_stats nstats;
|
||||
struct iw_statistics wstats;
|
||||
|
||||
struct completion confirm_wait;
|
||||
|
||||
/* trx device & sme */
|
||||
struct tx_device tx_dev;
|
||||
struct rx_device rx_dev;
|
||||
struct sme_info sme_i;
|
||||
u8 *rxp;
|
||||
unsigned int rx_size;
|
||||
struct work_struct sme_work;
|
||||
struct work_struct wakeup_work;
|
||||
int scan_ind_count;
|
||||
|
||||
unsigned char eth_addr[ETH_ALEN];
|
||||
|
||||
struct local_aplist aplist;
|
||||
struct local_ap current_ap;
|
||||
struct power_save_status psstatus;
|
||||
struct sleep_status sleepstatus;
|
||||
struct wpa_status wpa;
|
||||
struct pmk_list pmklist;
|
||||
/* wireless parameter */
|
||||
struct ks_wlan_parameter reg;
|
||||
u8 current_rate;
|
||||
|
||||
char nick[IW_ESSID_MAX_SIZE + 1];
|
||||
|
||||
spinlock_t multicast_spin;
|
||||
|
||||
spinlock_t dev_read_lock;
|
||||
wait_queue_head_t devread_wait;
|
||||
|
||||
unsigned int need_commit; /* for ioctl */
|
||||
|
||||
/* DeviceIoControl */
|
||||
bool is_device_open;
|
||||
atomic_t event_count;
|
||||
atomic_t rec_count;
|
||||
int dev_count;
|
||||
#define DEVICE_STOCK_COUNT 20
|
||||
unsigned char *dev_data[DEVICE_STOCK_COUNT];
|
||||
int dev_size[DEVICE_STOCK_COUNT];
|
||||
|
||||
/* ioctl : IOCTL_FIRMWARE_VERSION */
|
||||
unsigned char firmware_version[128 + 1];
|
||||
int version_size;
|
||||
|
||||
bool mac_address_valid;
|
||||
|
||||
int dev_state;
|
||||
|
||||
struct sk_buff *skb;
|
||||
unsigned int cur_rx; /* Index into the Rx buffer of next Rx pkt. */
|
||||
#define FORCE_DISCONNECT 0x80000000
|
||||
#define CONNECT_STATUS_MASK 0x7FFFFFFF
|
||||
u32 connect_status;
|
||||
int infra_status;
|
||||
u8 scan_ssid_len;
|
||||
u8 scan_ssid[IW_ESSID_MAX_SIZE + 1];
|
||||
struct local_gain gain;
|
||||
struct wps_status wps;
|
||||
u8 sleep_mode;
|
||||
|
||||
u8 region;
|
||||
struct local_eeprom_sum eeprom_sum;
|
||||
u8 eeprom_checksum;
|
||||
|
||||
struct hostt hostt;
|
||||
|
||||
unsigned long last_doze;
|
||||
unsigned long last_wakeup;
|
||||
|
||||
unsigned int wakeup_count; /* for detect wakeup loop */
|
||||
};
|
||||
|
||||
static inline void inc_txqhead(struct ks_wlan_private *priv)
|
||||
{
|
||||
priv->tx_dev.qhead = (priv->tx_dev.qhead + 1) % TX_DEVICE_BUFF_SIZE;
|
||||
}
|
||||
|
||||
static inline void inc_txqtail(struct ks_wlan_private *priv)
|
||||
{
|
||||
priv->tx_dev.qtail = (priv->tx_dev.qtail + 1) % TX_DEVICE_BUFF_SIZE;
|
||||
}
|
||||
|
||||
static inline bool txq_has_space(struct ks_wlan_private *priv)
|
||||
{
|
||||
return (CIRC_SPACE(priv->tx_dev.qhead, priv->tx_dev.qtail,
|
||||
TX_DEVICE_BUFF_SIZE) > 0);
|
||||
}
|
||||
|
||||
static inline void inc_rxqhead(struct ks_wlan_private *priv)
|
||||
{
|
||||
priv->rx_dev.qhead = (priv->rx_dev.qhead + 1) % RX_DEVICE_BUFF_SIZE;
|
||||
}
|
||||
|
||||
static inline void inc_rxqtail(struct ks_wlan_private *priv)
|
||||
{
|
||||
priv->rx_dev.qtail = (priv->rx_dev.qtail + 1) % RX_DEVICE_BUFF_SIZE;
|
||||
}
|
||||
|
||||
static inline bool rxq_has_space(struct ks_wlan_private *priv)
|
||||
{
|
||||
return (CIRC_SPACE(priv->rx_dev.qhead, priv->rx_dev.qtail,
|
||||
RX_DEVICE_BUFF_SIZE) > 0);
|
||||
}
|
||||
|
||||
static inline unsigned int txq_count(struct ks_wlan_private *priv)
|
||||
{
|
||||
return CIRC_CNT_TO_END(priv->tx_dev.qhead, priv->tx_dev.qtail,
|
||||
TX_DEVICE_BUFF_SIZE);
|
||||
}
|
||||
|
||||
static inline unsigned int rxq_count(struct ks_wlan_private *priv)
|
||||
{
|
||||
return CIRC_CNT_TO_END(priv->rx_dev.qhead, priv->rx_dev.qtail,
|
||||
RX_DEVICE_BUFF_SIZE);
|
||||
}
|
||||
|
||||
int ks_wlan_net_start(struct net_device *dev);
|
||||
int ks_wlan_net_stop(struct net_device *dev);
|
||||
bool is_connect_status(u32 status);
|
||||
bool is_disconnect_status(u32 status);
|
||||
|
||||
#endif /* _KS_WLAN_H */
|
||||
@@ -1,61 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Driver for KeyStream 11b/g wireless LAN
|
||||
*
|
||||
* Copyright (c) 2005-2008 KeyStream Corp.
|
||||
* Copyright (C) 2009 Renesas Technology Corp.
|
||||
*/
|
||||
|
||||
#ifndef _KS_WLAN_IOCTL_H
|
||||
#define _KS_WLAN_IOCTL_H
|
||||
|
||||
#include <linux/wireless.h>
|
||||
/* The low order bit identify a SET (0) or a GET (1) ioctl. */
|
||||
|
||||
/* (SIOCIWFIRSTPRIV + 0) */
|
||||
/* former KS_WLAN_GET_DRIVER_VERSION (SIOCIWFIRSTPRIV + 1) */
|
||||
/* (SIOCIWFIRSTPRIV + 2) */
|
||||
#define KS_WLAN_GET_FIRM_VERSION (SIOCIWFIRSTPRIV + 3)
|
||||
#define KS_WLAN_SET_WPS_ENABLE (SIOCIWFIRSTPRIV + 4)
|
||||
#define KS_WLAN_GET_WPS_ENABLE (SIOCIWFIRSTPRIV + 5)
|
||||
#define KS_WLAN_SET_WPS_PROBE_REQ (SIOCIWFIRSTPRIV + 6)
|
||||
#define KS_WLAN_GET_EEPROM_CKSUM (SIOCIWFIRSTPRIV + 7)
|
||||
#define KS_WLAN_SET_PREAMBLE (SIOCIWFIRSTPRIV + 8)
|
||||
#define KS_WLAN_GET_PREAMBLE (SIOCIWFIRSTPRIV + 9)
|
||||
#define KS_WLAN_SET_POWER_SAVE (SIOCIWFIRSTPRIV + 10)
|
||||
#define KS_WLAN_GET_POWER_SAVE (SIOCIWFIRSTPRIV + 11)
|
||||
#define KS_WLAN_SET_SCAN_TYPE (SIOCIWFIRSTPRIV + 12)
|
||||
#define KS_WLAN_GET_SCAN_TYPE (SIOCIWFIRSTPRIV + 13)
|
||||
#define KS_WLAN_SET_RX_GAIN (SIOCIWFIRSTPRIV + 14)
|
||||
#define KS_WLAN_GET_RX_GAIN (SIOCIWFIRSTPRIV + 15)
|
||||
#define KS_WLAN_HOSTT (SIOCIWFIRSTPRIV + 16) /* unused */
|
||||
//#define KS_WLAN_SET_REGION (SIOCIWFIRSTPRIV + 17)
|
||||
#define KS_WLAN_SET_BEACON_LOST (SIOCIWFIRSTPRIV + 18)
|
||||
#define KS_WLAN_GET_BEACON_LOST (SIOCIWFIRSTPRIV + 19)
|
||||
|
||||
#define KS_WLAN_SET_TX_GAIN (SIOCIWFIRSTPRIV + 20)
|
||||
#define KS_WLAN_GET_TX_GAIN (SIOCIWFIRSTPRIV + 21)
|
||||
|
||||
/* for KS7010 */
|
||||
#define KS_WLAN_SET_PHY_TYPE (SIOCIWFIRSTPRIV + 22)
|
||||
#define KS_WLAN_GET_PHY_TYPE (SIOCIWFIRSTPRIV + 23)
|
||||
#define KS_WLAN_SET_CTS_MODE (SIOCIWFIRSTPRIV + 24)
|
||||
#define KS_WLAN_GET_CTS_MODE (SIOCIWFIRSTPRIV + 25)
|
||||
/* (SIOCIWFIRSTPRIV + 26) */
|
||||
/* (SIOCIWFIRSTPRIV + 27) */
|
||||
#define KS_WLAN_SET_SLEEP_MODE (SIOCIWFIRSTPRIV + 28) /* sleep mode */
|
||||
#define KS_WLAN_GET_SLEEP_MODE (SIOCIWFIRSTPRIV + 29) /* sleep mode */
|
||||
/* (SIOCIWFIRSTPRIV + 30) */
|
||||
/* (SIOCIWFIRSTPRIV + 31) */
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#include "ks_wlan.h"
|
||||
#include <linux/netdevice.h>
|
||||
|
||||
int ks_wlan_setup_parameter(struct ks_wlan_private *priv,
|
||||
unsigned int commit_flag);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
#endif /* _KS_WLAN_IOCTL_H */
|
||||
File diff suppressed because it is too large
Load Diff
+1
-2
@@ -65,8 +65,7 @@ int ia_css_iterator_configure(const struct ia_css_binary *binary,
|
||||
* the original out res. for video pipe, it has two output pins --- out and
|
||||
* vf_out, so it can keep these two resolutions already. */
|
||||
if (binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW &&
|
||||
binary->vf_downscale_log2 > 0)
|
||||
{
|
||||
binary->vf_downscale_log2 > 0) {
|
||||
/* TODO: Remove this after preview output decimation is fixed
|
||||
* by configuring out&vf info files properly */
|
||||
my_info.padded_width <<= binary->vf_downscale_log2;
|
||||
|
||||
@@ -454,18 +454,18 @@ static int comp_probe_channel(struct most_interface *iface, int channel_idx,
|
||||
struct most_video_dev *mdev = get_comp_dev(iface, channel_idx);
|
||||
|
||||
if (mdev) {
|
||||
pr_err("channel already linked\n");
|
||||
pr_err("Channel already linked\n");
|
||||
return -EEXIST;
|
||||
}
|
||||
|
||||
if (ccfg->direction != MOST_CH_RX) {
|
||||
pr_err("wrong direction, expect rx\n");
|
||||
pr_err("Wrong direction, expected rx\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (ccfg->data_type != MOST_CH_SYNC &&
|
||||
ccfg->data_type != MOST_CH_ISOC) {
|
||||
pr_err("wrong channel type, expect sync or isoc\n");
|
||||
pr_err("Wrong channel type, expected sync or isoc\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
@@ -175,7 +175,7 @@ static struct nvec_msg *nvec_msg_alloc(struct nvec_chip *nvec,
|
||||
}
|
||||
}
|
||||
|
||||
dev_err(nvec->dev, "could not allocate %s buffer\n",
|
||||
dev_err(nvec->dev, "Could not allocate %s buffer\n",
|
||||
(category == NVEC_MSG_TX) ? "TX" : "RX");
|
||||
|
||||
return NULL;
|
||||
@@ -315,7 +315,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
|
||||
if (!(wait_for_completion_timeout(&nvec->sync_write,
|
||||
msecs_to_jiffies(2000)))) {
|
||||
dev_warn(nvec->dev,
|
||||
"timeout waiting for sync write to complete\n");
|
||||
"Timeout waiting for sync write to complete\n");
|
||||
mutex_unlock(&nvec->sync_write_mutex);
|
||||
return -ETIMEDOUT;
|
||||
}
|
||||
@@ -392,7 +392,7 @@ static void nvec_request_master(struct work_struct *work)
|
||||
msecs_to_jiffies(5000));
|
||||
|
||||
if (err == 0) {
|
||||
dev_warn(nvec->dev, "timeout waiting for ec transfer\n");
|
||||
dev_warn(nvec->dev, "Timeout waiting for ec transfer\n");
|
||||
nvec_gpio_set_value(nvec, 1);
|
||||
msg->pos = 0;
|
||||
}
|
||||
@@ -454,7 +454,7 @@ static void nvec_dispatch(struct work_struct *work)
|
||||
|
||||
if (nvec->sync_write_pending ==
|
||||
(msg->data[2] << 8) + msg->data[0]) {
|
||||
dev_dbg(nvec->dev, "sync write completed!\n");
|
||||
dev_dbg(nvec->dev, "Sync write completed!\n");
|
||||
nvec->sync_write_pending = 0;
|
||||
nvec->last_sync_msg = msg;
|
||||
complete(&nvec->sync_write);
|
||||
@@ -477,7 +477,7 @@ static void nvec_tx_completed(struct nvec_chip *nvec)
|
||||
{
|
||||
/* We got an END_TRANS, let's skip this, maybe there's an event */
|
||||
if (nvec->tx->pos != nvec->tx->size) {
|
||||
dev_err(nvec->dev, "premature END_TRANS, resending\n");
|
||||
dev_err(nvec->dev, "Premature END_TRANS, resending\n");
|
||||
nvec->tx->pos = 0;
|
||||
nvec_gpio_set_value(nvec, 0);
|
||||
} else {
|
||||
@@ -608,7 +608,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
|
||||
|
||||
/* Filter out some errors */
|
||||
if ((status & irq_mask) == 0 && (status & ~irq_mask) != 0) {
|
||||
dev_err(nvec->dev, "unexpected irq mask %lx\n", status);
|
||||
dev_err(nvec->dev, "Unexpected irq mask %lx\n", status);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
if ((status & I2C_SL_IRQ) == 0) {
|
||||
@@ -631,7 +631,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
|
||||
if (status != (I2C_SL_IRQ | RCVD))
|
||||
nvec_invalid_flags(nvec, status, false);
|
||||
break;
|
||||
case 1: /* command byte */
|
||||
case 1: /* Command byte */
|
||||
if (status != I2C_SL_IRQ) {
|
||||
nvec_invalid_flags(nvec, status, true);
|
||||
} else {
|
||||
@@ -845,13 +845,12 @@ static int tegra_nvec_probe(struct platform_device *pdev)
|
||||
return PTR_ERR(nvec->gpiod);
|
||||
}
|
||||
|
||||
err = devm_request_irq(dev, nvec->irq, nvec_interrupt, 0,
|
||||
err = devm_request_irq(dev, nvec->irq, nvec_interrupt, IRQF_NO_AUTOEN,
|
||||
"nvec", nvec);
|
||||
if (err) {
|
||||
dev_err(dev, "couldn't request irq\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
disable_irq(nvec->irq);
|
||||
|
||||
tegra_init_i2c_slave(nvec);
|
||||
|
||||
|
||||
@@ -544,7 +544,7 @@ static const struct backlight_ops dcon_bl_ops = {
|
||||
static struct backlight_properties dcon_bl_props = {
|
||||
.max_brightness = 15,
|
||||
.type = BACKLIGHT_RAW,
|
||||
.power = FB_BLANK_UNBLANK,
|
||||
.power = BACKLIGHT_POWER_ON,
|
||||
};
|
||||
|
||||
static int dcon_reboot_notify(struct notifier_block *nb,
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#define R8190P_DEF_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#include "r8192E_phy.h"
|
||||
|
||||
#define MAX_SILENT_RESET_RX_SLOT_NUM 10
|
||||
|
||||
@@ -137,7 +138,7 @@ struct tx_fwinfo_8190pci {
|
||||
};
|
||||
|
||||
struct phy_sts_ofdm_819xpci {
|
||||
u8 trsw_gain_X[4];
|
||||
u8 trsw_gain_X[RF90_PATH_MAX];
|
||||
u8 pwdb_all;
|
||||
u8 cfosho_X[4];
|
||||
u8 cfotail_X[4];
|
||||
@@ -226,7 +227,7 @@ struct rx_desc {
|
||||
u16 Length:14;
|
||||
u16 CRC32:1;
|
||||
u16 ICV:1;
|
||||
u8 RxDrvInfoSize;
|
||||
u8 rx_drv_info_size;
|
||||
u8 Shift:2;
|
||||
u8 PHYStatus:1;
|
||||
u8 SWDec:1;
|
||||
|
||||
@@ -16,18 +16,18 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data,
|
||||
struct sk_buff *skb;
|
||||
unsigned char *seg_ptr;
|
||||
struct cb_desc *tcb_desc;
|
||||
u8 bLastIniPkt;
|
||||
u8 last_ini_pkt;
|
||||
|
||||
struct tx_fwinfo_8190pci *pTxFwInfo = NULL;
|
||||
|
||||
do {
|
||||
if ((len - frag_offset) > CMDPACKET_FRAG_SIZE) {
|
||||
frag_length = CMDPACKET_FRAG_SIZE;
|
||||
bLastIniPkt = 0;
|
||||
last_ini_pkt = 0;
|
||||
|
||||
} else {
|
||||
frag_length = (u16)(len - frag_offset);
|
||||
bLastIniPkt = 1;
|
||||
last_ini_pkt = 1;
|
||||
}
|
||||
|
||||
if (type == DESC_PACKET_TYPE_NORMAL)
|
||||
@@ -42,8 +42,8 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data,
|
||||
memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
|
||||
tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
|
||||
tcb_desc->queue_index = TXCMD_QUEUE;
|
||||
tcb_desc->bCmdOrInit = type;
|
||||
tcb_desc->bLastIniPkt = bLastIniPkt;
|
||||
tcb_desc->cmd_or_init = type;
|
||||
tcb_desc->last_ini_pkt = last_ini_pkt;
|
||||
|
||||
if (type == DESC_PACKET_TYPE_NORMAL) {
|
||||
tcb_desc->pkt_size = frag_length;
|
||||
|
||||
@@ -289,7 +289,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
|
||||
|
||||
for (i = 0; i < 6; i += 2) {
|
||||
usValue = rtl92e_eeprom_read(dev,
|
||||
(EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1);
|
||||
(EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1);
|
||||
*(u16 *)(&addr[i]) = usValue;
|
||||
}
|
||||
eth_hw_addr_set(dev, addr);
|
||||
@@ -987,10 +987,10 @@ void rtl92e_fill_tx_cmd_desc(struct net_device *dev, struct tx_desc_cmd *entry,
|
||||
if (dma_mapping_error(&priv->pdev->dev, mapping))
|
||||
netdev_err(dev, "%s(): DMA Mapping error\n", __func__);
|
||||
memset(entry, 0, 12);
|
||||
entry->LINIP = cb_desc->bLastIniPkt;
|
||||
entry->LINIP = cb_desc->last_ini_pkt;
|
||||
entry->FirstSeg = 1;
|
||||
entry->LastSeg = 1;
|
||||
if (cb_desc->bCmdOrInit == DESC_PACKET_TYPE_INIT) {
|
||||
if (cb_desc->cmd_or_init == DESC_PACKET_TYPE_INIT) {
|
||||
entry->CmdInit = DESC_PACKET_TYPE_INIT;
|
||||
} else {
|
||||
struct tx_desc *entry_tmp = (struct tx_desc *)entry;
|
||||
@@ -1145,23 +1145,21 @@ static long _rtl92e_signal_scale_mapping(struct r8192_priv *priv, long currsig)
|
||||
_pdrvinfo->RxRate == DESC90_RATE11M) &&\
|
||||
!_pdrvinfo->RxHT)
|
||||
|
||||
static void _rtl92e_query_rxphystatus(
|
||||
struct r8192_priv *priv,
|
||||
struct rtllib_rx_stats *pstats,
|
||||
struct rx_desc *pdesc,
|
||||
struct rx_fwinfo *pdrvinfo,
|
||||
struct rtllib_rx_stats *precord_stats,
|
||||
bool bpacket_match_bssid,
|
||||
bool bpacket_toself,
|
||||
bool bPacketBeacon,
|
||||
bool bToSelfBA
|
||||
)
|
||||
static void _rtl92e_query_rxphystatus(struct r8192_priv *priv,
|
||||
struct rtllib_rx_stats *pstats,
|
||||
struct rx_desc *pdesc,
|
||||
struct rx_fwinfo *pdrvinfo,
|
||||
struct rtllib_rx_stats *precord_stats,
|
||||
bool bpacket_match_bssid,
|
||||
bool bpacket_toself,
|
||||
bool bPacketBeacon,
|
||||
bool bToSelfBA)
|
||||
{
|
||||
struct phy_sts_ofdm_819xpci *pofdm_buf;
|
||||
struct phy_sts_cck_819xpci *pcck_buf;
|
||||
u8 *prxpkt;
|
||||
u8 i, max_spatial_stream, tmp_rxevm;
|
||||
s8 rx_pwr[4], rx_pwr_all = 0;
|
||||
s8 rx_pwr[RF90_PATH_MAX], rx_pwr_all = 0;
|
||||
s8 rx_evmX;
|
||||
u8 evm, pwdb_all;
|
||||
u32 RSSI, total_rssi = 0;
|
||||
@@ -1174,7 +1172,7 @@ static void _rtl92e_query_rxphystatus(
|
||||
memset(precord_stats, 0, sizeof(struct rtllib_rx_stats));
|
||||
pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID =
|
||||
bpacket_match_bssid;
|
||||
pstats->bPacketToSelf = precord_stats->bPacketToSelf = bpacket_toself;
|
||||
pstats->packet_to_self = precord_stats->packet_to_self = bpacket_toself;
|
||||
pstats->bIsCCK = precord_stats->bIsCCK = is_cck_rate;
|
||||
pstats->bPacketBeacon = precord_stats->bPacketBeacon = bPacketBeacon;
|
||||
pstats->bToSelfBA = precord_stats->bToSelfBA = bToSelfBA;
|
||||
@@ -1266,8 +1264,8 @@ static void _rtl92e_query_rxphystatus(
|
||||
else
|
||||
sq = ((64 - sq) * 100) / 44;
|
||||
}
|
||||
pstats->SignalQuality = sq;
|
||||
precord_stats->SignalQuality = sq;
|
||||
pstats->signal_quality = sq;
|
||||
precord_stats->signal_quality = sq;
|
||||
pstats->RxMIMOSignalQuality[0] = sq;
|
||||
precord_stats->RxMIMOSignalQuality[0] = sq;
|
||||
pstats->RxMIMOSignalQuality[1] = -1;
|
||||
@@ -1311,8 +1309,8 @@ static void _rtl92e_query_rxphystatus(
|
||||
evm = rtl92e_evm_db_to_percent(rx_evmX);
|
||||
if (bpacket_match_bssid) {
|
||||
if (i == 0) {
|
||||
pstats->SignalQuality = evm & 0xff;
|
||||
precord_stats->SignalQuality = evm & 0xff;
|
||||
pstats->signal_quality = evm & 0xff;
|
||||
precord_stats->signal_quality = evm & 0xff;
|
||||
}
|
||||
pstats->RxMIMOSignalQuality[i] = evm & 0xff;
|
||||
precord_stats->RxMIMOSignalQuality[i] = evm & 0xff;
|
||||
@@ -1321,13 +1319,12 @@ static void _rtl92e_query_rxphystatus(
|
||||
}
|
||||
|
||||
if (is_cck_rate) {
|
||||
pstats->SignalStrength = precord_stats->SignalStrength =
|
||||
_rtl92e_signal_scale_mapping(priv,
|
||||
(long)pwdb_all);
|
||||
pstats->signal_strength = precord_stats->signal_strength =
|
||||
_rtl92e_signal_scale_mapping(priv, (long)pwdb_all);
|
||||
|
||||
} else {
|
||||
if (rf_rx_num != 0)
|
||||
pstats->SignalStrength = precord_stats->SignalStrength =
|
||||
pstats->signal_strength = precord_stats->signal_strength =
|
||||
_rtl92e_signal_scale_mapping(priv,
|
||||
(long)(total_rssi /= rf_rx_num));
|
||||
}
|
||||
@@ -1355,10 +1352,10 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
|
||||
last_rssi = priv->stats.slide_signal_strength[slide_rssi_index];
|
||||
priv->stats.slide_rssi_total -= last_rssi;
|
||||
}
|
||||
priv->stats.slide_rssi_total += prev_st->SignalStrength;
|
||||
priv->stats.slide_rssi_total += prev_st->signal_strength;
|
||||
|
||||
priv->stats.slide_signal_strength[slide_rssi_index++] =
|
||||
prev_st->SignalStrength;
|
||||
prev_st->signal_strength;
|
||||
if (slide_rssi_index >= PHY_RSSI_SLID_WIN_MAX)
|
||||
slide_rssi_index = 0;
|
||||
|
||||
@@ -1373,7 +1370,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
|
||||
if (!bcheck)
|
||||
return;
|
||||
|
||||
if (!prev_st->bIsCCK && prev_st->bPacketToSelf) {
|
||||
if (!prev_st->bIsCCK && prev_st->packet_to_self) {
|
||||
for (rfpath = RF90_PATH_A; rfpath < priv->num_total_rf_path; rfpath++) {
|
||||
if (priv->stats.rx_rssi_percentage[rfpath] == 0) {
|
||||
priv->stats.rx_rssi_percentage[rfpath] =
|
||||
@@ -1419,7 +1416,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
|
||||
if (prev_st->RxPWDBAll >= 3)
|
||||
prev_st->RxPWDBAll -= 3;
|
||||
}
|
||||
if (prev_st->bPacketToSelf || prev_st->bPacketBeacon ||
|
||||
if (prev_st->packet_to_self || prev_st->bPacketBeacon ||
|
||||
prev_st->bToSelfBA) {
|
||||
if (priv->undecorated_smoothed_pwdb < 0)
|
||||
priv->undecorated_smoothed_pwdb = prev_st->RxPWDBAll;
|
||||
@@ -1439,8 +1436,8 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
|
||||
rtl92e_update_rx_statistics(priv, prev_st);
|
||||
}
|
||||
|
||||
if (prev_st->SignalQuality != 0) {
|
||||
if (prev_st->bPacketToSelf || prev_st->bPacketBeacon ||
|
||||
if (prev_st->signal_quality != 0) {
|
||||
if (prev_st->packet_to_self || prev_st->bPacketBeacon ||
|
||||
prev_st->bToSelfBA) {
|
||||
if (slide_evm_statistics++ >= PHY_RSSI_SLID_WIN_MAX) {
|
||||
slide_evm_statistics = PHY_RSSI_SLID_WIN_MAX;
|
||||
@@ -1449,10 +1446,10 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
|
||||
priv->stats.slide_evm_total -= last_evm;
|
||||
}
|
||||
|
||||
priv->stats.slide_evm_total += prev_st->SignalQuality;
|
||||
priv->stats.slide_evm_total += prev_st->signal_quality;
|
||||
|
||||
priv->stats.slide_evm[slide_evm_index++] =
|
||||
prev_st->SignalQuality;
|
||||
prev_st->signal_quality;
|
||||
if (slide_evm_index >= PHY_RSSI_SLID_WIN_MAX)
|
||||
slide_evm_index = 0;
|
||||
|
||||
@@ -1461,7 +1458,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
|
||||
priv->stats.last_signal_strength_inpercent = tmp_val;
|
||||
}
|
||||
|
||||
if (prev_st->bPacketToSelf ||
|
||||
if (prev_st->packet_to_self ||
|
||||
prev_st->bPacketBeacon ||
|
||||
prev_st->bToSelfBA) {
|
||||
for (ij = 0; ij < 2; ij++) {
|
||||
@@ -1496,7 +1493,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
|
||||
u8 *tmp_buf;
|
||||
u8 *praddr;
|
||||
|
||||
tmp_buf = skb->data + pstats->RxDrvInfoSize + pstats->RxBufShift;
|
||||
tmp_buf = skb->data + pstats->rx_drv_info_size + pstats->rx_buf_shift;
|
||||
|
||||
hdr = (struct ieee80211_hdr_3addr *)tmp_buf;
|
||||
fc = le16_to_cpu(hdr->frame_control);
|
||||
@@ -1509,7 +1506,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
|
||||
(fc & IEEE80211_FCTL_TODS) ? hdr->addr1 :
|
||||
(fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 :
|
||||
hdr->addr3) &&
|
||||
(!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV));
|
||||
(!pstats->hw_error) && (!pstats->bCRC) && (!pstats->bICV));
|
||||
bpacket_toself = bpacket_match_bssid && /* check this */
|
||||
ether_addr_equal(praddr, priv->rtllib->dev->dev_addr);
|
||||
if (ieee80211_is_beacon(hdr->frame_control))
|
||||
@@ -1521,9 +1518,8 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
|
||||
rtl92e_copy_mpdu_stats(pstats, &previous_stats);
|
||||
}
|
||||
|
||||
static void _rtl92e_update_received_rate_histogram_stats(
|
||||
struct net_device *dev,
|
||||
struct rtllib_rx_stats *pstats)
|
||||
static void _rtl92e_update_received_rate_histogram_stats(struct net_device *dev,
|
||||
struct rtllib_rx_stats *pstats)
|
||||
{
|
||||
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
|
||||
u32 rcvType = 1;
|
||||
@@ -1634,20 +1630,20 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
|
||||
|
||||
stats->bICV = pdesc->ICV;
|
||||
stats->bCRC = pdesc->CRC32;
|
||||
stats->bHwError = pdesc->CRC32 | pdesc->ICV;
|
||||
stats->hw_error = pdesc->CRC32 | pdesc->ICV;
|
||||
|
||||
stats->Length = pdesc->Length;
|
||||
if (stats->Length < 24)
|
||||
stats->bHwError |= 1;
|
||||
stats->hw_error |= 1;
|
||||
|
||||
if (stats->bHwError)
|
||||
if (stats->hw_error)
|
||||
return false;
|
||||
|
||||
stats->RxDrvInfoSize = pdesc->RxDrvInfoSize;
|
||||
stats->RxBufShift = (pdesc->Shift) & 0x03;
|
||||
stats->rx_drv_info_size = pdesc->rx_drv_info_size;
|
||||
stats->rx_buf_shift = (pdesc->Shift) & 0x03;
|
||||
stats->decrypted = !pdesc->SWDec;
|
||||
|
||||
pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift);
|
||||
pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->rx_buf_shift);
|
||||
|
||||
stats->rate = _rtl92e_rate_hw_to_mgn((bool)pDrvInfo->RxHT,
|
||||
pDrvInfo->RxRate);
|
||||
@@ -1837,8 +1833,8 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
|
||||
rx_chk_cnt++;
|
||||
if (priv->undecorated_smoothed_pwdb >= (RATE_ADAPTIVE_TH_HIGH + 5)) {
|
||||
rx_chk_cnt = 0;
|
||||
} else if ((priv->undecorated_smoothed_pwdb < (RATE_ADAPTIVE_TH_HIGH + 5))
|
||||
&& (((priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) &&
|
||||
} else if ((priv->undecorated_smoothed_pwdb < (RATE_ADAPTIVE_TH_HIGH + 5)) &&
|
||||
(((priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) &&
|
||||
(priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_40M))
|
||||
|| ((priv->current_chnl_bw == HT_CHANNEL_WIDTH_20) &&
|
||||
(priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_20M)))) {
|
||||
@@ -1859,7 +1855,6 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
|
||||
rx_chk_cnt = 0;
|
||||
}
|
||||
|
||||
|
||||
slot_index = (priv->silent_reset_rx_slot_index++) % SilentResetRxSoltNum;
|
||||
|
||||
if (priv->rx_ctr == RegRxCounter) {
|
||||
|
||||
@@ -229,7 +229,7 @@ enum _RTL8192PCI_HW {
|
||||
RATR_MCS6 | RATR_MCS7)
|
||||
#define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \
|
||||
RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \
|
||||
RATR_MCS14|RATR_MCS15)
|
||||
RATR_MCS14 | RATR_MCS15)
|
||||
|
||||
DRIVER_RSSI = 0x32c,
|
||||
MCS_TXAGC = 0x340,
|
||||
|
||||
@@ -416,6 +416,7 @@ static bool _rtl92e_bb_config_para_file(struct net_device *dev)
|
||||
|
||||
return rtStatus;
|
||||
}
|
||||
|
||||
bool rtl92e_config_bb(struct net_device *dev)
|
||||
{
|
||||
_rtl92e_init_bb_rf_reg_def(dev);
|
||||
@@ -508,8 +509,8 @@ static void _rtl92e_set_tx_power_level(struct net_device *dev, u8 channel)
|
||||
static u8 _rtl92e_phy_set_sw_chnl_cmd_array(struct net_device *dev,
|
||||
struct sw_chnl_cmd *CmdTable,
|
||||
u32 CmdTableIdx, u32 CmdTableSz,
|
||||
enum sw_chnl_cmd_id CmdID,
|
||||
u32 Para1, u32 Para2, u32 msDelay)
|
||||
enum sw_chnl_cmd_id cmd_id,
|
||||
u32 para1, u32 para2, u32 ms_delay)
|
||||
{
|
||||
struct sw_chnl_cmd *pCmd;
|
||||
|
||||
@@ -523,10 +524,10 @@ static u8 _rtl92e_phy_set_sw_chnl_cmd_array(struct net_device *dev,
|
||||
}
|
||||
|
||||
pCmd = CmdTable + CmdTableIdx;
|
||||
pCmd->CmdID = CmdID;
|
||||
pCmd->Para1 = Para1;
|
||||
pCmd->Para2 = Para2;
|
||||
pCmd->msDelay = msDelay;
|
||||
pCmd->cmd_id = cmd_id;
|
||||
pCmd->para1 = para1;
|
||||
pCmd->para2 = para2;
|
||||
pCmd->ms_delay = ms_delay;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -552,18 +553,18 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
|
||||
_rtl92e_phy_set_sw_chnl_cmd_array(dev, ieee->PreCommonCmd,
|
||||
PreCommonCmdCnt++,
|
||||
MAX_PRECMD_CNT,
|
||||
CmdID_SetTxPowerLevel,
|
||||
cmd_id_set_tx_power_level,
|
||||
0, 0, 0);
|
||||
_rtl92e_phy_set_sw_chnl_cmd_array(dev, ieee->PreCommonCmd,
|
||||
PreCommonCmdCnt++,
|
||||
MAX_PRECMD_CNT, CmdID_End,
|
||||
MAX_PRECMD_CNT, cmd_id_end,
|
||||
0, 0, 0);
|
||||
|
||||
PostCommonCmdCnt = 0;
|
||||
|
||||
_rtl92e_phy_set_sw_chnl_cmd_array(dev, ieee->PostCommonCmd,
|
||||
PostCommonCmdCnt++,
|
||||
MAX_POSTCMD_CNT, CmdID_End,
|
||||
MAX_POSTCMD_CNT, cmd_id_end,
|
||||
0, 0, 0);
|
||||
|
||||
RfDependCmdCnt = 0;
|
||||
@@ -578,14 +579,14 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
|
||||
ieee->RfDependCmd,
|
||||
RfDependCmdCnt++,
|
||||
MAX_RFDEPENDCMD_CNT,
|
||||
CmdID_RF_WriteReg,
|
||||
cmd_id_rf_write_reg,
|
||||
rZebra1_Channel,
|
||||
channel, 10);
|
||||
_rtl92e_phy_set_sw_chnl_cmd_array(dev,
|
||||
ieee->RfDependCmd,
|
||||
RfDependCmdCnt++,
|
||||
MAX_RFDEPENDCMD_CNT,
|
||||
CmdID_End, 0, 0, 0);
|
||||
cmd_id_end, 0, 0, 0);
|
||||
|
||||
do {
|
||||
switch (*stage) {
|
||||
@@ -600,7 +601,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
|
||||
break;
|
||||
}
|
||||
|
||||
if (CurrentCmd && CurrentCmd->CmdID == CmdID_End) {
|
||||
if (CurrentCmd && CurrentCmd->cmd_id == cmd_id_end) {
|
||||
if ((*stage) == 2)
|
||||
return true;
|
||||
(*stage)++;
|
||||
@@ -610,31 +611,31 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
|
||||
|
||||
if (!CurrentCmd)
|
||||
continue;
|
||||
switch (CurrentCmd->CmdID) {
|
||||
case CmdID_SetTxPowerLevel:
|
||||
switch (CurrentCmd->cmd_id) {
|
||||
case cmd_id_set_tx_power_level:
|
||||
if (priv->ic_cut > VERSION_8190_BD)
|
||||
_rtl92e_set_tx_power_level(dev,
|
||||
channel);
|
||||
break;
|
||||
case CmdID_WritePortUlong:
|
||||
rtl92e_writel(dev, CurrentCmd->Para1,
|
||||
CurrentCmd->Para2);
|
||||
case cmd_id_write_port_ulong:
|
||||
rtl92e_writel(dev, CurrentCmd->para1,
|
||||
CurrentCmd->para2);
|
||||
break;
|
||||
case CmdID_WritePortUshort:
|
||||
rtl92e_writew(dev, CurrentCmd->Para1,
|
||||
CurrentCmd->Para2);
|
||||
case cmd_id_write_port_ushort:
|
||||
rtl92e_writew(dev, CurrentCmd->para1,
|
||||
CurrentCmd->para2);
|
||||
break;
|
||||
case CmdID_WritePortUchar:
|
||||
rtl92e_writeb(dev, CurrentCmd->Para1,
|
||||
CurrentCmd->Para2);
|
||||
case cmd_id_write_port_uchar:
|
||||
rtl92e_writeb(dev, CurrentCmd->para1,
|
||||
CurrentCmd->para2);
|
||||
break;
|
||||
case CmdID_RF_WriteReg:
|
||||
case cmd_id_rf_write_reg:
|
||||
for (eRFPath = 0; eRFPath <
|
||||
priv->num_total_rf_path; eRFPath++)
|
||||
rtl92e_set_rf_reg(dev,
|
||||
(enum rf90_radio_path)eRFPath,
|
||||
CurrentCmd->Para1, bMask12Bits,
|
||||
CurrentCmd->Para2 << 7);
|
||||
CurrentCmd->para1, bMask12Bits,
|
||||
CurrentCmd->para2 << 7);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -644,7 +645,7 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
|
||||
} while (true);
|
||||
} /*for (Number of RF paths)*/
|
||||
|
||||
(*delay) = CurrentCmd->msDelay;
|
||||
(*delay) = CurrentCmd->ms_delay;
|
||||
(*step)++;
|
||||
return false;
|
||||
}
|
||||
@@ -944,19 +945,19 @@ void rtl92e_init_gain(struct net_device *dev, u8 Operation)
|
||||
case IG_Restore:
|
||||
BitMask = 0x7f;
|
||||
rtl92e_set_bb_reg(dev, rOFDM0_XAAGCCore1, BitMask,
|
||||
(u32)priv->initgain_backup.xaagccore1);
|
||||
(u32)priv->initgain_backup.xaagccore1);
|
||||
rtl92e_set_bb_reg(dev, rOFDM0_XBAGCCore1, BitMask,
|
||||
(u32)priv->initgain_backup.xbagccore1);
|
||||
(u32)priv->initgain_backup.xbagccore1);
|
||||
rtl92e_set_bb_reg(dev, rOFDM0_XCAGCCore1, BitMask,
|
||||
(u32)priv->initgain_backup.xcagccore1);
|
||||
(u32)priv->initgain_backup.xcagccore1);
|
||||
rtl92e_set_bb_reg(dev, rOFDM0_XDAGCCore1, BitMask,
|
||||
(u32)priv->initgain_backup.xdagccore1);
|
||||
(u32)priv->initgain_backup.xdagccore1);
|
||||
BitMask = bMaskByte2;
|
||||
rtl92e_set_bb_reg(dev, rCCK0_CCA, BitMask,
|
||||
(u32)priv->initgain_backup.cca);
|
||||
(u32)priv->initgain_backup.cca);
|
||||
|
||||
rtl92e_set_tx_power(dev,
|
||||
priv->rtllib->current_network.channel);
|
||||
priv->rtllib->current_network.channel);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,6 @@ enum hw90_block {
|
||||
enum rf90_radio_path {
|
||||
RF90_PATH_A = 0,
|
||||
RF90_PATH_B = 1,
|
||||
RF90_PATH_C = 2,
|
||||
RF90_PATH_D = 3,
|
||||
RF90_PATH_MAX
|
||||
};
|
||||
|
||||
@@ -45,13 +43,13 @@ void rtl92e_set_channel(struct net_device *dev, u8 channel);
|
||||
void rtl92e_set_bw_mode(struct net_device *dev,
|
||||
enum ht_channel_width bandwidth,
|
||||
enum ht_extchnl_offset Offset);
|
||||
void rtl92e_init_gain(struct net_device *dev, u8 Operation);
|
||||
void rtl92e_init_gain(struct net_device *dev, u8 operation);
|
||||
|
||||
void rtl92e_set_rf_off(struct net_device *dev);
|
||||
|
||||
bool rtl92e_set_rf_power_state(struct net_device *dev,
|
||||
enum rt_rf_power_state rf_power_state);
|
||||
|
||||
void rtl92e_scan_op_backup(struct net_device *dev, u8 Operation);
|
||||
void rtl92e_scan_op_backup(struct net_device *dev, u8 operation);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
int hwwep = 1;
|
||||
static char *ifname = "wlan%d";
|
||||
|
||||
static struct pci_device_id rtl8192_pci_id_tbl[] = {
|
||||
static const struct pci_device_id rtl8192_pci_id_tbl[] = {
|
||||
{PCI_DEVICE(0x10ec, 0x8192)},
|
||||
{PCI_DEVICE(0x07aa, 0x0044)},
|
||||
{PCI_DEVICE(0x07aa, 0x0047)},
|
||||
@@ -173,7 +173,7 @@ bool rtl92e_set_rf_state(struct net_device *dev,
|
||||
else
|
||||
priv->blinked_ingpio = false;
|
||||
rtllib_mgnt_disconnect(priv->rtllib,
|
||||
WLAN_REASON_DISASSOC_STA_HAS_LEFT);
|
||||
WLAN_REASON_DISASSOC_STA_HAS_LEFT);
|
||||
}
|
||||
}
|
||||
if ((change_source == RF_CHANGE_BY_HW) && !priv->hw_radio_off)
|
||||
@@ -322,7 +322,7 @@ static int _rtl92e_qos_handle_probe_response(struct r8192_priv *priv,
|
||||
|
||||
if (network->flags & NETWORK_HAS_QOS_MASK) {
|
||||
if (active_network &&
|
||||
(network->flags & NETWORK_HAS_QOS_PARAMETERS))
|
||||
(network->flags & NETWORK_HAS_QOS_PARAMETERS))
|
||||
network->qos_data.active = network->qos_data.supported;
|
||||
|
||||
if ((network->qos_data.active == 1) && (active_network == 1) &&
|
||||
@@ -665,7 +665,7 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
|
||||
priv->rtllib->init_gain_handler = rtl92e_init_gain;
|
||||
priv->rtllib->rtllib_ips_leave_wq = rtl92e_rtllib_ips_leave_wq;
|
||||
priv->rtllib->rtllib_ips_leave = rtl92e_rtllib_ips_leave;
|
||||
priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup;
|
||||
priv->rtllib->scan_operation_backup_handler = rtl92e_scan_op_backup;
|
||||
}
|
||||
|
||||
static void _rtl92e_init_priv_variable(struct net_device *dev)
|
||||
@@ -860,13 +860,13 @@ static enum reset_type _rtl92e_tx_check_stuck(struct net_device *dev)
|
||||
skb = __skb_peek(&ring->queue);
|
||||
tcb_desc = (struct cb_desc *)(skb->cb +
|
||||
MAX_DEV_ADDR_SIZE);
|
||||
tcb_desc->nStuckCount++;
|
||||
tcb_desc->stuck_count++;
|
||||
bCheckFwTxCnt = true;
|
||||
if (tcb_desc->nStuckCount > 1)
|
||||
if (tcb_desc->stuck_count > 1)
|
||||
netdev_info(dev,
|
||||
"%s: QueueID=%d tcb_desc->nStuckCount=%d\n",
|
||||
"%s: QueueID=%d tcb_desc->stuck_count=%d\n",
|
||||
__func__, QueueID,
|
||||
tcb_desc->nStuckCount);
|
||||
tcb_desc->stuck_count);
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&priv->irq_th_lock, flags);
|
||||
@@ -1522,8 +1522,8 @@ static void _rtl92e_rx_normal(struct net_device *dev)
|
||||
priv->rxbuffersize, DMA_FROM_DEVICE);
|
||||
|
||||
skb_put(skb, pdesc->Length);
|
||||
skb_reserve(skb, stats.RxDrvInfoSize +
|
||||
stats.RxBufShift);
|
||||
skb_reserve(skb, stats.rx_drv_info_size +
|
||||
stats.rx_buf_shift);
|
||||
skb_trim(skb, skb->len - S_CRC_LEN);
|
||||
rtllib_hdr = (struct ieee80211_hdr *)skb->data;
|
||||
if (!is_multicast_ether_addr(rtllib_hdr->addr1)) {
|
||||
|
||||
@@ -300,7 +300,7 @@ struct r8192_priv {
|
||||
|
||||
u32 rf_reg_0value[4];
|
||||
u8 num_total_rf_path;
|
||||
bool brfpath_rxenable[4];
|
||||
bool brfpath_rxenable[RF90_PATH_MAX];
|
||||
|
||||
bool tx_pwr_data_read_from_eeprom;
|
||||
|
||||
|
||||
@@ -1484,8 +1484,7 @@ static void _rtl92e_dm_rx_path_sel_byrssi(struct net_device *dev)
|
||||
rtl92e_set_bb_reg(dev,
|
||||
rOFDM1_TRxPathEnable,
|
||||
0x1 << i, 0x1);
|
||||
dm_rx_path_sel_table.rf_enable_rssi_th[i]
|
||||
= 100;
|
||||
dm_rx_path_sel_table.rf_enable_rssi_th[i] = 100;
|
||||
disabled_rf_cnt--;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -204,12 +204,11 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
|
||||
&priv->rtllib->pwr_save_ctrl;
|
||||
|
||||
if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
|
||||
(priv->rtllib->link_state == MAC80211_LINKED)))
|
||||
(priv->rtllib->link_state == MAC80211_LINKED)))
|
||||
return;
|
||||
|
||||
if (psc->bLeisurePs) {
|
||||
if (psc->lps_idle_count >= RT_CHECK_FOR_HANG_PERIOD) {
|
||||
|
||||
if (priv->rtllib->ps == RTLLIB_PS_DISABLED)
|
||||
_rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST);
|
||||
} else {
|
||||
|
||||
@@ -288,11 +288,11 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
|
||||
if (priv->rtllib->rf_power_state != rf_off) {
|
||||
priv->rtllib->actscanning = true;
|
||||
|
||||
ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_BACKUP);
|
||||
ieee->scan_operation_backup_handler(ieee->dev, SCAN_OPT_BACKUP);
|
||||
|
||||
rtllib_start_scan_syncro(priv->rtllib);
|
||||
|
||||
ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_RESTORE);
|
||||
ieee->scan_operation_backup_handler(ieee->dev, SCAN_OPT_RESTORE);
|
||||
}
|
||||
ret = 0;
|
||||
} else {
|
||||
@@ -526,7 +526,8 @@ static int _rtl92e_wx_set_enc(struct net_device *dev,
|
||||
mutex_unlock(&priv->wx_mutex);
|
||||
|
||||
if (wrqu->encoding.flags & IW_ENCODE_DISABLED) {
|
||||
ieee->pairwise_key_type = ieee->group_key_type = KEY_TYPE_NA;
|
||||
ieee->pairwise_key_type = KEY_TYPE_NA;
|
||||
ieee->group_key_type = KEY_TYPE_NA;
|
||||
rtl92e_cam_reset(dev);
|
||||
memset(priv->rtllib->swcamtable, 0,
|
||||
sizeof(struct sw_cam_table) * 32);
|
||||
@@ -675,9 +676,9 @@ static int _rtl92e_wx_set_encode_ext(struct net_device *dev,
|
||||
u8 idx = 0, alg = 0, group = 0;
|
||||
|
||||
if ((encoding->flags & IW_ENCODE_DISABLED) ||
|
||||
ext->alg == IW_ENCODE_ALG_NONE) {
|
||||
ieee->pairwise_key_type = ieee->group_key_type
|
||||
= KEY_TYPE_NA;
|
||||
ext->alg == IW_ENCODE_ALG_NONE) {
|
||||
ieee->pairwise_key_type = KEY_TYPE_NA;
|
||||
ieee->group_key_type = KEY_TYPE_NA;
|
||||
rtl92e_cam_reset(dev);
|
||||
memset(priv->rtllib->swcamtable, 0,
|
||||
sizeof(struct sw_cam_table) * 32);
|
||||
@@ -710,7 +711,7 @@ static int _rtl92e_wx_set_encode_ext(struct net_device *dev,
|
||||
rtl92e_set_swcam(dev, idx, idx, alg, broadcast_addr, key);
|
||||
} else {
|
||||
if ((ieee->pairwise_key_type == KEY_TYPE_CCMP) &&
|
||||
ieee->ht_info->current_ht_support)
|
||||
ieee->ht_info->current_ht_support)
|
||||
rtl92e_writeb(dev, 0x173, 1);
|
||||
rtl92e_set_key(dev, 4, idx, alg,
|
||||
(u8 *)ieee->ap_mac_addr, 0, key);
|
||||
|
||||
@@ -188,7 +188,7 @@ static void ht_iot_peer_determine(struct rtllib_device *ieee)
|
||||
}
|
||||
|
||||
static u8 ht_iot_act_is_mgnt_use_cck_6m(struct rtllib_device *ieee,
|
||||
struct rtllib_network *network)
|
||||
struct rtllib_network *network)
|
||||
{
|
||||
u8 retValue = 0;
|
||||
|
||||
@@ -559,7 +559,7 @@ void ht_initialize_bss_desc(struct bss_ht *bss_ht)
|
||||
}
|
||||
|
||||
void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee,
|
||||
struct rtllib_network *pNetwork)
|
||||
struct rtllib_network *network)
|
||||
{
|
||||
struct rt_hi_throughput *ht_info = ieee->ht_info;
|
||||
u8 bIOTAction = 0;
|
||||
@@ -567,32 +567,32 @@ void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee,
|
||||
/* unmark enable_ht flag here is the same reason why unmarked in
|
||||
* function rtllib_softmac_new_net. WB 2008.09.10
|
||||
*/
|
||||
if (pNetwork->bssht.bd_support_ht) {
|
||||
if (network->bssht.bd_support_ht) {
|
||||
ht_info->current_ht_support = true;
|
||||
ht_info->peer_ht_spec_ver = pNetwork->bssht.bd_ht_spec_ver;
|
||||
ht_info->peer_ht_spec_ver = network->bssht.bd_ht_spec_ver;
|
||||
|
||||
if (pNetwork->bssht.bd_ht_cap_len > 0 &&
|
||||
pNetwork->bssht.bd_ht_cap_len <= sizeof(ht_info->peer_ht_cap_buf))
|
||||
if (network->bssht.bd_ht_cap_len > 0 &&
|
||||
network->bssht.bd_ht_cap_len <= sizeof(ht_info->peer_ht_cap_buf))
|
||||
memcpy(ht_info->peer_ht_cap_buf,
|
||||
pNetwork->bssht.bd_ht_cap_buf,
|
||||
pNetwork->bssht.bd_ht_cap_len);
|
||||
network->bssht.bd_ht_cap_buf,
|
||||
network->bssht.bd_ht_cap_len);
|
||||
|
||||
if (pNetwork->bssht.bd_ht_info_len > 0 &&
|
||||
pNetwork->bssht.bd_ht_info_len <=
|
||||
if (network->bssht.bd_ht_info_len > 0 &&
|
||||
network->bssht.bd_ht_info_len <=
|
||||
sizeof(ht_info->peer_ht_info_buf))
|
||||
memcpy(ht_info->peer_ht_info_buf,
|
||||
pNetwork->bssht.bd_ht_info_buf,
|
||||
pNetwork->bssht.bd_ht_info_len);
|
||||
network->bssht.bd_ht_info_buf,
|
||||
network->bssht.bd_ht_info_len);
|
||||
|
||||
ht_info->current_rt2rt_aggregation =
|
||||
pNetwork->bssht.bd_rt2rt_aggregation;
|
||||
network->bssht.bd_rt2rt_aggregation;
|
||||
ht_info->current_rt2rt_long_slot_time =
|
||||
pNetwork->bssht.bd_rt2rt_long_slot_time;
|
||||
network->bssht.bd_rt2rt_long_slot_time;
|
||||
|
||||
ht_iot_peer_determine(ieee);
|
||||
|
||||
ht_info->iot_action = 0;
|
||||
bIOTAction = ht_iot_act_is_mgnt_use_cck_6m(ieee, pNetwork);
|
||||
bIOTAction = ht_iot_act_is_mgnt_use_cck_6m(ieee, network);
|
||||
if (bIOTAction)
|
||||
ht_info->iot_action |= HT_IOT_ACT_MGNT_USE_CCK_6M;
|
||||
bIOTAction = ht_iot_act_is_ccd_fsync(ieee);
|
||||
@@ -609,23 +609,23 @@ void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee,
|
||||
}
|
||||
|
||||
void HT_update_self_and_peer_setting(struct rtllib_device *ieee,
|
||||
struct rtllib_network *pNetwork)
|
||||
struct rtllib_network *network)
|
||||
{
|
||||
struct rt_hi_throughput *ht_info = ieee->ht_info;
|
||||
struct ht_info_ele *pPeerHTInfo =
|
||||
(struct ht_info_ele *)pNetwork->bssht.bd_ht_info_buf;
|
||||
(struct ht_info_ele *)network->bssht.bd_ht_info_buf;
|
||||
|
||||
if (ht_info->current_ht_support) {
|
||||
if (pNetwork->bssht.bd_ht_info_len != 0)
|
||||
if (network->bssht.bd_ht_info_len != 0)
|
||||
ht_info->current_op_mode = pPeerHTInfo->opt_mode;
|
||||
}
|
||||
}
|
||||
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 *frame)
|
||||
{
|
||||
if (ieee->ht_info->current_ht_support) {
|
||||
if ((is_qos_data_frame(pFrame) && frame_order(pFrame)) == 1) {
|
||||
if ((is_qos_data_frame(frame) && frame_order(frame)) == 1) {
|
||||
netdev_dbg(ieee->dev, "HT CONTROL FILED EXIST!!\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
|
||||
struct rtllib_device *ieee = container_of(ts, struct rtllib_device,
|
||||
rx_ts_records[ts->num]);
|
||||
|
||||
struct rx_reorder_entry *pReorderEntry = NULL;
|
||||
struct rx_reorder_entry *reorder_entry = NULL;
|
||||
|
||||
unsigned long flags = 0;
|
||||
u8 index = 0;
|
||||
@@ -23,31 +23,31 @@ static void RxPktPendingTimeout(struct timer_list *t)
|
||||
spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
|
||||
if (ts->rx_timeout_indicate_seq != 0xffff) {
|
||||
while (!list_empty(&ts->rx_pending_pkt_list)) {
|
||||
pReorderEntry = (struct rx_reorder_entry *)
|
||||
reorder_entry = (struct rx_reorder_entry *)
|
||||
list_entry(ts->rx_pending_pkt_list.prev,
|
||||
struct rx_reorder_entry, list);
|
||||
if (index == 0)
|
||||
ts->rx_indicate_seq = pReorderEntry->SeqNum;
|
||||
ts->rx_indicate_seq = reorder_entry->seq_num;
|
||||
|
||||
if (SN_LESS(pReorderEntry->SeqNum,
|
||||
if (SN_LESS(reorder_entry->seq_num,
|
||||
ts->rx_indicate_seq) ||
|
||||
SN_EQUAL(pReorderEntry->SeqNum,
|
||||
SN_EQUAL(reorder_entry->seq_num,
|
||||
ts->rx_indicate_seq)) {
|
||||
list_del_init(&pReorderEntry->list);
|
||||
list_del_init(&reorder_entry->list);
|
||||
|
||||
if (SN_EQUAL(pReorderEntry->SeqNum,
|
||||
if (SN_EQUAL(reorder_entry->seq_num,
|
||||
ts->rx_indicate_seq))
|
||||
ts->rx_indicate_seq =
|
||||
(ts->rx_indicate_seq + 1) % 4096;
|
||||
|
||||
netdev_dbg(ieee->dev,
|
||||
"%s(): Indicate SeqNum: %d\n",
|
||||
__func__, pReorderEntry->SeqNum);
|
||||
"%s(): Indicate seq_num: %d\n",
|
||||
__func__, reorder_entry->seq_num);
|
||||
ieee->stats_IndicateArray[index] =
|
||||
pReorderEntry->prxb;
|
||||
reorder_entry->prxb;
|
||||
index++;
|
||||
|
||||
list_add_tail(&pReorderEntry->list,
|
||||
list_add_tail(&reorder_entry->list,
|
||||
&ieee->RxReorder_Unused_List);
|
||||
} else {
|
||||
pkt_in_buf = true;
|
||||
@@ -225,7 +225,7 @@ static void MakeTSEntry(struct ts_common_info *ts_common_info, 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 *addr, u8 TID, enum tr_select tx_rx_select, bool add_new_ts)
|
||||
{
|
||||
u8 UP = 0;
|
||||
struct qos_tsinfo tspec;
|
||||
@@ -269,7 +269,7 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS,
|
||||
if (*ppTS)
|
||||
return true;
|
||||
|
||||
if (!bAddNewTs) {
|
||||
if (!add_new_ts) {
|
||||
netdev_dbg(ieee->dev, "add new TS failed(tid:%d)\n", UP);
|
||||
return false;
|
||||
}
|
||||
@@ -336,8 +336,8 @@ static void RemoveTsEntry(struct rtllib_device *ieee,
|
||||
pRxReorderEntry = (struct rx_reorder_entry *)
|
||||
list_entry(ts->rx_pending_pkt_list.prev,
|
||||
struct rx_reorder_entry, list);
|
||||
netdev_dbg(ieee->dev, "%s(): Delete SeqNum %d!\n",
|
||||
__func__, pRxReorderEntry->SeqNum);
|
||||
netdev_dbg(ieee->dev, "%s(): Delete seq_num %d!\n",
|
||||
__func__, pRxReorderEntry->seq_num);
|
||||
list_del_init(&pRxReorderEntry->list);
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
@@ -93,21 +93,21 @@ static inline void *netdev_priv_rsl(struct net_device *dev)
|
||||
#define SUPPORT_CKIP_PK 0x10
|
||||
#define RT_RF_OFF_LEVL_HALT_NIC BIT(3)
|
||||
#define RT_IN_PS_LEVEL(psc, _PS_FLAG) \
|
||||
((psc->CurPsLevel & _PS_FLAG) ? true : false)
|
||||
((psc->cur_ps_level & _PS_FLAG) ? true : false)
|
||||
#define RT_CLEAR_PS_LEVEL(psc, _PS_FLAG) \
|
||||
(psc->CurPsLevel &= (~(_PS_FLAG)))
|
||||
(psc->cur_ps_level &= (~(_PS_FLAG)))
|
||||
|
||||
/* defined for skb cb field */
|
||||
/* At most 28 byte */
|
||||
struct cb_desc {
|
||||
/* Tx Desc Related flags (8-9) */
|
||||
u8 bLastIniPkt:1;
|
||||
u8 bCmdOrInit:1;
|
||||
u8 last_ini_pkt:1;
|
||||
u8 cmd_or_init:1;
|
||||
u8 tx_dis_rate_fallback:1;
|
||||
u8 tx_use_drv_assinged_rate:1;
|
||||
u8 hw_sec:1;
|
||||
|
||||
u8 nStuckCount;
|
||||
u8 stuck_count;
|
||||
|
||||
/* Tx Firmware Related flags (10-11)*/
|
||||
u8 cts_enable:1;
|
||||
@@ -153,20 +153,20 @@ struct cb_desc {
|
||||
};
|
||||
|
||||
enum sw_chnl_cmd_id {
|
||||
CmdID_End,
|
||||
CmdID_SetTxPowerLevel,
|
||||
CmdID_BBRegWrite10,
|
||||
CmdID_WritePortUlong,
|
||||
CmdID_WritePortUshort,
|
||||
CmdID_WritePortUchar,
|
||||
CmdID_RF_WriteReg,
|
||||
cmd_id_end,
|
||||
cmd_id_set_tx_power_level,
|
||||
cmd_id_bbreg_write10,
|
||||
cmd_id_write_port_ulong,
|
||||
cmd_id_write_port_ushort,
|
||||
cmd_id_write_port_uchar,
|
||||
cmd_id_rf_write_reg,
|
||||
};
|
||||
|
||||
struct sw_chnl_cmd {
|
||||
enum sw_chnl_cmd_id CmdID;
|
||||
u32 Para1;
|
||||
u32 Para2;
|
||||
u32 msDelay;
|
||||
enum sw_chnl_cmd_id cmd_id;
|
||||
u32 para1;
|
||||
u32 para2;
|
||||
u32 ms_delay;
|
||||
};
|
||||
|
||||
/*--------------------------Define -------------------------------------------*/
|
||||
@@ -339,12 +339,12 @@ enum rt_op_mode {
|
||||
|
||||
#define FC_QOS_BIT BIT(7)
|
||||
#define is_data_frame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
|
||||
#define is_legacy_data_frame(pdu) (is_data_frame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
|
||||
#define is_legacy_data_frame(pdu) (is_data_frame(pdu) && (!(pdu[0] & FC_QOS_BIT)))
|
||||
#define is_qos_data_frame(pframe) \
|
||||
((*(u16 *)pframe&(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
|
||||
(IEEE80211_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
|
||||
#define frame_order(pframe) (*(u16 *)pframe&IEEE80211_FCTL_ORDER)
|
||||
#define SN_LESS(a, b) (((a-b)&0x800) != 0)
|
||||
((*(u16 *)pframe & (IEEE80211_STYPE_QOS_DATA | RTLLIB_FTYPE_DATA)) == \
|
||||
(IEEE80211_STYPE_QOS_DATA | RTLLIB_FTYPE_DATA))
|
||||
#define frame_order(pframe) (*(u16 *)pframe & IEEE80211_FCTL_ORDER)
|
||||
#define SN_LESS(a, b) (((a - b) & 0x800) != 0)
|
||||
#define SN_EQUAL(a, b) (a == b)
|
||||
#define MAX_DEV_ADDR_SIZE 8
|
||||
|
||||
@@ -414,24 +414,13 @@ enum _REG_PREAMBLE_MODE {
|
||||
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTLLIB_SCTL_FRAG)
|
||||
#define WLAN_GET_SEQ_SEQ(seq) (((seq) & RTLLIB_SCTL_SEQ) >> 4)
|
||||
|
||||
/* Authentication algorithms */
|
||||
#define WLAN_AUTH_OPEN 0
|
||||
#define WLAN_AUTH_SHARED_KEY 1
|
||||
#define WLAN_AUTH_LEAP 128
|
||||
|
||||
#define WLAN_CAPABILITY_ESS (1<<0)
|
||||
#define WLAN_CAPABILITY_IBSS (1<<1)
|
||||
#define WLAN_CAPABILITY_PRIVACY (1<<4)
|
||||
#define WLAN_CAPABILITY_SHORT_PREAMBLE (1<<5)
|
||||
#define WLAN_CAPABILITY_SHORT_SLOT_TIME (1<<10)
|
||||
|
||||
#define RTLLIB_STATMASK_SIGNAL (1<<0)
|
||||
#define RTLLIB_STATMASK_RSSI (1<<1)
|
||||
#define RTLLIB_STATMASK_NOISE (1<<2)
|
||||
#define RTLLIB_STATMASK_SIGNAL (1 << 0)
|
||||
#define RTLLIB_STATMASK_RSSI (1 << 1)
|
||||
#define RTLLIB_STATMASK_NOISE (1 << 2)
|
||||
#define RTLLIB_STATMASK_WEMASK 0x7
|
||||
|
||||
#define RTLLIB_CCK_MODULATION (1<<0)
|
||||
#define RTLLIB_OFDM_MODULATION (1<<1)
|
||||
#define RTLLIB_CCK_MODULATION (1 << 0)
|
||||
#define RTLLIB_OFDM_MODULATION (1 << 1)
|
||||
|
||||
#define RTLLIB_CCK_RATE_LEN 4
|
||||
#define RTLLIB_CCK_RATE_1MB 0x02
|
||||
@@ -475,27 +464,27 @@ struct rtllib_rx_stats {
|
||||
u8 mask;
|
||||
u16 len;
|
||||
u16 Length;
|
||||
u8 SignalQuality;
|
||||
u8 signal_quality;
|
||||
s32 RecvSignalPower;
|
||||
u8 SignalStrength;
|
||||
u16 bHwError:1;
|
||||
u8 signal_strength;
|
||||
u16 hw_error:1;
|
||||
u16 bCRC:1;
|
||||
u16 bICV:1;
|
||||
u16 decrypted:1;
|
||||
u32 time_stamp_low;
|
||||
u32 time_stamp_high;
|
||||
|
||||
u8 RxDrvInfoSize;
|
||||
u8 RxBufShift;
|
||||
u8 rx_drv_info_size;
|
||||
u8 rx_buf_shift;
|
||||
bool bIsAMPDU;
|
||||
bool bFirstMPDU;
|
||||
bool contain_htc;
|
||||
u32 RxPWDBAll;
|
||||
u8 RxMIMOSignalStrength[4];
|
||||
u8 RxMIMOSignalStrength[2];
|
||||
s8 RxMIMOSignalQuality[2];
|
||||
bool bPacketMatchBSSID;
|
||||
bool bIsCCK;
|
||||
bool bPacketToSelf;
|
||||
bool packet_to_self;
|
||||
bool bPacketBeacon;
|
||||
bool bToSelfBA;
|
||||
};
|
||||
@@ -518,11 +507,11 @@ struct rtllib_frag_entry {
|
||||
|
||||
struct rtllib_device;
|
||||
|
||||
#define SEC_ACTIVE_KEY (1<<4)
|
||||
#define SEC_AUTH_MODE (1<<5)
|
||||
#define SEC_UNICAST_GROUP (1<<6)
|
||||
#define SEC_LEVEL (1<<7)
|
||||
#define SEC_ENABLED (1<<8)
|
||||
#define SEC_ACTIVE_KEY (1 << 4)
|
||||
#define SEC_AUTH_MODE (1 << 5)
|
||||
#define SEC_UNICAST_GROUP (1 << 6)
|
||||
#define SEC_LEVEL (1 << 7)
|
||||
#define SEC_ENABLED (1 << 8)
|
||||
|
||||
#define SEC_LEVEL_0 0 /* None */
|
||||
#define SEC_LEVEL_1 1 /* WEP 40 and 104 bit */
|
||||
@@ -707,17 +696,17 @@ union frameqos {
|
||||
#define MAX_WPA_IE_LEN 64
|
||||
#define MAX_WZC_IE_LEN 256
|
||||
|
||||
#define NETWORK_EMPTY_ESSID (1<<0)
|
||||
#define NETWORK_HAS_OFDM (1<<1)
|
||||
#define NETWORK_HAS_CCK (1<<2)
|
||||
#define NETWORK_EMPTY_ESSID (1 << 0)
|
||||
#define NETWORK_HAS_OFDM (1 << 1)
|
||||
#define NETWORK_HAS_CCK (1 << 2)
|
||||
|
||||
/* QoS structure */
|
||||
#define NETWORK_HAS_QOS_PARAMETERS (1<<3)
|
||||
#define NETWORK_HAS_QOS_INFORMATION (1<<4)
|
||||
#define NETWORK_HAS_QOS_PARAMETERS (1 << 3)
|
||||
#define NETWORK_HAS_QOS_INFORMATION (1 << 4)
|
||||
#define NETWORK_HAS_QOS_MASK (NETWORK_HAS_QOS_PARAMETERS | \
|
||||
NETWORK_HAS_QOS_INFORMATION)
|
||||
/* 802.11h */
|
||||
#define NETWORK_HAS_ERP_VALUE (1<<10)
|
||||
#define NETWORK_HAS_ERP_VALUE (1 << 10)
|
||||
|
||||
#define QOS_QUEUE_NUM 4
|
||||
#define QOS_OUI_LEN 3
|
||||
@@ -962,7 +951,7 @@ struct rtllib_network {
|
||||
bool unknown_cap_exist;
|
||||
bool berp_info_valid;
|
||||
bool buseprotection;
|
||||
u8 SignalStrength;
|
||||
u8 signal_strength;
|
||||
u8 RSSI;
|
||||
struct list_head list;
|
||||
};
|
||||
@@ -1007,8 +996,8 @@ enum rtl_link_state {
|
||||
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
||||
#define DEFAULT_FTS 2346
|
||||
|
||||
#define CFG_RTLLIB_RESERVE_FCS (1<<0)
|
||||
#define CFG_RTLLIB_COMPUTE_FCS (1<<1)
|
||||
#define CFG_RTLLIB_RESERVE_FCS (1 << 0)
|
||||
#define CFG_RTLLIB_COMPUTE_FCS (1 << 1)
|
||||
|
||||
struct tx_pending {
|
||||
int frag;
|
||||
@@ -1026,7 +1015,7 @@ struct bandwidth_autoswitch {
|
||||
#define REORDER_ENTRY_NUM 128
|
||||
struct rx_reorder_entry {
|
||||
struct list_head list;
|
||||
u16 SeqNum;
|
||||
u16 seq_num;
|
||||
struct rtllib_rxb *prxb;
|
||||
};
|
||||
|
||||
@@ -1057,7 +1046,7 @@ struct rt_pwr_save_ctrl {
|
||||
u8 lps_idle_count;
|
||||
u8 lps_awake_intvl;
|
||||
|
||||
u32 CurPsLevel;
|
||||
u32 cur_ps_level;
|
||||
};
|
||||
|
||||
#define RT_RF_CHANGE_SOURCE u32
|
||||
@@ -1299,7 +1288,7 @@ struct rtllib_device {
|
||||
u16 scan_watch_dog;
|
||||
|
||||
/* map of allowed channels. 0 is dummy */
|
||||
u8 active_channel_map[MAX_CHANNEL_NUMBER+1];
|
||||
u8 active_channel_map[MAX_CHANNEL_NUMBER + 1];
|
||||
|
||||
int rate; /* current rate */
|
||||
int basic_rate;
|
||||
@@ -1471,9 +1460,9 @@ struct rtllib_device {
|
||||
void (*set_wireless_mode)(struct net_device *dev, u8 wireless_mode);
|
||||
bool (*get_half_nmode_support_by_aps_handler)(struct net_device *dev);
|
||||
u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee);
|
||||
void (*init_gain_handler)(struct net_device *dev, u8 Operation);
|
||||
void (*ScanOperationBackupHandler)(struct net_device *dev,
|
||||
u8 Operation);
|
||||
void (*init_gain_handler)(struct net_device *dev, u8 operation);
|
||||
void (*scan_operation_backup_handler)(struct net_device *dev,
|
||||
u8 operation);
|
||||
void (*set_hw_reg_handler)(struct net_device *dev, u8 variable, u8 *val);
|
||||
|
||||
void (*allow_all_dest_addr_handler)(struct net_device *dev,
|
||||
@@ -1497,32 +1486,32 @@ struct rtllib_device {
|
||||
/* Uses the channel change callback directly
|
||||
* instead of [start/stop] scan callbacks
|
||||
*/
|
||||
#define IEEE_SOFTMAC_SCAN (1<<2)
|
||||
#define IEEE_SOFTMAC_SCAN (1 << 2)
|
||||
|
||||
/* Perform authentication and association handshake */
|
||||
#define IEEE_SOFTMAC_ASSOCIATE (1<<3)
|
||||
#define IEEE_SOFTMAC_ASSOCIATE (1 << 3)
|
||||
|
||||
/* Generate probe requests */
|
||||
#define IEEE_SOFTMAC_PROBERQ (1<<4)
|
||||
#define IEEE_SOFTMAC_PROBERQ (1 << 4)
|
||||
|
||||
/* Generate response to probe requests */
|
||||
#define IEEE_SOFTMAC_PROBERS (1<<5)
|
||||
#define IEEE_SOFTMAC_PROBERS (1 << 5)
|
||||
|
||||
/* The ieee802.11 stack will manage the netif queue
|
||||
* wake/stop for the driver, taking care of 802.11
|
||||
* fragmentation. See softmac.c for details.
|
||||
*/
|
||||
#define IEEE_SOFTMAC_TX_QUEUE (1<<7)
|
||||
#define IEEE_SOFTMAC_TX_QUEUE (1 << 7)
|
||||
|
||||
/* Uses only the softmac_data_hard_start_xmit
|
||||
* even for TX management frames.
|
||||
*/
|
||||
#define IEEE_SOFTMAC_SINGLE_QUEUE (1<<8)
|
||||
#define IEEE_SOFTMAC_SINGLE_QUEUE (1 << 8)
|
||||
|
||||
/* Generate beacons. The stack will enqueue beacons
|
||||
* to the card
|
||||
*/
|
||||
#define IEEE_SOFTMAC_BEACONS (1<<6)
|
||||
#define IEEE_SOFTMAC_BEACONS (1 << 6)
|
||||
|
||||
static inline void *rtllib_priv(struct net_device *dev)
|
||||
{
|
||||
@@ -1737,21 +1726,21 @@ void ht_set_connect_bw_mode(struct rtllib_device *ieee,
|
||||
void ht_update_default_setting(struct rtllib_device *ieee);
|
||||
void ht_construct_capability_element(struct rtllib_device *ieee,
|
||||
u8 *pos_ht_cap, u8 *len,
|
||||
u8 isEncrypt, bool bAssoc);
|
||||
u8 is_encrypt, bool assoc);
|
||||
void ht_construct_rt2rt_agg_element(struct rtllib_device *ieee,
|
||||
u8 *posRT2RTAgg, u8 *len);
|
||||
void ht_on_assoc_rsp(struct rtllib_device *ieee);
|
||||
void ht_initialize_ht_info(struct rtllib_device *ieee);
|
||||
void ht_initialize_bss_desc(struct bss_ht *bss_ht);
|
||||
void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee,
|
||||
struct rtllib_network *pNetwork);
|
||||
struct rtllib_network *network);
|
||||
void HT_update_self_and_peer_setting(struct rtllib_device *ieee,
|
||||
struct rtllib_network *pNetwork);
|
||||
struct rtllib_network *network);
|
||||
u8 ht_get_highest_mcs_rate(struct rtllib_device *ieee, u8 *pMCSRateSet,
|
||||
u8 *pMCSFilter);
|
||||
extern u8 MCS_FILTER_ALL[];
|
||||
extern u16 MCS_DATA_RATE[2][2][77];
|
||||
u8 ht_c_check(struct rtllib_device *ieee, u8 *pFrame);
|
||||
u8 ht_c_check(struct rtllib_device *ieee, u8 *frame);
|
||||
void ht_reset_iot_setting(struct rt_hi_throughput *ht_info);
|
||||
bool is_ht_half_nmode_aps(struct rtllib_device *ieee);
|
||||
u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate);
|
||||
@@ -1768,7 +1757,7 @@ void rtllib_tx_ba_inact_timeout(struct timer_list *t);
|
||||
void rtllib_rx_ba_inact_timeout(struct timer_list *t);
|
||||
void rtllib_reset_ba_entry(struct ba_record *ba);
|
||||
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 add_new_ts);
|
||||
void rtllib_ts_init(struct rtllib_device *ieee);
|
||||
void rtllib_ts_start_add_ba_process(struct rtllib_device *ieee,
|
||||
struct tx_ts_record *pTxTS);
|
||||
|
||||
@@ -637,12 +637,6 @@ static int rtllib_tkip_get_key(void *key, int len, u8 *seq, void *priv)
|
||||
|
||||
if (seq) {
|
||||
/* Return the sequence number of the last transmitted frame. */
|
||||
u16 iv16 = tkey->tx_iv16;
|
||||
u32 iv32 = tkey->tx_iv32;
|
||||
|
||||
if (iv16 == 0)
|
||||
iv32--;
|
||||
iv16--;
|
||||
seq[0] = tkey->tx_iv16;
|
||||
seq[1] = tkey->tx_iv16 >> 8;
|
||||
seq[2] = tkey->tx_iv32;
|
||||
|
||||
@@ -403,26 +403,26 @@ drop:
|
||||
}
|
||||
|
||||
static bool add_reorder_entry(struct rx_ts_record *ts,
|
||||
struct rx_reorder_entry *pReorderEntry)
|
||||
struct rx_reorder_entry *reorder_entry)
|
||||
{
|
||||
struct list_head *list = &ts->rx_pending_pkt_list;
|
||||
|
||||
while (list->next != &ts->rx_pending_pkt_list) {
|
||||
if (SN_LESS(pReorderEntry->SeqNum, ((struct rx_reorder_entry *)
|
||||
if (SN_LESS(reorder_entry->seq_num, ((struct rx_reorder_entry *)
|
||||
list_entry(list->next, struct rx_reorder_entry,
|
||||
list))->SeqNum))
|
||||
list))->seq_num))
|
||||
list = list->next;
|
||||
else if (SN_EQUAL(pReorderEntry->SeqNum,
|
||||
else if (SN_EQUAL(reorder_entry->seq_num,
|
||||
((struct rx_reorder_entry *)list_entry(list->next,
|
||||
struct rx_reorder_entry, list))->SeqNum))
|
||||
struct rx_reorder_entry, list))->seq_num))
|
||||
return false;
|
||||
else
|
||||
break;
|
||||
}
|
||||
pReorderEntry->list.next = list->next;
|
||||
pReorderEntry->list.next->prev = &pReorderEntry->list;
|
||||
pReorderEntry->list.prev = list;
|
||||
list->next = &pReorderEntry->list;
|
||||
reorder_entry->list.next = list->next;
|
||||
reorder_entry->list.next->prev = &reorder_entry->list;
|
||||
reorder_entry->list.prev = list;
|
||||
list->next = &reorder_entry->list;
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -504,8 +504,8 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
|
||||
pRxReorderEntry = (struct rx_reorder_entry *)
|
||||
list_entry(ts->rx_pending_pkt_list.prev,
|
||||
struct rx_reorder_entry, list);
|
||||
netdev_dbg(ieee->dev, "%s(): Indicate SeqNum %d!\n", __func__,
|
||||
pRxReorderEntry->SeqNum);
|
||||
netdev_dbg(ieee->dev, "%s(): Indicate seq_num %d!\n", __func__,
|
||||
pRxReorderEntry->seq_num);
|
||||
list_del_init(&pRxReorderEntry->list);
|
||||
|
||||
ieee->rfd_array[rfd_cnt] = pRxReorderEntry->prxb;
|
||||
@@ -521,10 +521,10 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee,
|
||||
|
||||
static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
|
||||
struct rtllib_rxb *prxb,
|
||||
struct rx_ts_record *ts, u16 SeqNum)
|
||||
struct rx_ts_record *ts, u16 seq_num)
|
||||
{
|
||||
struct rt_hi_throughput *ht_info = ieee->ht_info;
|
||||
struct rx_reorder_entry *pReorderEntry = NULL;
|
||||
struct rx_reorder_entry *reorder_entry = NULL;
|
||||
u8 win_size = ht_info->rx_reorder_win_size;
|
||||
u16 win_end = 0;
|
||||
u8 index = 0;
|
||||
@@ -533,20 +533,20 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
|
||||
|
||||
netdev_dbg(ieee->dev,
|
||||
"%s(): Seq is %d, ts->rx_indicate_seq is %d, win_size is %d\n",
|
||||
__func__, SeqNum, ts->rx_indicate_seq, win_size);
|
||||
__func__, seq_num, ts->rx_indicate_seq, win_size);
|
||||
|
||||
spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
|
||||
|
||||
win_end = (ts->rx_indicate_seq + win_size - 1) % 4096;
|
||||
/* Rx Reorder initialize condition.*/
|
||||
if (ts->rx_indicate_seq == 0xffff)
|
||||
ts->rx_indicate_seq = SeqNum;
|
||||
ts->rx_indicate_seq = seq_num;
|
||||
|
||||
/* Drop out the packet which SeqNum is smaller than WinStart */
|
||||
if (SN_LESS(SeqNum, ts->rx_indicate_seq)) {
|
||||
/* Drop out the packet which seq_num is smaller than WinStart */
|
||||
if (SN_LESS(seq_num, ts->rx_indicate_seq)) {
|
||||
netdev_dbg(ieee->dev,
|
||||
"Packet Drop! IndicateSeq: %d, NewSeq: %d\n",
|
||||
ts->rx_indicate_seq, SeqNum);
|
||||
ts->rx_indicate_seq, seq_num);
|
||||
ht_info->rx_reorder_drop_counter++;
|
||||
{
|
||||
int i;
|
||||
@@ -561,62 +561,62 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
|
||||
}
|
||||
|
||||
/* Sliding window manipulation. Conditions includes:
|
||||
* 1. Incoming SeqNum is equal to WinStart =>Window shift 1
|
||||
* 2. Incoming SeqNum is larger than the win_end => Window shift N
|
||||
* 1. Incoming seq_num is equal to WinStart =>Window shift 1
|
||||
* 2. Incoming seq_num is larger than the win_end => Window shift N
|
||||
*/
|
||||
if (SN_EQUAL(SeqNum, ts->rx_indicate_seq)) {
|
||||
if (SN_EQUAL(seq_num, ts->rx_indicate_seq)) {
|
||||
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) % 4096;
|
||||
match_win_start = true;
|
||||
} else if (SN_LESS(win_end, SeqNum)) {
|
||||
if (SeqNum >= (win_size - 1))
|
||||
ts->rx_indicate_seq = SeqNum + 1 - win_size;
|
||||
} else if (SN_LESS(win_end, seq_num)) {
|
||||
if (seq_num >= (win_size - 1))
|
||||
ts->rx_indicate_seq = seq_num + 1 - win_size;
|
||||
else
|
||||
ts->rx_indicate_seq = 4095 -
|
||||
(win_size - (SeqNum + 1)) + 1;
|
||||
(win_size - (seq_num + 1)) + 1;
|
||||
netdev_dbg(ieee->dev,
|
||||
"Window Shift! IndicateSeq: %d, NewSeq: %d\n",
|
||||
ts->rx_indicate_seq, SeqNum);
|
||||
ts->rx_indicate_seq, seq_num);
|
||||
}
|
||||
|
||||
/* Indication process.
|
||||
* After Packet dropping and Sliding Window shifting as above, we can
|
||||
* now just indicate the packets with the SeqNum smaller than latest
|
||||
* now just indicate the packets with the seq_num smaller than latest
|
||||
* WinStart and struct buffer other packets.
|
||||
*
|
||||
* For Rx Reorder condition:
|
||||
* 1. All packets with SeqNum smaller than WinStart => Indicate
|
||||
* 2. All packets with SeqNum larger than or equal to
|
||||
* 1. All packets with seq_num smaller than WinStart => Indicate
|
||||
* 2. All packets with seq_num larger than or equal to
|
||||
* WinStart => Buffer it.
|
||||
*/
|
||||
if (match_win_start) {
|
||||
/* Current packet is going to be indicated.*/
|
||||
netdev_dbg(ieee->dev,
|
||||
"Packets indication! IndicateSeq: %d, NewSeq: %d\n",
|
||||
ts->rx_indicate_seq, SeqNum);
|
||||
ts->rx_indicate_seq, seq_num);
|
||||
ieee->prxb_indicate_array[0] = prxb;
|
||||
index = 1;
|
||||
} else {
|
||||
/* Current packet is going to be inserted into pending list.*/
|
||||
if (!list_empty(&ieee->RxReorder_Unused_List)) {
|
||||
pReorderEntry = (struct rx_reorder_entry *)
|
||||
reorder_entry = (struct rx_reorder_entry *)
|
||||
list_entry(ieee->RxReorder_Unused_List.next,
|
||||
struct rx_reorder_entry, list);
|
||||
list_del_init(&pReorderEntry->list);
|
||||
list_del_init(&reorder_entry->list);
|
||||
|
||||
/* Make a reorder entry and insert
|
||||
* into a the packet list.
|
||||
*/
|
||||
pReorderEntry->SeqNum = SeqNum;
|
||||
pReorderEntry->prxb = prxb;
|
||||
reorder_entry->seq_num = seq_num;
|
||||
reorder_entry->prxb = prxb;
|
||||
|
||||
if (!add_reorder_entry(ts, pReorderEntry)) {
|
||||
if (!add_reorder_entry(ts, reorder_entry)) {
|
||||
int i;
|
||||
|
||||
netdev_dbg(ieee->dev,
|
||||
"%s(): Duplicate packet is dropped. IndicateSeq: %d, NewSeq: %d\n",
|
||||
__func__, ts->rx_indicate_seq,
|
||||
SeqNum);
|
||||
list_add_tail(&pReorderEntry->list,
|
||||
seq_num);
|
||||
list_add_tail(&reorder_entry->list,
|
||||
&ieee->RxReorder_Unused_List);
|
||||
|
||||
for (i = 0; i < prxb->nr_subframes; i++)
|
||||
@@ -626,7 +626,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
|
||||
} else {
|
||||
netdev_dbg(ieee->dev,
|
||||
"Pkt insert into struct buffer. IndicateSeq: %d, NewSeq: %d\n",
|
||||
ts->rx_indicate_seq, SeqNum);
|
||||
ts->rx_indicate_seq, seq_num);
|
||||
}
|
||||
} else {
|
||||
/* Packets are dropped if there are not enough reorder
|
||||
@@ -653,12 +653,12 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
|
||||
netdev_dbg(ieee->dev, "%s(): start RREORDER indicate\n",
|
||||
__func__);
|
||||
|
||||
pReorderEntry = (struct rx_reorder_entry *)
|
||||
reorder_entry = (struct rx_reorder_entry *)
|
||||
list_entry(ts->rx_pending_pkt_list.prev,
|
||||
struct rx_reorder_entry,
|
||||
list);
|
||||
if (SN_LESS(pReorderEntry->SeqNum, ts->rx_indicate_seq) ||
|
||||
SN_EQUAL(pReorderEntry->SeqNum, ts->rx_indicate_seq)) {
|
||||
if (SN_LESS(reorder_entry->seq_num, ts->rx_indicate_seq) ||
|
||||
SN_EQUAL(reorder_entry->seq_num, ts->rx_indicate_seq)) {
|
||||
/* This protect struct buffer from overflow. */
|
||||
if (index >= REORDER_WIN_SIZE) {
|
||||
netdev_err(ieee->dev,
|
||||
@@ -668,18 +668,18 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
|
||||
break;
|
||||
}
|
||||
|
||||
list_del_init(&pReorderEntry->list);
|
||||
list_del_init(&reorder_entry->list);
|
||||
|
||||
if (SN_EQUAL(pReorderEntry->SeqNum, ts->rx_indicate_seq))
|
||||
if (SN_EQUAL(reorder_entry->seq_num, ts->rx_indicate_seq))
|
||||
ts->rx_indicate_seq = (ts->rx_indicate_seq + 1) %
|
||||
4096;
|
||||
|
||||
ieee->prxb_indicate_array[index] = pReorderEntry->prxb;
|
||||
netdev_dbg(ieee->dev, "%s(): Indicate SeqNum %d!\n",
|
||||
__func__, pReorderEntry->SeqNum);
|
||||
ieee->prxb_indicate_array[index] = reorder_entry->prxb;
|
||||
netdev_dbg(ieee->dev, "%s(): Indicate seq_num %d!\n",
|
||||
__func__, reorder_entry->seq_num);
|
||||
index++;
|
||||
|
||||
list_add_tail(&pReorderEntry->list,
|
||||
list_add_tail(&reorder_entry->list,
|
||||
&ieee->RxReorder_Unused_List);
|
||||
} else {
|
||||
pkt_in_buf = true;
|
||||
@@ -729,12 +729,12 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||
|
||||
u16 llc_offset = sizeof(struct ieee80211_hdr_3addr);
|
||||
bool is_aggregate_frame = false;
|
||||
u16 nSubframe_Length;
|
||||
u16 subframe_len;
|
||||
u8 pad_len = 0;
|
||||
u16 SeqNum = 0;
|
||||
u16 seq_num = 0;
|
||||
struct sk_buff *sub_skb;
|
||||
/* just for debug purpose */
|
||||
SeqNum = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctrl));
|
||||
seq_num = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctrl));
|
||||
if ((RTLLIB_QOS_HAS_SEQ(fc)) &&
|
||||
(((union frameqos *)(skb->data + RTLLIB_3ADDR_LEN))->field.reserved))
|
||||
is_aggregate_frame = true;
|
||||
@@ -781,23 +781,23 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||
memcpy(rxb->dst, dst, ETH_ALEN);
|
||||
while (skb->len > ETHERNET_HEADER_SIZE) {
|
||||
/* Offset 12 denote 2 mac address */
|
||||
nSubframe_Length = *((u16 *)(skb->data + 12));
|
||||
nSubframe_Length = (nSubframe_Length >> 8) +
|
||||
(nSubframe_Length << 8);
|
||||
subframe_len = *((u16 *)(skb->data + 12));
|
||||
subframe_len = (subframe_len >> 8) +
|
||||
(subframe_len << 8);
|
||||
|
||||
if (skb->len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
|
||||
if (skb->len < (ETHERNET_HEADER_SIZE + subframe_len)) {
|
||||
netdev_info(ieee->dev,
|
||||
"%s: A-MSDU parse error!! pRfd->nTotalSubframe : %d\n",
|
||||
__func__, rxb->nr_subframes);
|
||||
netdev_info(ieee->dev,
|
||||
"%s: A-MSDU parse error!! Subframe Length: %d\n",
|
||||
__func__, nSubframe_Length);
|
||||
__func__, subframe_len);
|
||||
netdev_info(ieee->dev,
|
||||
"nRemain_Length is %d and nSubframe_Length is : %d\n",
|
||||
skb->len, nSubframe_Length);
|
||||
"nRemain_Length is %d and subframe_len is : %d\n",
|
||||
skb->len, subframe_len);
|
||||
netdev_info(ieee->dev,
|
||||
"The Packet SeqNum is %d\n",
|
||||
SeqNum);
|
||||
"The Packet seq_num is %d\n",
|
||||
seq_num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -813,11 +813,11 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||
*/
|
||||
|
||||
/* Allocate new skb for releasing to upper layer */
|
||||
sub_skb = dev_alloc_skb(nSubframe_Length + 12);
|
||||
sub_skb = dev_alloc_skb(subframe_len + 12);
|
||||
if (!sub_skb)
|
||||
return 0;
|
||||
skb_reserve(sub_skb, 12);
|
||||
skb_put_data(sub_skb, skb->data, nSubframe_Length);
|
||||
skb_put_data(sub_skb, skb->data, subframe_len);
|
||||
|
||||
sub_skb->dev = ieee->dev;
|
||||
rxb->subframes[rxb->nr_subframes++] = sub_skb;
|
||||
@@ -826,10 +826,10 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||
"ParseSubframe(): Too many Subframes! Packets dropped!\n");
|
||||
break;
|
||||
}
|
||||
skb_pull(skb, nSubframe_Length);
|
||||
skb_pull(skb, subframe_len);
|
||||
|
||||
if (skb->len != 0) {
|
||||
pad_len = 4 - ((nSubframe_Length +
|
||||
pad_len = 4 - ((subframe_len +
|
||||
ETHERNET_HEADER_SIZE) % 4);
|
||||
if (pad_len == 4)
|
||||
pad_len = 0;
|
||||
@@ -1227,7 +1227,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
|
||||
struct lib80211_crypt_data *crypt = NULL;
|
||||
struct rtllib_rxb *rxb = NULL;
|
||||
struct rx_ts_record *ts = NULL;
|
||||
u16 fc, sc, SeqNum = 0;
|
||||
u16 fc, sc, seq_num = 0;
|
||||
u8 type, stype, multicast = 0, unicast = 0, nr_subframes = 0, TID = 0;
|
||||
u8 dst[ETH_ALEN];
|
||||
u8 src[ETH_ALEN];
|
||||
@@ -1321,7 +1321,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
|
||||
if (ieee->current_network.qos_data.active && is_qos_data_frame(skb->data)
|
||||
&& !is_multicast_ether_addr(hdr->addr1)) {
|
||||
TID = frame_qos_tid(skb->data);
|
||||
SeqNum = WLAN_GET_SEQ_SEQ(sc);
|
||||
seq_num = WLAN_GET_SEQ_SEQ(sc);
|
||||
rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2, TID,
|
||||
RX_DIR, true);
|
||||
if (TID != 0 && TID != 3)
|
||||
@@ -1362,7 +1362,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
|
||||
if (!ieee->ht_info->cur_rx_reorder_enable || !ts)
|
||||
rtllib_rx_indicate_pkt_legacy(ieee, rx_stats, rxb, dst, src);
|
||||
else
|
||||
rx_reorder_indicate_packet(ieee, rxb, ts, SeqNum);
|
||||
rx_reorder_indicate_packet(ieee, rxb, ts, seq_num);
|
||||
|
||||
dev_kfree_skb(skb);
|
||||
|
||||
@@ -2177,8 +2177,8 @@ static inline int rtllib_network_init(
|
||||
network->marvell_cap_exist = false;
|
||||
network->airgo_cap_exist = false;
|
||||
network->turbo_enable = 0;
|
||||
network->SignalStrength = stats->SignalStrength;
|
||||
network->RSSI = stats->SignalStrength;
|
||||
network->signal_strength = stats->signal_strength;
|
||||
network->RSSI = stats->signal_strength;
|
||||
network->country_ie_len = 0;
|
||||
memset(network->country_ie_buf, 0, MAX_IE_LEN);
|
||||
ht_initialize_bss_desc(&network->bssht);
|
||||
@@ -2215,7 +2215,7 @@ static inline int rtllib_network_init(
|
||||
}
|
||||
if (rtllib_is_empty_essid(network->ssid, network->ssid_len))
|
||||
network->flags |= NETWORK_EMPTY_ESSID;
|
||||
stats->signal = 30 + (stats->SignalStrength * 70) / 100;
|
||||
stats->signal = 30 + (stats->signal_strength * 70) / 100;
|
||||
stats->noise = rtllib_translate_todbm((u8)(100 - stats->signal)) - 25;
|
||||
|
||||
memcpy(&network->stats, stats, sizeof(network->stats));
|
||||
@@ -2334,7 +2334,7 @@ static inline void update_network(struct rtllib_device *ieee,
|
||||
src->wmm_param[3].ac_aci_acm_aifsn)
|
||||
memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
|
||||
|
||||
dst->SignalStrength = src->SignalStrength;
|
||||
dst->signal_strength = src->signal_strength;
|
||||
dst->RSSI = src->RSSI;
|
||||
dst->turbo_enable = src->turbo_enable;
|
||||
|
||||
|
||||
@@ -314,7 +314,7 @@ void rtllib_wx_sync_scan_wq(void *data)
|
||||
/* wait for ps packet to be kicked out successfully */
|
||||
msleep(50);
|
||||
|
||||
ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_BACKUP);
|
||||
ieee->scan_operation_backup_handler(ieee->dev, SCAN_OPT_BACKUP);
|
||||
|
||||
if (ieee->ht_info->current_ht_support && ieee->ht_info->enable_ht &&
|
||||
ieee->ht_info->cur_bw_40mhz) {
|
||||
@@ -339,7 +339,7 @@ void rtllib_wx_sync_scan_wq(void *data)
|
||||
ieee->set_chan(ieee->dev, chan);
|
||||
}
|
||||
|
||||
ieee->ScanOperationBackupHandler(ieee->dev, SCAN_OPT_RESTORE);
|
||||
ieee->scan_operation_backup_handler(ieee->dev, SCAN_OPT_RESTORE);
|
||||
|
||||
ieee->link_state = MAC80211_LINKED;
|
||||
ieee->link_change(ieee->dev);
|
||||
|
||||
@@ -136,10 +136,6 @@ void r8712_free_recvframe(union recv_frame *precvframe,
|
||||
static void update_recvframe_attrib_from_recvstat(struct rx_pkt_attrib *pattrib,
|
||||
struct recv_stat *prxstat)
|
||||
{
|
||||
u16 drvinfo_sz;
|
||||
|
||||
drvinfo_sz = (le32_to_cpu(prxstat->rxdw0) & 0x000f0000) >> 16;
|
||||
drvinfo_sz <<= 3;
|
||||
/*TODO:
|
||||
* Offset 0
|
||||
*/
|
||||
|
||||
@@ -528,8 +528,9 @@ void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
|
||||
if (unicast_key)
|
||||
memcpy(&psetstakey_para->key, &sta->x_UncstKey, 16);
|
||||
else
|
||||
memcpy(&psetstakey_para->key, &psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1].
|
||||
skey, 16);
|
||||
memcpy(&psetstakey_para->key,
|
||||
&psecuritypriv->XGrpKey[psecuritypriv->XGrpKeyid - 1].skey,
|
||||
16);
|
||||
r8712_enqueue_cmd(pcmdpriv, ph2c);
|
||||
}
|
||||
|
||||
|
||||
@@ -736,7 +736,7 @@ void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj
|
||||
void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
|
||||
void r8712_setstaKey_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
|
||||
void r8712_setassocsta_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
|
||||
void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, u32 tryPktCnt,
|
||||
void r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl, u32 tryPktCnt,
|
||||
u32 tryPktInterval, u32 firstStageTO);
|
||||
|
||||
struct _cmd_callback {
|
||||
|
||||
@@ -48,8 +48,8 @@ static uint _init_intf_hdl(struct _adapter *padapter,
|
||||
set_intf_funs = &(r8712_usb_set_intf_funs);
|
||||
set_intf_ops = &r8712_usb_set_intf_ops;
|
||||
init_intf_priv = &r8712_usb_init_intf_priv;
|
||||
pintf_priv = pintf_hdl->pintfpriv = kmalloc(sizeof(struct intf_priv),
|
||||
GFP_ATOMIC);
|
||||
pintf_priv = kmalloc(sizeof(*pintf_priv), GFP_ATOMIC);
|
||||
pintf_hdl->pintfpriv = pintf_priv;
|
||||
if (!pintf_priv)
|
||||
goto _init_intf_hdl_fail;
|
||||
pintf_hdl->adapter = (u8 *)padapter;
|
||||
|
||||
@@ -221,7 +221,7 @@ static void r8712_usb_read_port_complete(struct urb *purb)
|
||||
fallthrough;
|
||||
case -EPROTO:
|
||||
r8712_read_port(padapter, precvpriv->ff_hwaddr, 0,
|
||||
(unsigned char *)precvbuf);
|
||||
(unsigned char *)precvbuf);
|
||||
break;
|
||||
case -EINPROGRESS:
|
||||
netdev_err(padapter->pnetdev, "ERROR: URB IS IN PROGRESS!\n");
|
||||
|
||||
@@ -3,7 +3,6 @@ config RTL8723BS
|
||||
tristate "Realtek RTL8723BS SDIO Wireless LAN NIC driver"
|
||||
depends on WLAN && MMC && CFG80211
|
||||
depends on m
|
||||
select CFG80211_WEXT
|
||||
select CRYPTO
|
||||
select CRYPTO_LIB_ARC4
|
||||
help
|
||||
|
||||
@@ -3,7 +3,6 @@ r8723bs-y = \
|
||||
core/rtw_ap.o \
|
||||
core/rtw_btcoex.o \
|
||||
core/rtw_cmd.o \
|
||||
core/rtw_debug.o \
|
||||
core/rtw_efuse.o \
|
||||
core/rtw_io.o \
|
||||
core/rtw_ioctl_set.o \
|
||||
@@ -12,7 +11,6 @@ r8723bs-y = \
|
||||
core/rtw_mlme_ext.o \
|
||||
core/rtw_pwrctrl.o \
|
||||
core/rtw_recv.o \
|
||||
core/rtw_rf.o \
|
||||
core/rtw_security.o \
|
||||
core/rtw_sta_mgt.o \
|
||||
core/rtw_wlan_util.o \
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
void init_mlme_ap_info(struct adapter *padapter)
|
||||
@@ -277,7 +276,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
||||
/* switch to correct channel of current network before issue keep-alive frames */
|
||||
if (rtw_get_oper_ch(padapter) != pmlmeext->cur_channel) {
|
||||
backup_oper_channel = rtw_get_oper_ch(padapter);
|
||||
SelectChannel(padapter, pmlmeext->cur_channel);
|
||||
r8723bs_select_channel(padapter, pmlmeext->cur_channel);
|
||||
}
|
||||
|
||||
/* issue null data to check sta alive*/
|
||||
@@ -315,7 +314,7 @@ void expire_timeout_chk(struct adapter *padapter)
|
||||
}
|
||||
|
||||
if (backup_oper_channel > 0) /* back to the original operation channel */
|
||||
SelectChannel(padapter, backup_oper_channel);
|
||||
r8723bs_select_channel(padapter, backup_oper_channel);
|
||||
}
|
||||
|
||||
associated_clients_update(padapter, updated);
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtw_btcoex.h>
|
||||
#include <hal_btcoex.h>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_btcoex.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
@@ -1884,9 +1883,6 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
||||
/* copy pdev_network information to pmlmepriv->cur_network */
|
||||
memcpy(&tgt_network->network, pnetwork, (get_wlan_bssid_ex_sz(pnetwork)));
|
||||
|
||||
/* reset ds_config */
|
||||
/* tgt_network->network.configuration.ds_config = (u32)rtw_ch2freq(pnetwork->configuration.ds_config); */
|
||||
|
||||
_clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
|
||||
|
||||
spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_btcoex.h>
|
||||
|
||||
#include <rtw_version.h>
|
||||
|
||||
static void dump_4_regs(struct adapter *adapter, int offset)
|
||||
{
|
||||
u32 reg[4];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
reg[i] = rtw_read32(adapter, offset + i);
|
||||
|
||||
netdev_dbg(adapter->pnetdev, "0x%03x 0x%08x 0x%08x 0x%08x 0x%08x\n",
|
||||
i, reg[0], reg[1], reg[2], reg[3]);
|
||||
}
|
||||
|
||||
void mac_reg_dump(struct adapter *adapter)
|
||||
{
|
||||
int i;
|
||||
|
||||
netdev_dbg(adapter->pnetdev, "======= MAC REG =======\n");
|
||||
|
||||
for (i = 0x0; i < 0x800; i += 4)
|
||||
dump_4_regs(adapter, i);
|
||||
}
|
||||
|
||||
void bb_reg_dump(struct adapter *adapter)
|
||||
{
|
||||
int i;
|
||||
|
||||
netdev_dbg(adapter->pnetdev, "======= BB REG =======\n");
|
||||
|
||||
for (i = 0x800; i < 0x1000 ; i += 4)
|
||||
dump_4_regs(adapter, i);
|
||||
}
|
||||
|
||||
static void dump_4_rf_regs(struct adapter *adapter, int path, int offset)
|
||||
{
|
||||
u8 reg[4];
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
reg[i] = rtw_hal_read_rfreg(adapter, path, offset + i,
|
||||
0xffffffff);
|
||||
|
||||
netdev_dbg(adapter->pnetdev, "0x%02x 0x%08x 0x%08x 0x%08x 0x%08x\n",
|
||||
i, reg[0], reg[1], reg[2], reg[3]);
|
||||
}
|
||||
|
||||
void rf_reg_dump(struct adapter *adapter)
|
||||
{
|
||||
int i, path = 0;
|
||||
|
||||
netdev_dbg(adapter->pnetdev, "======= RF REG =======\n");
|
||||
|
||||
netdev_dbg(adapter->pnetdev, "RF_Path(%x)\n", path);
|
||||
for (i = 0; i < 0x100; i++)
|
||||
dump_4_rf_regs(adapter, path, i);
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_data.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
@@ -38,7 +37,7 @@ Efuse_Read1ByteFromFakeContent(u16 Offset, u8 *Value)
|
||||
if (fakeEfuseBank == 0)
|
||||
*Value = fakeEfuseContent[Offset];
|
||||
else
|
||||
*Value = fakeBTEfuseContent[fakeEfuseBank-1][Offset];
|
||||
*Value = fakeBTEfuseContent[fakeEfuseBank - 1][Offset];
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -50,7 +49,7 @@ Efuse_Write1ByteToFakeContent(u16 Offset, u8 Value)
|
||||
if (fakeEfuseBank == 0)
|
||||
fakeEfuseContent[Offset] = Value;
|
||||
else
|
||||
fakeBTEfuseContent[fakeEfuseBank-1][Offset] = Value;
|
||||
fakeBTEfuseContent[fakeEfuseBank - 1][Offset] = Value;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -206,21 +205,21 @@ u16 Address)
|
||||
if (Address < contentLen) {/* E-fuse 512Byte */
|
||||
/* Write E-fuse Register address bit0~7 */
|
||||
temp = Address & 0xFF;
|
||||
rtw_write8(Adapter, EFUSE_CTRL+1, temp);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
|
||||
rtw_write8(Adapter, EFUSE_CTRL + 1, temp);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 2);
|
||||
/* Write E-fuse Register address bit8~9 */
|
||||
temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
|
||||
rtw_write8(Adapter, EFUSE_CTRL+2, temp);
|
||||
rtw_write8(Adapter, EFUSE_CTRL + 2, temp);
|
||||
|
||||
/* Write 0x30[31]= 0 */
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 3);
|
||||
temp = Bytetemp & 0x7F;
|
||||
rtw_write8(Adapter, EFUSE_CTRL+3, temp);
|
||||
rtw_write8(Adapter, EFUSE_CTRL + 3, temp);
|
||||
|
||||
/* Wait Write-ready (0x30[31]= 1) */
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 3);
|
||||
while (!(Bytetemp & 0x80)) {
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
|
||||
Bytetemp = rtw_read8(Adapter, EFUSE_CTRL + 3);
|
||||
k++;
|
||||
if (k == 1000)
|
||||
break;
|
||||
@@ -253,16 +252,16 @@ bool bPseudoTest)
|
||||
|
||||
/* -----------------e-fuse reg ctrl --------------------------------- */
|
||||
/* address */
|
||||
rtw_write8(padapter, EFUSE_CTRL+1, (u8)(addr&0xff));
|
||||
rtw_write8(padapter, EFUSE_CTRL+2, ((u8)((addr>>8) & 0x03)) |
|
||||
(rtw_read8(padapter, EFUSE_CTRL+2)&0xFC));
|
||||
rtw_write8(padapter, EFUSE_CTRL + 1, (u8)(addr & 0xff));
|
||||
rtw_write8(padapter, EFUSE_CTRL + 2, ((u8)((addr >> 8) & 0x03)) |
|
||||
(rtw_read8(padapter, EFUSE_CTRL + 2) & 0xFC));
|
||||
|
||||
/* rtw_write8(padapter, EFUSE_CTRL+3, 0x72); read cmd */
|
||||
/* Write bit 32 0 */
|
||||
readbyte = rtw_read8(padapter, EFUSE_CTRL+3);
|
||||
rtw_write8(padapter, EFUSE_CTRL+3, (readbyte & 0x7f));
|
||||
readbyte = rtw_read8(padapter, EFUSE_CTRL + 3);
|
||||
rtw_write8(padapter, EFUSE_CTRL + 3, (readbyte & 0x7f));
|
||||
|
||||
while (!(0x80 & rtw_read8(padapter, EFUSE_CTRL+3)) && (tmpidx < 1000)) {
|
||||
while (!(0x80 & rtw_read8(padapter, EFUSE_CTRL + 3)) && (tmpidx < 1000)) {
|
||||
mdelay(1);
|
||||
tmpidx++;
|
||||
}
|
||||
@@ -282,31 +281,22 @@ u8 efuse_OneByteWrite(struct adapter *padapter, u16 addr, u8 data, bool bPseudoT
|
||||
{
|
||||
u8 tmpidx = 0;
|
||||
u8 bResult = false;
|
||||
u32 efuseValue;
|
||||
|
||||
if (bPseudoTest)
|
||||
return Efuse_Write1ByteToFakeContent(addr, data);
|
||||
|
||||
|
||||
/* -----------------e-fuse reg ctrl --------------------------------- */
|
||||
/* address */
|
||||
|
||||
|
||||
efuseValue = rtw_read32(padapter, EFUSE_CTRL);
|
||||
efuseValue |= (BIT21|BIT31);
|
||||
efuseValue &= ~(0x3FFFF);
|
||||
efuseValue |= ((addr<<8 | data) & 0x3FFFF);
|
||||
|
||||
|
||||
/* <20130227, Kordan> 8192E MP chip A-cut had better not set 0x34[11] until B-Cut. */
|
||||
|
||||
/* <20130121, Kordan> For SMIC EFUSE specificatoin. */
|
||||
/* 0x34[11]: SW force PGMEN input of efuse to high. (for the bank selected by 0x34[9:8]) */
|
||||
/* PHY_SetMacReg(padapter, 0x34, BIT11, 1); */
|
||||
rtw_write16(padapter, 0x34, rtw_read16(padapter, 0x34) | (BIT11));
|
||||
rtw_write32(padapter, EFUSE_CTRL, 0x90600000|((addr<<8 | data)));
|
||||
rtw_write32(padapter, EFUSE_CTRL, 0x90600000 | ((addr << 8 | data)));
|
||||
|
||||
while ((0x80 & rtw_read8(padapter, EFUSE_CTRL+3)) && (tmpidx < 100)) {
|
||||
while ((0x80 & rtw_read8(padapter, EFUSE_CTRL + 3)) && (tmpidx < 100)) {
|
||||
mdelay(1);
|
||||
tmpidx++;
|
||||
}
|
||||
@@ -365,19 +355,19 @@ efuse_WordEnableDataRead(u8 word_en,
|
||||
u8 *sourdata,
|
||||
u8 *targetdata)
|
||||
{
|
||||
if (!(word_en&BIT(0))) {
|
||||
if (!(word_en & BIT(0))) {
|
||||
targetdata[0] = sourdata[0];
|
||||
targetdata[1] = sourdata[1];
|
||||
}
|
||||
if (!(word_en&BIT(1))) {
|
||||
if (!(word_en & BIT(1))) {
|
||||
targetdata[2] = sourdata[2];
|
||||
targetdata[3] = sourdata[3];
|
||||
}
|
||||
if (!(word_en&BIT(2))) {
|
||||
if (!(word_en & BIT(2))) {
|
||||
targetdata[4] = sourdata[4];
|
||||
targetdata[5] = sourdata[5];
|
||||
}
|
||||
if (!(word_en&BIT(3))) {
|
||||
if (!(word_en & BIT(3))) {
|
||||
targetdata[6] = sourdata[6];
|
||||
targetdata[7] = sourdata[7];
|
||||
}
|
||||
@@ -463,7 +453,7 @@ static void efuse_ShadowRead2Byte(struct adapter *padapter, u16 Offset, u16 *Val
|
||||
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
|
||||
|
||||
*Value = pEEPROM->efuse_eeprom_data[Offset];
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8;
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset + 1] << 8;
|
||||
|
||||
} /* EFUSE_ShadowRead2Byte */
|
||||
|
||||
@@ -473,9 +463,9 @@ static void efuse_ShadowRead4Byte(struct adapter *padapter, u16 Offset, u32 *Val
|
||||
struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(padapter);
|
||||
|
||||
*Value = pEEPROM->efuse_eeprom_data[Offset];
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8;
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset+2]<<16;
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset+3]<<24;
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset + 1] << 8;
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset + 2] << 16;
|
||||
*Value |= pEEPROM->efuse_eeprom_data[Offset + 3] << 24;
|
||||
|
||||
} /* efuse_ShadowRead4Byte */
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <linux/of.h>
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
@@ -55,7 +54,9 @@ static u8 WIFI_OFDMRATES[] = {
|
||||
|
||||
int rtw_get_bit_value_from_ieee_value(u8 val)
|
||||
{
|
||||
unsigned char dot11_rate_table[] = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108, 0}; /* last element must be zero!! */
|
||||
static const unsigned char dot11_rate_table[] = {
|
||||
2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108, 0
|
||||
}; /* last element must be zero!! */
|
||||
int i = 0;
|
||||
|
||||
while (dot11_rate_table[i] != 0) {
|
||||
|
||||
@@ -26,7 +26,6 @@ jackson@realtek.com.tw
|
||||
*/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
|
||||
u8 rtw_read8(struct adapter *adapter, u32 addr)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
|
||||
u8 rtw_validate_bssid(u8 *bssid)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
#include <linux/etherdevice.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_btcoex.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtw_wifi_regd.h>
|
||||
#include <hal_btcoex.h>
|
||||
#include <linux/kernel.h>
|
||||
@@ -628,7 +627,7 @@ unsigned int OnBeacon(struct adapter *padapter, union recv_frame *precv_frame)
|
||||
ret = rtw_check_bcn_info(padapter, pframe, len);
|
||||
if (!ret) {
|
||||
netdev_dbg(padapter->pnetdev,
|
||||
"ap has changed, disconnect now\n ");
|
||||
"ap has changed, disconnect now\n");
|
||||
receive_disconnect(padapter,
|
||||
pmlmeinfo->network.mac_address, 0);
|
||||
return _SUCCESS;
|
||||
@@ -3831,10 +3830,10 @@ void site_survey(struct adapter *padapter)
|
||||
} else {
|
||||
#ifdef DBG_FIXED_CHAN
|
||||
if (pmlmeext->fixed_chan != 0xff)
|
||||
SelectChannel(padapter, pmlmeext->fixed_chan);
|
||||
r8723bs_select_channel(padapter, pmlmeext->fixed_chan);
|
||||
else
|
||||
#endif
|
||||
SelectChannel(padapter, survey_channel);
|
||||
r8723bs_select_channel(padapter, survey_channel);
|
||||
}
|
||||
|
||||
if (ScanType == SCAN_ACTIVE) { /* obey the channel plan setting... */
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_data.h>
|
||||
#include <linux/jiffies.h>
|
||||
|
||||
@@ -285,14 +284,12 @@ void rtw_set_rpwm(struct adapter *padapter, u8 pslv)
|
||||
if (rpwm & PS_ACK) {
|
||||
unsigned long start_time;
|
||||
u8 cpwm_now;
|
||||
u8 poll_cnt = 0;
|
||||
|
||||
start_time = jiffies;
|
||||
|
||||
/* polling cpwm */
|
||||
do {
|
||||
mdelay(1);
|
||||
poll_cnt++;
|
||||
rtw_hal_get_hwreg(padapter, HW_VAR_CPWM, &cpwm_now);
|
||||
if ((cpwm_orig ^ cpwm_now) & 0x80) {
|
||||
pwrpriv->cpwm = PS_STATE_S4;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <linux/jiffies.h>
|
||||
#include <rtw_recv.h>
|
||||
#include <net/cfg80211.h>
|
||||
@@ -2027,12 +2026,9 @@ static int recv_func(struct adapter *padapter, union recv_frame *rframe)
|
||||
/* check if need to handle uc_swdec_pending_queue*/
|
||||
if (check_fwstate(mlmepriv, WIFI_STATION_STATE) && psecuritypriv->busetkipkey) {
|
||||
union recv_frame *pending_frame;
|
||||
int cnt = 0;
|
||||
|
||||
while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue))) {
|
||||
cnt++;
|
||||
while ((pending_frame = rtw_alloc_recvframe(&padapter->recvpriv.uc_swdec_pending_queue)))
|
||||
recv_func_posthandle(padapter, pending_frame);
|
||||
}
|
||||
}
|
||||
|
||||
ret = recv_func_prehandle(padapter, rframe);
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
static const u32 ch_freq_map[] = {
|
||||
2412,
|
||||
2417,
|
||||
2422,
|
||||
2427,
|
||||
2432,
|
||||
2437,
|
||||
2442,
|
||||
2447,
|
||||
2452,
|
||||
2457,
|
||||
2462,
|
||||
2467,
|
||||
2472,
|
||||
2484
|
||||
};
|
||||
|
||||
u32 rtw_ch2freq(u32 channel)
|
||||
{
|
||||
if (channel == 0 || channel > ARRAY_SIZE(ch_freq_map))
|
||||
return 2412;
|
||||
|
||||
return ch_freq_map[channel - 1];
|
||||
}
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
#include <linux/crc32.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <crypto/aes.h>
|
||||
|
||||
static const char * const _security_type_str[] = {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
|
||||
void _rtw_init_stainfo(struct sta_info *psta);
|
||||
void _rtw_init_stainfo(struct sta_info *psta)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_com_h2c.h>
|
||||
|
||||
static unsigned char ARTHEROS_OUI1[] = {0x00, 0x03, 0x7f};
|
||||
@@ -333,7 +332,7 @@ inline unsigned long rtw_get_on_cur_ch_time(struct adapter *adapter)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void SelectChannel(struct adapter *padapter, unsigned char channel)
|
||||
void r8723bs_select_channel(struct adapter *padapter, unsigned char channel)
|
||||
{
|
||||
if (mutex_lock_interruptible(&(adapter_to_dvobj(padapter)->setch_mutex)))
|
||||
return;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
|
||||
static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
|
||||
static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
|
||||
@@ -45,7 +44,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
|
||||
init_completion(&pxmitpriv->terminate_xmitthread_comp);
|
||||
|
||||
/*
|
||||
* Please insert all the queue initializaiton using _rtw_init_queue below
|
||||
* Please insert all the queue initialization using _rtw_init_queue below
|
||||
*/
|
||||
|
||||
pxmitpriv->adapter = padapter;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include "odm_precomp.h"
|
||||
|
||||
/* MACRO definition for pRFCalibrateInfo->TxIQC_8723B[0] */
|
||||
|
||||
@@ -21,7 +21,6 @@ Major Change History:
|
||||
|
||||
--*/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <HalPwrSeqCmd.h>
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <hal_data.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_btcoex.h>
|
||||
#include <Mp_Precomp.h>
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include "hal_com_h2c.h"
|
||||
|
||||
#include "odm_precomp.h"
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_data.h>
|
||||
#include <linux/kernel.h>
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
void rtw_hal_chip_configure(struct adapter *padapter)
|
||||
@@ -160,12 +159,6 @@ void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariab
|
||||
padapter->HalFunc.SetHalODMVarHandler(padapter, eVariable, pValue1, bSet);
|
||||
}
|
||||
|
||||
void rtw_hal_get_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, void *pValue2)
|
||||
{
|
||||
if (padapter->HalFunc.GetHalODMVarHandler)
|
||||
padapter->HalFunc.GetHalODMVarHandler(padapter, eVariable, pValue1, pValue2);
|
||||
}
|
||||
|
||||
void rtw_hal_enable_interrupt(struct adapter *padapter)
|
||||
{
|
||||
if (padapter->HalFunc.enable_interrupt)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
u8 rtw_hal_sdio_max_txoqt_free_space(struct adapter *padapter)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
#include "hal_com_h2c.h"
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
/* This file is for 92CE/92CU dynamic mechanism only */
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
|
||||
/* Global var */
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <linux/firmware.h>
|
||||
#include <linux/slab.h>
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
#include "hal_com_h2c.h"
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
|
||||
/**
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
|
||||
static void initrecvbuf(struct recv_buf *precvbuf, struct adapter *padapter)
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
|
||||
static u8 rtw_sdio_wait_enough_TxOQT_space(struct adapter *padapter, u8 agg_num)
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
|
||||
#include "hal_com_h2c.h"
|
||||
@@ -380,8 +379,8 @@ static void _InitWMACSetting(struct adapter *padapter)
|
||||
rtw_write32(padapter, REG_RCR, pHalData->ReceiveConfig);
|
||||
|
||||
/* Accept all multicast address */
|
||||
rtw_write32(padapter, REG_MAR, 0xFFFFFFFF);
|
||||
rtw_write32(padapter, REG_MAR + 4, 0xFFFFFFFF);
|
||||
rtw_write32(padapter, REG_MAR, 0xFFFFFFFF); /* Offset 0x0620-0x0623 */
|
||||
rtw_write32(padapter, REG_MAR + 4, 0xFFFFFFFF); /* Offset 0x0624-0x0627 */
|
||||
|
||||
/* Accept all data frames */
|
||||
value16 = 0xFFFF;
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
*
|
||||
*******************************************************************************/
|
||||
#include <drv_types.h>
|
||||
#include <rtw_debug.h>
|
||||
#include <rtl8723b_hal.h>
|
||||
|
||||
/* */
|
||||
|
||||
@@ -452,14 +452,7 @@ struct adapter {
|
||||
#define DF_RX_BIT BIT1
|
||||
#define DF_IO_BIT BIT2
|
||||
|
||||
/* define RTW_DISABLE_FUNC(padapter, func) (atomic_add(&adapter_to_dvobj(padapter)->disable_func, (func))) */
|
||||
/* define RTW_ENABLE_FUNC(padapter, func) (atomic_sub(&adapter_to_dvobj(padapter)->disable_func, (func))) */
|
||||
static inline void RTW_DISABLE_FUNC(struct adapter *padapter, int func_bit)
|
||||
{
|
||||
int df = atomic_read(&adapter_to_dvobj(padapter)->disable_func);
|
||||
df |= func_bit;
|
||||
atomic_set(&adapter_to_dvobj(padapter)->disable_func, df);
|
||||
}
|
||||
|
||||
static inline void RTW_ENABLE_FUNC(struct adapter *padapter, int func_bit)
|
||||
{
|
||||
|
||||
@@ -301,7 +301,6 @@ u8 rtw_hal_set_def_var(struct adapter *padapter, enum hal_def_variable eVariable
|
||||
u8 rtw_hal_get_def_var(struct adapter *padapter, enum hal_def_variable eVariable, void *pValue);
|
||||
|
||||
void rtw_hal_set_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet);
|
||||
void rtw_hal_get_odm_var(struct adapter *padapter, enum hal_odm_variable eVariable, void *pValue1, void *pValue2);
|
||||
|
||||
void rtw_hal_enable_interrupt(struct adapter *padapter);
|
||||
void rtw_hal_disable_interrupt(struct adapter *padapter);
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
{0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x20}, /*0x07 = 0x20 , SOP option to disable BG/MB*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3}, /*0x04[12:11] = 2b'01 enable WL suspend*/ \
|
||||
{0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT2, BIT2}, /*0x04[10] = 1, enable SW LPS*/ \
|
||||
{0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 1}, /*0x48[16] = 1 to enable GPIO9 as EXT WAKEUP*/ \
|
||||
{0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 1}, /*0x48[16] = 1 to enable GPIO9 as EXT WAKEUP*/ \
|
||||
{0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4}, /*0x23[4] = 1b'1 12H LDO enter sleep mode*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, BIT0}, /*Set SDIO suspend local register*/ \
|
||||
{0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK, PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, 0}, /*wait power state to suspend*/
|
||||
|
||||
@@ -81,9 +81,7 @@ static inline void thread_enter(char *name)
|
||||
static inline void flush_signals_thread(void)
|
||||
{
|
||||
if (signal_pending(current))
|
||||
{
|
||||
flush_signals(current);
|
||||
}
|
||||
}
|
||||
|
||||
#define rtw_warn_on(condition) WARN_ON(condition)
|
||||
@@ -102,7 +100,7 @@ static inline int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *par
|
||||
#define MAC_ARG(x) (x)
|
||||
#endif
|
||||
|
||||
extern void rtw_free_netdev(struct net_device * netdev);
|
||||
extern void rtw_free_netdev(struct net_device *netdev);
|
||||
|
||||
/* Macros for handling unaligned memory accesses */
|
||||
|
||||
|
||||
@@ -7,43 +7,41 @@
|
||||
#ifndef __OSDEP_LINUX_SERVICE_H_
|
||||
#define __OSDEP_LINUX_SERVICE_H_
|
||||
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kref.h>
|
||||
/* include <linux/smp_lock.h> */
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/wireless.h>
|
||||
#include <net/iw_handler.h>
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h> /* for struct tasklet_struct */
|
||||
#include <linux/ip.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/kref.h>
|
||||
#include <linux/netdevice.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <asm/byteorder.h>
|
||||
#include <linux/atomic.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/sem.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <linux/wireless.h>
|
||||
#include <net/iw_handler.h>
|
||||
#include <linux/if_arp.h>
|
||||
#include <linux/rtnetlink.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h> /* for struct tasklet_struct */
|
||||
#include <linux/ip.h>
|
||||
#include <linux/kthread.h>
|
||||
#include <linux/list.h>
|
||||
#include <linux/vmalloc.h>
|
||||
|
||||
/* #include <linux/ieee80211.h> */
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
#include <net/cfg80211.h>
|
||||
#include <net/ieee80211_radiotap.h>
|
||||
#include <net/cfg80211.h>
|
||||
|
||||
struct __queue {
|
||||
struct list_head queue;
|
||||
spinlock_t lock;
|
||||
};
|
||||
struct __queue {
|
||||
struct list_head queue;
|
||||
spinlock_t lock;
|
||||
};
|
||||
|
||||
static inline struct list_head *get_next(struct list_head *list)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@ struct rt_firmware {
|
||||
|
||||
/* This structure must be carefully byte-ordered. */
|
||||
struct rt_firmware_hdr {
|
||||
/* 8-byte alinment required */
|
||||
/* 8-byte alignment required */
|
||||
|
||||
/* LONG WORD 0 ---- */
|
||||
__le16 signature; /* 92C0: test chip; 92C, 88C0: test chip;
|
||||
|
||||
@@ -516,10 +516,6 @@ struct drvextra_cmd_parm {
|
||||
|
||||
/*------------------- Below are used for RF/BB tuning ---------------------*/
|
||||
|
||||
struct getcountjudge_rsp {
|
||||
u8 count_judge[MAX_RATES_LENGTH];
|
||||
};
|
||||
|
||||
struct addBaReq_parm {
|
||||
unsigned int tid;
|
||||
u8 addr[ETH_ALEN];
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
||||
*
|
||||
******************************************************************************/
|
||||
#ifndef __RTW_DEBUG_H__
|
||||
#define __RTW_DEBUG_H__
|
||||
|
||||
void mac_reg_dump(struct adapter *adapter);
|
||||
void bb_reg_dump(struct adapter *adapter);
|
||||
void rf_reg_dump(struct adapter *adapter);
|
||||
|
||||
#endif /* __RTW_DEBUG_H__ */
|
||||
@@ -28,7 +28,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:
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
Otherwise, io_handler will free io_req
|
||||
*/
|
||||
|
||||
/* below is for the intf_option bit defition... */
|
||||
/* below is for the intf_option bit definition... */
|
||||
|
||||
struct intf_priv;
|
||||
struct intf_hdl;
|
||||
|
||||
@@ -131,7 +131,7 @@ struct mlme_priv {
|
||||
u8 roam_rssi_diff_th; /* rssi difference threshold for active scan candidate selection */
|
||||
u32 roam_scan_int_ms; /* scan interval for active roam */
|
||||
u32 roam_scanr_exp_ms; /* scan result expire time in ms for roam */
|
||||
u8 roam_tgt_addr[ETH_ALEN]; /* request to roam to speicific target without other consideration */
|
||||
u8 roam_tgt_addr[ETH_ALEN]; /* request to roam to specific target without other consideration */
|
||||
|
||||
u8 *nic_hdl;
|
||||
|
||||
|
||||
@@ -384,8 +384,8 @@ struct mlme_ext_priv {
|
||||
unsigned char default_supported_mcs_set[16];
|
||||
|
||||
struct ss_res sitesurvey_res;
|
||||
struct mlme_ext_info mlmext_info;/* for sta/adhoc mode, including current scanning/connecting/connected related info. */
|
||||
/* for ap mode, network includes ap's cap_info */
|
||||
struct mlme_ext_info mlmext_info; /* for sta/adhoc mode, including current scanning/connecting/connected related info. */
|
||||
/* for ap mode, network includes ap's cap_info */
|
||||
struct timer_list survey_timer;
|
||||
struct timer_list link_timer;
|
||||
struct timer_list sa_query_timer;
|
||||
@@ -455,7 +455,7 @@ u8 rtw_get_center_ch(u8 channel, u8 chnl_bw, u8 chnl_offset);
|
||||
unsigned long rtw_get_on_cur_ch_time(struct adapter *adapter);
|
||||
|
||||
void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigned char channel_offset, unsigned short bwmode);
|
||||
void SelectChannel(struct adapter *padapter, unsigned char channel);
|
||||
void r8723bs_select_channel(struct adapter *padapter, unsigned char channel);
|
||||
|
||||
unsigned int decide_wait_for_beacon_timeout(unsigned int bcn_interval);
|
||||
|
||||
|
||||
@@ -444,16 +444,6 @@ static inline u8 *recvframe_pull_tail(union recv_frame *precvframe, signed int s
|
||||
|
||||
}
|
||||
|
||||
static inline union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||
{
|
||||
/* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
|
||||
/* from any given member of recv_frame. */
|
||||
/* rxmem indicates the any member/address in recv_frame */
|
||||
|
||||
return (union recv_frame *)(((SIZE_PTR)rxmem >> RXFRAME_ALIGN) << RXFRAME_ALIGN);
|
||||
|
||||
}
|
||||
|
||||
static inline signed int get_recvframe_len(union recv_frame *precvframe)
|
||||
{
|
||||
return precvframe->u.hdr.len;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user