Commit b707512b authored by Linus Torvalds's avatar Linus Torvalds

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

Pull staging driver updates from Greg KH:
 "Here is the big set of staging driver cleanups and removals for
  6.12-rc1.

  Nothing exciting here, just slow, constant, forward progress in
  removing code and cleaning up some old drivers, along with removing
  one of them that was not being used anymore at all. In discussions
  with some developers this past week, even more deletions will be
  happening for the next major merge window, as we seems to have code
  here that obviously no one is using anymore.

  Along with the normal cleanups is the good vme_user code forward
  progress, the one major bright spot in the staging subsystem for code
  that people rely on, and is getting good development behind it.
  Hopefully it can graduate out of staging "soon".

  All of these changes have been in linux-next for a long time with no
  reported problems"

* tag 'staging-6.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (141 commits)
  staging: vt6655: Rename variable apTD1Rings
  staging: vt6655: Rename variable apTD0Rings
  staging: rtl8723bs: remove unused 'poll_cnt' from rtw_set_rpwm()
  staging: rtl8723bs: remove unused cnt from recv_func()
  staging: rtl8723bs: remove unused efuseValue from efuse_OneByteWrite()
  staging: rtl8712: remove unused drvinfo_sz from update_recvframe_attrib
  staging: vt6655: mac.h: Fix possible precedence issue in macros
  staging: rtl8723bs: include: Remove spaces before tabs in rtw_security.h
  staging: rtl8723bs: include: Fix trailing */ position in rtw_security.h
  staging: rtl8723bs: include: Fix indent for else block struct in rtw_security.h
  staging: rtl8723bs: include: Fix indent for struct _byte_ in rtw_security.h
  staging: rtl8723bs: include: Fix use of tabs for indent in rtw_security.h
  staging: rtl8723bs: include: Fix indent for switch block in rtw_security.h
  staging: rtl8723bs: include: Fix indent for switch case in rtw_security.h
  staging: rtl8723bs: include: Fix open brace position in rtw_security.h
  staging: nvec: Use IRQF_NO_AUTOEN flag in request_irq()
  staging: rtl8723bs: Remove unused file rtw_rf.c
  staging: rtl8723bs: Remove unused function rtw_ch2freq
  staging: rtl8723bs: Remove unused files rtw_debug.c and rtw_debug.h
  staging: rtl8723bs: Remove unused function dump_4_regs
  ...
parents 356a0319 b4fdf9b1
...@@ -54,8 +54,6 @@ source "drivers/staging/fbtft/Kconfig" ...@@ -54,8 +54,6 @@ source "drivers/staging/fbtft/Kconfig"
source "drivers/staging/most/Kconfig" source "drivers/staging/most/Kconfig"
source "drivers/staging/ks7010/Kconfig"
source "drivers/staging/greybus/Kconfig" source "drivers/staging/greybus/Kconfig"
source "drivers/staging/vc04_services/Kconfig" source "drivers/staging/vc04_services/Kconfig"
......
...@@ -17,7 +17,6 @@ obj-$(CONFIG_MFD_NVEC) += nvec/ ...@@ -17,7 +17,6 @@ obj-$(CONFIG_MFD_NVEC) += nvec/
obj-$(CONFIG_LTE_GDM724X) += gdm724x/ obj-$(CONFIG_LTE_GDM724X) += gdm724x/
obj-$(CONFIG_FB_TFT) += fbtft/ obj-$(CONFIG_FB_TFT) += fbtft/
obj-$(CONFIG_MOST) += most/ obj-$(CONFIG_MOST) += most/
obj-$(CONFIG_KS7010) += ks7010/
obj-$(CONFIG_GREYBUS) += greybus/ obj-$(CONFIG_GREYBUS) += greybus/
obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/ obj-$(CONFIG_BCM2835_VCHIQ) += vc04_services/
obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/ obj-$(CONFIG_XIL_AXIS_FIFO) += axis-fifo/
......
...@@ -35,8 +35,6 @@ static int init_display(struct fbtft_par *par) ...@@ -35,8 +35,6 @@ static int init_display(struct fbtft_par *par)
par->fbtftops.reset(par); par->fbtftops.reset(par);
devcode = read_devicecode(par); devcode = read_devicecode(par);
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "Device code: 0x%04X\n",
devcode);
if ((devcode != 0x0000) && (devcode != 0x9320)) if ((devcode != 0x0000) && (devcode != 0x9320))
dev_warn(par->info->device, dev_warn(par->info->device,
"Unrecognized Device code: 0x%04X (expected 0x9320)\n", "Unrecognized Device code: 0x%04X (expected 0x9320)\n",
......
...@@ -41,13 +41,6 @@ static int init_display(struct fbtft_par *par) ...@@ -41,13 +41,6 @@ static int init_display(struct fbtft_par *par)
{ {
gpiod_set_value(par->gpio.dc, 1); 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); par->fbtftops.reset(par);
if ((par->info->var.xres == 320) && (par->info->var.yres == 240)) { 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) ...@@ -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) 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); write_reg(par, on ? 0xAE : 0xAF);
return 0; return 0;
......
...@@ -93,9 +93,6 @@ static int set_var(struct fbtft_par *par) ...@@ -93,9 +93,6 @@ static int set_var(struct fbtft_par *par)
{ {
if (par->fbtftops.init_display != init_display) { if (par->fbtftops.init_display != init_display) {
/* don't risk messing up register 11h */ /* 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; return 0;
} }
......
...@@ -148,9 +148,6 @@ static void set_addr_win(struct fbtft_par *par, int xs, int ys, int xe, int ye) ...@@ -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) static int blank(struct fbtft_par *par, bool on)
{ {
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
__func__, on ? "true" : "false");
if (on) if (on)
write_reg(par, 0xAE); write_reg(par, 0xAE);
else else
......
...@@ -72,10 +72,6 @@ static uint8_t rgb565_to_g16(u16 pixel) ...@@ -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) 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, 0x75);
write_reg(par, 0x00); write_reg(par, 0x00);
write_reg(par, 0x3f); 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) ...@@ -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) static int blank(struct fbtft_par *par, bool on)
{ {
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
__func__, on ? "true" : "false");
if (on) if (on)
write_reg(par, 0xAE); write_reg(par, 0xAE);
else else
...@@ -109,8 +102,6 @@ static int set_gamma(struct fbtft_par *par, u32 *curves) ...@@ -109,8 +102,6 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
{ {
int i; int i;
fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, "%s()\n", __func__);
for (i = 0; i < GAMMA_LEN; i++) { for (i = 0; i < GAMMA_LEN; i++) {
if (i > 0 && curves[i] < 1) { if (i > 0 && curves[i] < 1) {
dev_err(par->info->device, dev_err(par->info->device,
......
...@@ -167,8 +167,6 @@ static int set_gamma(struct fbtft_par *par, u32 *curves) ...@@ -167,8 +167,6 @@ static int set_gamma(struct fbtft_par *par, u32 *curves)
static int blank(struct fbtft_par *par, bool on) static int blank(struct fbtft_par *par, bool on)
{ {
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
__func__, on ? "true" : "false");
if (on) if (on)
write_reg(par, 0xAE); write_reg(par, 0xAE);
else else
......
...@@ -72,9 +72,6 @@ static int set_var(struct fbtft_par *par) ...@@ -72,9 +72,6 @@ static int set_var(struct fbtft_par *par)
if (par->fbtftops.init_display != init_display) { if (par->fbtftops.init_display != init_display) {
/* don't risk messing up register A0h */ /* 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; return 0;
} }
...@@ -213,7 +210,7 @@ static void register_onboard_backlight(struct fbtft_par *par) ...@@ -213,7 +210,7 @@ static void register_onboard_backlight(struct fbtft_par *par)
struct backlight_properties bl_props = { 0, }; struct backlight_properties bl_props = { 0, };
bl_props.type = BACKLIGHT_RAW; 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), bd = backlight_device_register(dev_driver_string(par->info->device),
par->info->device, par, &bl_ops, 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) ...@@ -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) static int blank(struct fbtft_par *par, bool on)
{ {
fbtft_par_dbg(DEBUG_BLANK, par, "(%s=%s)\n",
__func__, on ? "true" : "false");
if (on) if (on)
write_reg(par, 0xA8 | 0x00); write_reg(par, 0xA8 | 0x00);
else else
......
...@@ -129,9 +129,6 @@ int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len) ...@@ -129,9 +129,6 @@ int fbtft_write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len)
int ret = 0; int ret = 0;
size_t startbyte_size = 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; remain = len / 2;
vmem16 = (u16 *)(par->info->screen_buffer + offset); 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) ...@@ -182,9 +179,6 @@ int fbtft_write_vmem16_bus9(struct fbtft_par *par, size_t offset, size_t len)
int i; int i;
int ret = 0; int ret = 0;
fbtft_par_dbg(DEBUG_WRITE_VMEM, par, "%s(offset=%zu, len=%zu)\n",
__func__, offset, len);
if (!par->txbuf.buf) { if (!par->txbuf.buf) {
dev_err(par->info->device, "%s: txbuf.buf is NULL\n", __func__); dev_err(par->info->device, "%s: txbuf.buf is NULL\n", __func__);
return -1; return -1;
...@@ -232,9 +226,6 @@ int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len) ...@@ -232,9 +226,6 @@ int fbtft_write_vmem16_bus16(struct fbtft_par *par, size_t offset, size_t len)
{ {
u16 *vmem16; 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); vmem16 = (u16 *)(par->info->screen_buffer + offset);
/* no need for buffered write with 16-bit bus */ /* no need for buffered write with 16-bit bus */
......
...@@ -152,7 +152,7 @@ static int fbtft_backlight_get_brightness(struct backlight_device *bd) ...@@ -152,7 +152,7 @@ static int fbtft_backlight_get_brightness(struct backlight_device *bd)
void fbtft_unregister_backlight(struct fbtft_par *par) void fbtft_unregister_backlight(struct fbtft_par *par)
{ {
if (par->info->bl_dev) { 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_update_status(par->info->bl_dev);
backlight_device_unregister(par->info->bl_dev); backlight_device_unregister(par->info->bl_dev);
par->info->bl_dev = NULL; par->info->bl_dev = NULL;
...@@ -178,7 +178,7 @@ void fbtft_register_backlight(struct fbtft_par *par) ...@@ -178,7 +178,7 @@ void fbtft_register_backlight(struct fbtft_par *par)
bl_props.type = BACKLIGHT_RAW; bl_props.type = BACKLIGHT_RAW;
/* Assume backlight is off, get polarity from current state of pin */ /* 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])) if (!gpiod_get_value(par->gpio.led[0]))
par->polarity = true; par->polarity = true;
...@@ -215,8 +215,6 @@ static void fbtft_reset(struct fbtft_par *par) ...@@ -215,8 +215,6 @@ static void fbtft_reset(struct fbtft_par *par)
if (!par->gpio.reset) if (!par->gpio.reset)
return; return;
fbtft_par_dbg(DEBUG_RESET, par, "%s()\n", __func__);
gpiod_set_value_cansleep(par->gpio.reset, 1); gpiod_set_value_cansleep(par->gpio.reset, 1);
usleep_range(20, 40); usleep_range(20, 40);
gpiod_set_value_cansleep(par->gpio.reset, 0); gpiod_set_value_cansleep(par->gpio.reset, 0);
...@@ -801,7 +799,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info) ...@@ -801,7 +799,7 @@ int fbtft_register_framebuffer(struct fb_info *fb_info)
/* Turn on backlight if available */ /* Turn on backlight if available */
if (fb_info->bl_dev) { 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); fb_info->bl_dev->ops->update_status(fb_info->bl_dev);
} }
...@@ -1052,8 +1050,6 @@ static int fbtft_verify_gpios(struct fbtft_par *par) ...@@ -1052,8 +1050,6 @@ static int fbtft_verify_gpios(struct fbtft_par *par)
struct fbtft_platform_data *pdata = par->pdata; struct fbtft_platform_data *pdata = par->pdata;
int i; int i;
fbtft_par_dbg(DEBUG_VERIFY_GPIOS, par, "%s()\n", __func__);
if (pdata->display.buswidth != 9 && par->startbyte == 0 && if (pdata->display.buswidth != 9 && par->startbyte == 0 &&
!par->gpio.dc) { !par->gpio.dc) {
dev_err(par->info->device, dev_err(par->info->device,
...@@ -1157,9 +1153,6 @@ int fbtft_probe_common(struct fbtft_display *display, ...@@ -1157,9 +1153,6 @@ int fbtft_probe_common(struct fbtft_display *display,
else else
dev = &pdev->dev; dev = &pdev->dev;
if (unlikely(display->debug & DEBUG_DRIVER_INIT_FUNCTIONS))
dev_info(dev, "%s()\n", __func__);
pdata = dev->platform_data; pdata = dev->platform_data;
if (!pdata) { if (!pdata) {
pdata = fbtft_properties_read(dev); pdata = fbtft_properties_read(dev);
......
...@@ -27,13 +27,9 @@ int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves, ...@@ -27,13 +27,9 @@ int fbtft_gamma_parse_str(struct fbtft_par *par, u32 *curves,
int curve_counter, value_counter; int curve_counter, value_counter;
int _count; int _count;
fbtft_par_dbg(DEBUG_SYSFS, par, "%s() str=\n", __func__);
if (!str || !curves) if (!str || !curves)
return -EINVAL; return -EINVAL;
fbtft_par_dbg(DEBUG_SYSFS, par, "%s\n", str);
tmp = kmemdup(str, size + 1, GFP_KERNEL); tmp = kmemdup(str, size + 1, GFP_KERNEL);
if (!tmp) if (!tmp)
return -ENOMEM; return -ENOMEM;
......
...@@ -202,6 +202,7 @@ struct fbtft_par { ...@@ -202,6 +202,7 @@ struct fbtft_par {
u8 *buf; u8 *buf;
u8 startbyte; u8 startbyte;
struct fbtft_ops fbtftops; struct fbtft_ops fbtftops;
/* Spinlock to ensure thread-safe access to dirty_lines_start and dirty_lines_end */
spinlock_t dirty_lock; spinlock_t dirty_lock;
unsigned int dirty_lines_start; unsigned int dirty_lines_start;
unsigned int dirty_lines_end; unsigned int dirty_lines_end;
...@@ -218,6 +219,7 @@ struct fbtft_par { ...@@ -218,6 +219,7 @@ struct fbtft_par {
} gpio; } gpio;
const s16 *init_sequence; const s16 *init_sequence;
struct { struct {
/* Mutex to synchronize access to gamma curve locking */
struct mutex lock; struct mutex lock;
u32 *curves; u32 *curves;
int num_values; int num_values;
......
...@@ -92,8 +92,8 @@ struct gb_camera_ops { ...@@ -92,8 +92,8 @@ struct gb_camera_ops {
unsigned int *flags, struct gb_camera_stream *streams, unsigned int *flags, struct gb_camera_stream *streams,
struct gb_camera_csi_params *csi_params); struct gb_camera_csi_params *csi_params);
int (*capture)(void *priv, u32 request_id, int (*capture)(void *priv, u32 request_id,
unsigned int streams, unsigned int num_frames, unsigned int streams, unsigned int num_frames,
size_t settings_size, const void *settings); size_t settings_size, const void *settings);
int (*flush)(void *priv, u32 *request_id); int (*flush)(void *priv, u32 *request_id);
}; };
......
...@@ -490,10 +490,10 @@ int gb_spilib_master_init(struct gb_connection *connection, struct device *dev, ...@@ -490,10 +490,10 @@ int gb_spilib_master_init(struct gb_connection *connection, struct device *dev,
int ret; int ret;
u8 i; u8 i;
/* Allocate master with space for data */ /* Allocate host with space for data */
ctlr = spi_alloc_master(dev, sizeof(*spi)); ctlr = spi_alloc_host(dev, sizeof(*spi));
if (!ctlr) { if (!ctlr) {
dev_err(dev, "cannot alloc SPI master\n"); dev_err(dev, "cannot alloc SPI host\n");
return -ENOMEM; return -ENOMEM;
} }
......
# 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.
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_KS7010) += ks7010.o
ks7010-y := ks_hostif.o ks_wlan_net.o ks7010_sdio.o
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>
/* 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 */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/* 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 */
This diff is collapsed.
...@@ -65,8 +65,7 @@ int ia_css_iterator_configure(const struct ia_css_binary *binary, ...@@ -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 * the original out res. for video pipe, it has two output pins --- out and
* vf_out, so it can keep these two resolutions already. */ * vf_out, so it can keep these two resolutions already. */
if (binary->info->sp.pipeline.mode == IA_CSS_BINARY_MODE_PREVIEW && 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 /* TODO: Remove this after preview output decimation is fixed
* by configuring out&vf info files properly */ * by configuring out&vf info files properly */
my_info.padded_width <<= binary->vf_downscale_log2; my_info.padded_width <<= binary->vf_downscale_log2;
......
...@@ -454,18 +454,18 @@ static int comp_probe_channel(struct most_interface *iface, int channel_idx, ...@@ -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); struct most_video_dev *mdev = get_comp_dev(iface, channel_idx);
if (mdev) { if (mdev) {
pr_err("channel already linked\n"); pr_err("Channel already linked\n");
return -EEXIST; return -EEXIST;
} }
if (ccfg->direction != MOST_CH_RX) { if (ccfg->direction != MOST_CH_RX) {
pr_err("wrong direction, expect rx\n"); pr_err("Wrong direction, expected rx\n");
return -EINVAL; return -EINVAL;
} }
if (ccfg->data_type != MOST_CH_SYNC && if (ccfg->data_type != MOST_CH_SYNC &&
ccfg->data_type != MOST_CH_ISOC) { 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; return -EINVAL;
} }
......
...@@ -175,7 +175,7 @@ static struct nvec_msg *nvec_msg_alloc(struct nvec_chip *nvec, ...@@ -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"); (category == NVEC_MSG_TX) ? "TX" : "RX");
return NULL; return NULL;
...@@ -315,7 +315,7 @@ int nvec_write_sync(struct nvec_chip *nvec, ...@@ -315,7 +315,7 @@ int nvec_write_sync(struct nvec_chip *nvec,
if (!(wait_for_completion_timeout(&nvec->sync_write, if (!(wait_for_completion_timeout(&nvec->sync_write,
msecs_to_jiffies(2000)))) { msecs_to_jiffies(2000)))) {
dev_warn(nvec->dev, 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); mutex_unlock(&nvec->sync_write_mutex);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
...@@ -392,7 +392,7 @@ static void nvec_request_master(struct work_struct *work) ...@@ -392,7 +392,7 @@ static void nvec_request_master(struct work_struct *work)
msecs_to_jiffies(5000)); msecs_to_jiffies(5000));
if (err == 0) { 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); nvec_gpio_set_value(nvec, 1);
msg->pos = 0; msg->pos = 0;
} }
...@@ -454,7 +454,7 @@ static void nvec_dispatch(struct work_struct *work) ...@@ -454,7 +454,7 @@ static void nvec_dispatch(struct work_struct *work)
if (nvec->sync_write_pending == if (nvec->sync_write_pending ==
(msg->data[2] << 8) + msg->data[0]) { (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->sync_write_pending = 0;
nvec->last_sync_msg = msg; nvec->last_sync_msg = msg;
complete(&nvec->sync_write); complete(&nvec->sync_write);
...@@ -477,7 +477,7 @@ static void nvec_tx_completed(struct nvec_chip *nvec) ...@@ -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 */ /* We got an END_TRANS, let's skip this, maybe there's an event */
if (nvec->tx->pos != nvec->tx->size) { 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->tx->pos = 0;
nvec_gpio_set_value(nvec, 0); nvec_gpio_set_value(nvec, 0);
} else { } else {
...@@ -608,7 +608,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) ...@@ -608,7 +608,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
/* Filter out some errors */ /* Filter out some errors */
if ((status & irq_mask) == 0 && (status & ~irq_mask) != 0) { 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; return IRQ_HANDLED;
} }
if ((status & I2C_SL_IRQ) == 0) { if ((status & I2C_SL_IRQ) == 0) {
...@@ -631,7 +631,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) ...@@ -631,7 +631,7 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
if (status != (I2C_SL_IRQ | RCVD)) if (status != (I2C_SL_IRQ | RCVD))
nvec_invalid_flags(nvec, status, false); nvec_invalid_flags(nvec, status, false);
break; break;
case 1: /* command byte */ case 1: /* Command byte */
if (status != I2C_SL_IRQ) { if (status != I2C_SL_IRQ) {
nvec_invalid_flags(nvec, status, true); nvec_invalid_flags(nvec, status, true);
} else { } else {
...@@ -845,13 +845,12 @@ static int tegra_nvec_probe(struct platform_device *pdev) ...@@ -845,13 +845,12 @@ static int tegra_nvec_probe(struct platform_device *pdev)
return PTR_ERR(nvec->gpiod); 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); "nvec", nvec);
if (err) { if (err) {
dev_err(dev, "couldn't request irq\n"); dev_err(dev, "couldn't request irq\n");
return -ENODEV; return -ENODEV;
} }
disable_irq(nvec->irq);
tegra_init_i2c_slave(nvec); tegra_init_i2c_slave(nvec);
......
...@@ -544,7 +544,7 @@ static const struct backlight_ops dcon_bl_ops = { ...@@ -544,7 +544,7 @@ static const struct backlight_ops dcon_bl_ops = {
static struct backlight_properties dcon_bl_props = { static struct backlight_properties dcon_bl_props = {
.max_brightness = 15, .max_brightness = 15,
.type = BACKLIGHT_RAW, .type = BACKLIGHT_RAW,
.power = FB_BLANK_UNBLANK, .power = BACKLIGHT_POWER_ON,
}; };
static int dcon_reboot_notify(struct notifier_block *nb, static int dcon_reboot_notify(struct notifier_block *nb,
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#define R8190P_DEF_H #define R8190P_DEF_H
#include <linux/types.h> #include <linux/types.h>
#include "r8192E_phy.h"
#define MAX_SILENT_RESET_RX_SLOT_NUM 10 #define MAX_SILENT_RESET_RX_SLOT_NUM 10
...@@ -137,7 +138,7 @@ struct tx_fwinfo_8190pci { ...@@ -137,7 +138,7 @@ struct tx_fwinfo_8190pci {
}; };
struct phy_sts_ofdm_819xpci { struct phy_sts_ofdm_819xpci {
u8 trsw_gain_X[4]; u8 trsw_gain_X[RF90_PATH_MAX];
u8 pwdb_all; u8 pwdb_all;
u8 cfosho_X[4]; u8 cfosho_X[4];
u8 cfotail_X[4]; u8 cfotail_X[4];
...@@ -226,7 +227,7 @@ struct rx_desc { ...@@ -226,7 +227,7 @@ struct rx_desc {
u16 Length:14; u16 Length:14;
u16 CRC32:1; u16 CRC32:1;
u16 ICV:1; u16 ICV:1;
u8 RxDrvInfoSize; u8 rx_drv_info_size;
u8 Shift:2; u8 Shift:2;
u8 PHYStatus:1; u8 PHYStatus:1;
u8 SWDec:1; u8 SWDec:1;
......
...@@ -16,18 +16,18 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data, ...@@ -16,18 +16,18 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data,
struct sk_buff *skb; struct sk_buff *skb;
unsigned char *seg_ptr; unsigned char *seg_ptr;
struct cb_desc *tcb_desc; struct cb_desc *tcb_desc;
u8 bLastIniPkt; u8 last_ini_pkt;
struct tx_fwinfo_8190pci *pTxFwInfo = NULL; struct tx_fwinfo_8190pci *pTxFwInfo = NULL;
do { do {
if ((len - frag_offset) > CMDPACKET_FRAG_SIZE) { if ((len - frag_offset) > CMDPACKET_FRAG_SIZE) {
frag_length = CMDPACKET_FRAG_SIZE; frag_length = CMDPACKET_FRAG_SIZE;
bLastIniPkt = 0; last_ini_pkt = 0;
} else { } else {
frag_length = (u16)(len - frag_offset); frag_length = (u16)(len - frag_offset);
bLastIniPkt = 1; last_ini_pkt = 1;
} }
if (type == DESC_PACKET_TYPE_NORMAL) if (type == DESC_PACKET_TYPE_NORMAL)
...@@ -42,8 +42,8 @@ bool rtl92e_send_cmd_pkt(struct net_device *dev, u32 type, const void *data, ...@@ -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)); memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
tcb_desc->queue_index = TXCMD_QUEUE; tcb_desc->queue_index = TXCMD_QUEUE;
tcb_desc->bCmdOrInit = type; tcb_desc->cmd_or_init = type;
tcb_desc->bLastIniPkt = bLastIniPkt; tcb_desc->last_ini_pkt = last_ini_pkt;
if (type == DESC_PACKET_TYPE_NORMAL) { if (type == DESC_PACKET_TYPE_NORMAL) {
tcb_desc->pkt_size = frag_length; tcb_desc->pkt_size = frag_length;
......
...@@ -289,7 +289,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev) ...@@ -289,7 +289,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
for (i = 0; i < 6; i += 2) { for (i = 0; i < 6; i += 2) {
usValue = rtl92e_eeprom_read(dev, usValue = rtl92e_eeprom_read(dev,
(EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1); (EEPROM_NODE_ADDRESS_BYTE_0 + i) >> 1);
*(u16 *)(&addr[i]) = usValue; *(u16 *)(&addr[i]) = usValue;
} }
eth_hw_addr_set(dev, addr); 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, ...@@ -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)) if (dma_mapping_error(&priv->pdev->dev, mapping))
netdev_err(dev, "%s(): DMA Mapping error\n", __func__); netdev_err(dev, "%s(): DMA Mapping error\n", __func__);
memset(entry, 0, 12); memset(entry, 0, 12);
entry->LINIP = cb_desc->bLastIniPkt; entry->LINIP = cb_desc->last_ini_pkt;
entry->FirstSeg = 1; entry->FirstSeg = 1;
entry->LastSeg = 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; entry->CmdInit = DESC_PACKET_TYPE_INIT;
} else { } else {
struct tx_desc *entry_tmp = (struct tx_desc *)entry; 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) ...@@ -1145,23 +1145,21 @@ static long _rtl92e_signal_scale_mapping(struct r8192_priv *priv, long currsig)
_pdrvinfo->RxRate == DESC90_RATE11M) &&\ _pdrvinfo->RxRate == DESC90_RATE11M) &&\
!_pdrvinfo->RxHT) !_pdrvinfo->RxHT)
static void _rtl92e_query_rxphystatus( static void _rtl92e_query_rxphystatus(struct r8192_priv *priv,
struct r8192_priv *priv, struct rtllib_rx_stats *pstats,
struct rtllib_rx_stats *pstats, struct rx_desc *pdesc,
struct rx_desc *pdesc, struct rx_fwinfo *pdrvinfo,
struct rx_fwinfo *pdrvinfo, struct rtllib_rx_stats *precord_stats,
struct rtllib_rx_stats *precord_stats, bool bpacket_match_bssid,
bool bpacket_match_bssid, bool bpacket_toself,
bool bpacket_toself, bool bPacketBeacon,
bool bPacketBeacon, bool bToSelfBA)
bool bToSelfBA
)
{ {
struct phy_sts_ofdm_819xpci *pofdm_buf; struct phy_sts_ofdm_819xpci *pofdm_buf;
struct phy_sts_cck_819xpci *pcck_buf; struct phy_sts_cck_819xpci *pcck_buf;
u8 *prxpkt; u8 *prxpkt;
u8 i, max_spatial_stream, tmp_rxevm; 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; s8 rx_evmX;
u8 evm, pwdb_all; u8 evm, pwdb_all;
u32 RSSI, total_rssi = 0; u32 RSSI, total_rssi = 0;
...@@ -1174,7 +1172,7 @@ static void _rtl92e_query_rxphystatus( ...@@ -1174,7 +1172,7 @@ static void _rtl92e_query_rxphystatus(
memset(precord_stats, 0, sizeof(struct rtllib_rx_stats)); memset(precord_stats, 0, sizeof(struct rtllib_rx_stats));
pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID = pstats->bPacketMatchBSSID = precord_stats->bPacketMatchBSSID =
bpacket_match_bssid; 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->bIsCCK = precord_stats->bIsCCK = is_cck_rate;
pstats->bPacketBeacon = precord_stats->bPacketBeacon = bPacketBeacon; pstats->bPacketBeacon = precord_stats->bPacketBeacon = bPacketBeacon;
pstats->bToSelfBA = precord_stats->bToSelfBA = bToSelfBA; pstats->bToSelfBA = precord_stats->bToSelfBA = bToSelfBA;
...@@ -1266,8 +1264,8 @@ static void _rtl92e_query_rxphystatus( ...@@ -1266,8 +1264,8 @@ static void _rtl92e_query_rxphystatus(
else else
sq = ((64 - sq) * 100) / 44; sq = ((64 - sq) * 100) / 44;
} }
pstats->SignalQuality = sq; pstats->signal_quality = sq;
precord_stats->SignalQuality = sq; precord_stats->signal_quality = sq;
pstats->RxMIMOSignalQuality[0] = sq; pstats->RxMIMOSignalQuality[0] = sq;
precord_stats->RxMIMOSignalQuality[0] = sq; precord_stats->RxMIMOSignalQuality[0] = sq;
pstats->RxMIMOSignalQuality[1] = -1; pstats->RxMIMOSignalQuality[1] = -1;
...@@ -1311,8 +1309,8 @@ static void _rtl92e_query_rxphystatus( ...@@ -1311,8 +1309,8 @@ static void _rtl92e_query_rxphystatus(
evm = rtl92e_evm_db_to_percent(rx_evmX); evm = rtl92e_evm_db_to_percent(rx_evmX);
if (bpacket_match_bssid) { if (bpacket_match_bssid) {
if (i == 0) { if (i == 0) {
pstats->SignalQuality = evm & 0xff; pstats->signal_quality = evm & 0xff;
precord_stats->SignalQuality = evm & 0xff; precord_stats->signal_quality = evm & 0xff;
} }
pstats->RxMIMOSignalQuality[i] = evm & 0xff; pstats->RxMIMOSignalQuality[i] = evm & 0xff;
precord_stats->RxMIMOSignalQuality[i] = evm & 0xff; precord_stats->RxMIMOSignalQuality[i] = evm & 0xff;
...@@ -1321,13 +1319,12 @@ static void _rtl92e_query_rxphystatus( ...@@ -1321,13 +1319,12 @@ static void _rtl92e_query_rxphystatus(
} }
if (is_cck_rate) { if (is_cck_rate) {
pstats->SignalStrength = precord_stats->SignalStrength = pstats->signal_strength = precord_stats->signal_strength =
_rtl92e_signal_scale_mapping(priv, _rtl92e_signal_scale_mapping(priv, (long)pwdb_all);
(long)pwdb_all);
} else { } else {
if (rf_rx_num != 0) if (rf_rx_num != 0)
pstats->SignalStrength = precord_stats->SignalStrength = pstats->signal_strength = precord_stats->signal_strength =
_rtl92e_signal_scale_mapping(priv, _rtl92e_signal_scale_mapping(priv,
(long)(total_rssi /= rf_rx_num)); (long)(total_rssi /= rf_rx_num));
} }
...@@ -1355,10 +1352,10 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, ...@@ -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]; last_rssi = priv->stats.slide_signal_strength[slide_rssi_index];
priv->stats.slide_rssi_total -= last_rssi; 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++] = priv->stats.slide_signal_strength[slide_rssi_index++] =
prev_st->SignalStrength; prev_st->signal_strength;
if (slide_rssi_index >= PHY_RSSI_SLID_WIN_MAX) if (slide_rssi_index >= PHY_RSSI_SLID_WIN_MAX)
slide_rssi_index = 0; slide_rssi_index = 0;
...@@ -1373,7 +1370,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, ...@@ -1373,7 +1370,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
if (!bcheck) if (!bcheck)
return; 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++) { for (rfpath = RF90_PATH_A; rfpath < priv->num_total_rf_path; rfpath++) {
if (priv->stats.rx_rssi_percentage[rfpath] == 0) { if (priv->stats.rx_rssi_percentage[rfpath] == 0) {
priv->stats.rx_rssi_percentage[rfpath] = priv->stats.rx_rssi_percentage[rfpath] =
...@@ -1419,7 +1416,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, ...@@ -1419,7 +1416,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
if (prev_st->RxPWDBAll >= 3) if (prev_st->RxPWDBAll >= 3)
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) { prev_st->bToSelfBA) {
if (priv->undecorated_smoothed_pwdb < 0) if (priv->undecorated_smoothed_pwdb < 0)
priv->undecorated_smoothed_pwdb = prev_st->RxPWDBAll; priv->undecorated_smoothed_pwdb = prev_st->RxPWDBAll;
...@@ -1439,8 +1436,8 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, ...@@ -1439,8 +1436,8 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
rtl92e_update_rx_statistics(priv, prev_st); rtl92e_update_rx_statistics(priv, prev_st);
} }
if (prev_st->SignalQuality != 0) { if (prev_st->signal_quality != 0) {
if (prev_st->bPacketToSelf || prev_st->bPacketBeacon || if (prev_st->packet_to_self || prev_st->bPacketBeacon ||
prev_st->bToSelfBA) { prev_st->bToSelfBA) {
if (slide_evm_statistics++ >= PHY_RSSI_SLID_WIN_MAX) { if (slide_evm_statistics++ >= PHY_RSSI_SLID_WIN_MAX) {
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, ...@@ -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 -= 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++] = priv->stats.slide_evm[slide_evm_index++] =
prev_st->SignalQuality; prev_st->signal_quality;
if (slide_evm_index >= PHY_RSSI_SLID_WIN_MAX) if (slide_evm_index >= PHY_RSSI_SLID_WIN_MAX)
slide_evm_index = 0; slide_evm_index = 0;
...@@ -1461,7 +1458,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, ...@@ -1461,7 +1458,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
priv->stats.last_signal_strength_inpercent = tmp_val; priv->stats.last_signal_strength_inpercent = tmp_val;
} }
if (prev_st->bPacketToSelf || if (prev_st->packet_to_self ||
prev_st->bPacketBeacon || prev_st->bPacketBeacon ||
prev_st->bToSelfBA) { prev_st->bToSelfBA) {
for (ij = 0; ij < 2; ij++) { for (ij = 0; ij < 2; ij++) {
...@@ -1496,7 +1493,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev, ...@@ -1496,7 +1493,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
u8 *tmp_buf; u8 *tmp_buf;
u8 *praddr; 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; hdr = (struct ieee80211_hdr_3addr *)tmp_buf;
fc = le16_to_cpu(hdr->frame_control); fc = le16_to_cpu(hdr->frame_control);
...@@ -1509,7 +1506,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev, ...@@ -1509,7 +1506,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
(fc & IEEE80211_FCTL_TODS) ? hdr->addr1 : (fc & IEEE80211_FCTL_TODS) ? hdr->addr1 :
(fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 : (fc & IEEE80211_FCTL_FROMDS) ? hdr->addr2 :
hdr->addr3) && hdr->addr3) &&
(!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV)); (!pstats->hw_error) && (!pstats->bCRC) && (!pstats->bICV));
bpacket_toself = bpacket_match_bssid && /* check this */ bpacket_toself = bpacket_match_bssid && /* check this */
ether_addr_equal(praddr, priv->rtllib->dev->dev_addr); ether_addr_equal(praddr, priv->rtllib->dev->dev_addr);
if (ieee80211_is_beacon(hdr->frame_control)) if (ieee80211_is_beacon(hdr->frame_control))
...@@ -1521,9 +1518,8 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev, ...@@ -1521,9 +1518,8 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
rtl92e_copy_mpdu_stats(pstats, &previous_stats); rtl92e_copy_mpdu_stats(pstats, &previous_stats);
} }
static void _rtl92e_update_received_rate_histogram_stats( static void _rtl92e_update_received_rate_histogram_stats(struct net_device *dev,
struct net_device *dev, struct rtllib_rx_stats *pstats)
struct rtllib_rx_stats *pstats)
{ {
struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev);
u32 rcvType = 1; u32 rcvType = 1;
...@@ -1634,20 +1630,20 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, ...@@ -1634,20 +1630,20 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats,
stats->bICV = pdesc->ICV; stats->bICV = pdesc->ICV;
stats->bCRC = pdesc->CRC32; stats->bCRC = pdesc->CRC32;
stats->bHwError = pdesc->CRC32 | pdesc->ICV; stats->hw_error = pdesc->CRC32 | pdesc->ICV;
stats->Length = pdesc->Length; stats->Length = pdesc->Length;
if (stats->Length < 24) if (stats->Length < 24)
stats->bHwError |= 1; stats->hw_error |= 1;
if (stats->bHwError) if (stats->hw_error)
return false; return false;
stats->RxDrvInfoSize = pdesc->RxDrvInfoSize; stats->rx_drv_info_size = pdesc->rx_drv_info_size;
stats->RxBufShift = (pdesc->Shift) & 0x03; stats->rx_buf_shift = (pdesc->Shift) & 0x03;
stats->decrypted = !pdesc->SWDec; stats->decrypted = !pdesc->SWDec;
pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->RxBufShift); pDrvInfo = (struct rx_fwinfo *)(skb->data + stats->rx_buf_shift);
stats->rate = _rtl92e_rate_hw_to_mgn((bool)pDrvInfo->RxHT, stats->rate = _rtl92e_rate_hw_to_mgn((bool)pDrvInfo->RxHT,
pDrvInfo->RxRate); pDrvInfo->RxRate);
...@@ -1837,8 +1833,8 @@ bool rtl92e_is_rx_stuck(struct net_device *dev) ...@@ -1837,8 +1833,8 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
rx_chk_cnt++; rx_chk_cnt++;
if (priv->undecorated_smoothed_pwdb >= (RATE_ADAPTIVE_TH_HIGH + 5)) { if (priv->undecorated_smoothed_pwdb >= (RATE_ADAPTIVE_TH_HIGH + 5)) {
rx_chk_cnt = 0; rx_chk_cnt = 0;
} else if ((priv->undecorated_smoothed_pwdb < (RATE_ADAPTIVE_TH_HIGH + 5)) } else if ((priv->undecorated_smoothed_pwdb < (RATE_ADAPTIVE_TH_HIGH + 5)) &&
&& (((priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) && (((priv->current_chnl_bw != HT_CHANNEL_WIDTH_20) &&
(priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_40M)) (priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_40M))
|| ((priv->current_chnl_bw == HT_CHANNEL_WIDTH_20) && || ((priv->current_chnl_bw == HT_CHANNEL_WIDTH_20) &&
(priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_20M)))) { (priv->undecorated_smoothed_pwdb >= RATE_ADAPTIVE_TH_LOW_20M)))) {
...@@ -1859,7 +1855,6 @@ bool rtl92e_is_rx_stuck(struct net_device *dev) ...@@ -1859,7 +1855,6 @@ bool rtl92e_is_rx_stuck(struct net_device *dev)
rx_chk_cnt = 0; rx_chk_cnt = 0;
} }
slot_index = (priv->silent_reset_rx_slot_index++) % SilentResetRxSoltNum; slot_index = (priv->silent_reset_rx_slot_index++) % SilentResetRxSoltNum;
if (priv->rx_ctr == RegRxCounter) { if (priv->rx_ctr == RegRxCounter) {
......
...@@ -229,7 +229,7 @@ enum _RTL8192PCI_HW { ...@@ -229,7 +229,7 @@ enum _RTL8192PCI_HW {
RATR_MCS6 | RATR_MCS7) RATR_MCS6 | RATR_MCS7)
#define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \ #define RATE_ALL_OFDM_2SS (RATR_MCS8 | RATR_MCS9 | RATR_MCS10 | \
RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \ RATR_MCS11 | RATR_MCS12 | RATR_MCS13 | \
RATR_MCS14|RATR_MCS15) RATR_MCS14 | RATR_MCS15)
DRIVER_RSSI = 0x32c, DRIVER_RSSI = 0x32c,
MCS_TXAGC = 0x340, MCS_TXAGC = 0x340,
......
...@@ -20,8 +20,6 @@ enum hw90_block { ...@@ -20,8 +20,6 @@ enum hw90_block {
enum rf90_radio_path { enum rf90_radio_path {
RF90_PATH_A = 0, RF90_PATH_A = 0,
RF90_PATH_B = 1, RF90_PATH_B = 1,
RF90_PATH_C = 2,
RF90_PATH_D = 3,
RF90_PATH_MAX RF90_PATH_MAX
}; };
...@@ -45,13 +43,13 @@ void rtl92e_set_channel(struct net_device *dev, u8 channel); ...@@ -45,13 +43,13 @@ void rtl92e_set_channel(struct net_device *dev, u8 channel);
void rtl92e_set_bw_mode(struct net_device *dev, void rtl92e_set_bw_mode(struct net_device *dev,
enum ht_channel_width bandwidth, enum ht_channel_width bandwidth,
enum ht_extchnl_offset Offset); 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); void rtl92e_set_rf_off(struct net_device *dev);
bool rtl92e_set_rf_power_state(struct net_device *dev, bool rtl92e_set_rf_power_state(struct net_device *dev,
enum rt_rf_power_state rf_power_state); 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 #endif
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
int hwwep = 1; int hwwep = 1;
static char *ifname = "wlan%d"; 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(0x10ec, 0x8192)},
{PCI_DEVICE(0x07aa, 0x0044)}, {PCI_DEVICE(0x07aa, 0x0044)},
{PCI_DEVICE(0x07aa, 0x0047)}, {PCI_DEVICE(0x07aa, 0x0047)},
...@@ -173,7 +173,7 @@ bool rtl92e_set_rf_state(struct net_device *dev, ...@@ -173,7 +173,7 @@ bool rtl92e_set_rf_state(struct net_device *dev,
else else
priv->blinked_ingpio = false; priv->blinked_ingpio = false;
rtllib_mgnt_disconnect(priv->rtllib, 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) 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, ...@@ -322,7 +322,7 @@ static int _rtl92e_qos_handle_probe_response(struct r8192_priv *priv,
if (network->flags & NETWORK_HAS_QOS_MASK) { if (network->flags & NETWORK_HAS_QOS_MASK) {
if (active_network && if (active_network &&
(network->flags & NETWORK_HAS_QOS_PARAMETERS)) (network->flags & NETWORK_HAS_QOS_PARAMETERS))
network->qos_data.active = network->qos_data.supported; network->qos_data.active = network->qos_data.supported;
if ((network->qos_data.active == 1) && (active_network == 1) && if ((network->qos_data.active == 1) && (active_network == 1) &&
...@@ -665,7 +665,7 @@ static void _rtl92e_init_priv_handler(struct net_device *dev) ...@@ -665,7 +665,7 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->init_gain_handler = rtl92e_init_gain; priv->rtllib->init_gain_handler = rtl92e_init_gain;
priv->rtllib->rtllib_ips_leave_wq = rtl92e_rtllib_ips_leave_wq; priv->rtllib->rtllib_ips_leave_wq = rtl92e_rtllib_ips_leave_wq;
priv->rtllib->rtllib_ips_leave = rtl92e_rtllib_ips_leave; 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) 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) ...@@ -860,13 +860,13 @@ static enum reset_type _rtl92e_tx_check_stuck(struct net_device *dev)
skb = __skb_peek(&ring->queue); skb = __skb_peek(&ring->queue);
tcb_desc = (struct cb_desc *)(skb->cb + tcb_desc = (struct cb_desc *)(skb->cb +
MAX_DEV_ADDR_SIZE); MAX_DEV_ADDR_SIZE);
tcb_desc->nStuckCount++; tcb_desc->stuck_count++;
bCheckFwTxCnt = true; bCheckFwTxCnt = true;
if (tcb_desc->nStuckCount > 1) if (tcb_desc->stuck_count > 1)
netdev_info(dev, netdev_info(dev,
"%s: QueueID=%d tcb_desc->nStuckCount=%d\n", "%s: QueueID=%d tcb_desc->stuck_count=%d\n",
__func__, QueueID, __func__, QueueID,
tcb_desc->nStuckCount); tcb_desc->stuck_count);
} }
} }
spin_unlock_irqrestore(&priv->irq_th_lock, flags); spin_unlock_irqrestore(&priv->irq_th_lock, flags);
...@@ -1522,8 +1522,8 @@ static void _rtl92e_rx_normal(struct net_device *dev) ...@@ -1522,8 +1522,8 @@ static void _rtl92e_rx_normal(struct net_device *dev)
priv->rxbuffersize, DMA_FROM_DEVICE); priv->rxbuffersize, DMA_FROM_DEVICE);
skb_put(skb, pdesc->Length); skb_put(skb, pdesc->Length);
skb_reserve(skb, stats.RxDrvInfoSize + skb_reserve(skb, stats.rx_drv_info_size +
stats.RxBufShift); stats.rx_buf_shift);
skb_trim(skb, skb->len - S_CRC_LEN); skb_trim(skb, skb->len - S_CRC_LEN);
rtllib_hdr = (struct ieee80211_hdr *)skb->data; rtllib_hdr = (struct ieee80211_hdr *)skb->data;
if (!is_multicast_ether_addr(rtllib_hdr->addr1)) { if (!is_multicast_ether_addr(rtllib_hdr->addr1)) {
......
...@@ -300,7 +300,7 @@ struct r8192_priv { ...@@ -300,7 +300,7 @@ struct r8192_priv {
u32 rf_reg_0value[4]; u32 rf_reg_0value[4];
u8 num_total_rf_path; u8 num_total_rf_path;
bool brfpath_rxenable[4]; bool brfpath_rxenable[RF90_PATH_MAX];
bool tx_pwr_data_read_from_eeprom; bool tx_pwr_data_read_from_eeprom;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -736,7 +736,7 @@ void r8712_getbbrfreg_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj ...@@ -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_readtssi_cmdrsp_callback(struct _adapter *padapter, struct cmd_obj *pcmd);
void r8712_setstaKey_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_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); u32 tryPktInterval, u32 firstStageTO);
struct _cmd_callback { struct _cmd_callback {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment