Commit 0a59b3f4 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'staging-6.9-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 for 6.9-rc1. Nothing
  major in here, lots of small coding style cleanups for most drivers,
  and the removal of some obsolete hardare (the emxx_udc and some
  drivers/staging/board/ files).

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

* tag 'staging-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (122 commits)
  staging: greybus: Replaces directive __attribute__((packed)) by __packed as suggested by checkpatch
  staging: greybus: Replace __attribute__((packed)) by __packed in various instances
  Staging: rtl8192e: Rename function GetHalfNmodeSupportByAPsHandler()
  Staging: rtl8192e: Rename function rtllib_FlushRxTsPendingPkts()
  Staging: rtl8192e: Rename goto OnADDBARsp_Reject
  Staging: rtl8192e: Rename goto OnADDBAReq_Fail
  Staging: rtl8192e: Rename function rtllib_send_ADDBARsp()
  Staging: rtl8192e: Rename function rtllib_send_ADDBAReq()
  Staging: rtl8192e: Rename variable TxRxSelect
  Staging: rtl8192e: Fix 5 chckpatch alignment warnings in rtl819x_BAProc.c
  Staging: rtl8192e: Rename function MgntQuery_MgntFrameTxRate
  Staging: rtl8192e: Rename boolean variable bHalfWirelessN24GMode
  Staging: rtl8192e: Rename reference AllowAllDestAddrHandler
  Staging: rtl8192e: Rename varoable asSta
  Staging: rtl8192e: Rename varoable osCcxVerNum
  Staging: rtl8192e: Rename variable CcxAironetBuf
  Staging: rtl8192e: Rename variable osCcxAironetIE
  Staging: rtl8192e: Rename variable AironetIeOui
  Staging: rtl8192e: Rename variable asRsn
  Staging: rtl8192e: Rename variable CcxVerNumBuf
  ...
parents 3bcb0bf6 68bb540b
...@@ -46,14 +46,10 @@ source "drivers/staging/iio/Kconfig" ...@@ -46,14 +46,10 @@ source "drivers/staging/iio/Kconfig"
source "drivers/staging/sm750fb/Kconfig" source "drivers/staging/sm750fb/Kconfig"
source "drivers/staging/emxx_udc/Kconfig"
source "drivers/staging/nvec/Kconfig" source "drivers/staging/nvec/Kconfig"
source "drivers/staging/media/Kconfig" source "drivers/staging/media/Kconfig"
source "drivers/staging/board/Kconfig"
source "drivers/staging/gdm724x/Kconfig" source "drivers/staging/gdm724x/Kconfig"
source "drivers/staging/fbtft/Kconfig" source "drivers/staging/fbtft/Kconfig"
......
...@@ -14,9 +14,7 @@ obj-$(CONFIG_VT6656) += vt6656/ ...@@ -14,9 +14,7 @@ obj-$(CONFIG_VT6656) += vt6656/
obj-$(CONFIG_VME_BUS) += vme_user/ obj-$(CONFIG_VME_BUS) += vme_user/
obj-$(CONFIG_IIO) += iio/ obj-$(CONFIG_IIO) += iio/
obj-$(CONFIG_FB_SM750) += sm750fb/ obj-$(CONFIG_FB_SM750) += sm750fb/
obj-$(CONFIG_USB_EMXX) += emxx_udc/
obj-$(CONFIG_MFD_NVEC) += nvec/ obj-$(CONFIG_MFD_NVEC) += nvec/
obj-$(CONFIG_STAGING_BOARD) += board/
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/
......
...@@ -165,14 +165,9 @@ static ssize_t sysfs_read(struct device *dev, char *buf, ...@@ -165,14 +165,9 @@ static ssize_t sysfs_read(struct device *dev, char *buf,
{ {
struct axis_fifo *fifo = dev_get_drvdata(dev); struct axis_fifo *fifo = dev_get_drvdata(dev);
unsigned int read_val; unsigned int read_val;
unsigned int len;
char tmp[32];
read_val = ioread32(fifo->base_addr + addr_offset); read_val = ioread32(fifo->base_addr + addr_offset);
len = snprintf(tmp, sizeof(tmp), "0x%x\n", read_val); return sysfs_emit(buf, "0x%x\n", read_val);
memcpy(buf, tmp, len);
return len;
} }
static ssize_t isr_store(struct device *dev, struct device_attribute *attr, static ssize_t isr_store(struct device *dev, struct device_attribute *attr,
......
# SPDX-License-Identifier: GPL-2.0
config STAGING_BOARD
bool "Staging Board Support"
depends on OF_ADDRESS && OF_IRQ && HAVE_CLK
help
Staging board base is to support continuous upstream
in-tree development and integration of platform devices.
Helps developers integrate devices as platform devices for
device drivers that only provide platform device bindings.
This in turn allows for incremental development of both
hardware feature support and DT binding work in parallel.
# SPDX-License-Identifier: GPL-2.0
obj-y := board.o
obj-$(CONFIG_ARCH_EMEV2) += kzm9d.o
obj-$(CONFIG_ARCH_R8A7740) += armadillo800eva.o
* replace platform device code with DT nodes once the driver supports DT
* remove staging board code when no more platform devices are needed
// SPDX-License-Identifier: GPL-2.0
/*
* Staging board support for Armadillo 800 eva.
* Enable not-yet-DT-capable devices here.
*
* Based on board-armadillo800eva.c
*
* Copyright (C) 2012 Renesas Solutions Corp.
* Copyright (C) 2012 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
*/
#include <linux/dma-mapping.h>
#include <linux/fb.h>
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include <linux/videodev2.h>
#include <video/sh_mobile_lcdc.h>
#include "board.h"
static struct fb_videomode lcdc0_mode = {
.name = "AMPIER/AM-800480",
.xres = 800,
.yres = 480,
.left_margin = 88,
.right_margin = 40,
.hsync_len = 128,
.upper_margin = 20,
.lower_margin = 5,
.vsync_len = 5,
.sync = 0,
};
static struct sh_mobile_lcdc_info lcdc0_info = {
.clock_source = LCDC_CLK_BUS,
.ch[0] = {
.chan = LCDC_CHAN_MAINLCD,
.fourcc = V4L2_PIX_FMT_RGB565,
.interface_type = RGB24,
.clock_divider = 5,
.flags = 0,
.lcd_modes = &lcdc0_mode,
.num_modes = 1,
.panel_cfg = {
.width = 111,
.height = 68,
},
},
};
static struct resource lcdc0_resources[] = {
DEFINE_RES_MEM_NAMED(0xfe940000, 0x4000, "LCD0"),
DEFINE_RES_IRQ(177 + 32),
};
static struct platform_device lcdc0_device = {
.name = "sh_mobile_lcdc_fb",
.num_resources = ARRAY_SIZE(lcdc0_resources),
.resource = lcdc0_resources,
.id = 0,
.dev = {
.platform_data = &lcdc0_info,
.coherent_dma_mask = DMA_BIT_MASK(32),
},
};
static const struct board_staging_clk lcdc0_clocks[] __initconst = {
{ "lcdc0", NULL, "sh_mobile_lcdc_fb.0" },
};
static const struct board_staging_dev armadillo800eva_devices[] __initconst = {
{
.pdev = &lcdc0_device,
.clocks = lcdc0_clocks,
.nclocks = ARRAY_SIZE(lcdc0_clocks),
.domain = "/system-controller@e6180000/pm-domains/c5/a4lc@1"
},
};
static void __init armadillo800eva_init(void)
{
board_staging_gic_setup_xlate("arm,pl390", 32);
board_staging_register_devices(armadillo800eva_devices,
ARRAY_SIZE(armadillo800eva_devices));
}
board_staging("renesas,armadillo800eva", armadillo800eva_init);
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2014 Magnus Damm
* Copyright (C) 2015 Glider bvba
*/
#define pr_fmt(fmt) "board_staging: " fmt
#include <linux/clkdev.h>
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/pm_domain.h>
#include "board.h"
static struct device_node *irqc_node __initdata;
static unsigned int irqc_base __initdata;
static bool find_by_address(u64 base_address)
{
struct device_node *dn = of_find_all_nodes(NULL);
struct resource res;
while (dn) {
if (!of_address_to_resource(dn, 0, &res)) {
if (res.start == base_address) {
of_node_put(dn);
return true;
}
}
dn = of_find_all_nodes(dn);
}
return false;
}
bool __init board_staging_dt_node_available(const struct resource *resource,
unsigned int num_resources)
{
unsigned int i;
for (i = 0; i < num_resources; i++) {
const struct resource *r = resource + i;
if (resource_type(r) == IORESOURCE_MEM)
if (find_by_address(r->start))
return true; /* DT node available */
}
return false; /* Nothing found */
}
int __init board_staging_gic_setup_xlate(const char *gic_match,
unsigned int base)
{
WARN_ON(irqc_node);
irqc_node = of_find_compatible_node(NULL, NULL, gic_match);
WARN_ON(!irqc_node);
if (!irqc_node)
return -ENOENT;
irqc_base = base;
return 0;
}
static void __init gic_fixup_resource(struct resource *res)
{
struct of_phandle_args irq_data;
unsigned int hwirq = res->start;
unsigned int virq;
if (resource_type(res) != IORESOURCE_IRQ || !irqc_node)
return;
irq_data.np = irqc_node;
irq_data.args_count = 3;
irq_data.args[0] = 0;
irq_data.args[1] = hwirq - irqc_base;
switch (res->flags &
(IORESOURCE_IRQ_LOWEDGE | IORESOURCE_IRQ_HIGHEDGE |
IORESOURCE_IRQ_LOWLEVEL | IORESOURCE_IRQ_HIGHLEVEL)) {
case IORESOURCE_IRQ_LOWEDGE:
irq_data.args[2] = IRQ_TYPE_EDGE_FALLING;
break;
case IORESOURCE_IRQ_HIGHEDGE:
irq_data.args[2] = IRQ_TYPE_EDGE_RISING;
break;
case IORESOURCE_IRQ_LOWLEVEL:
irq_data.args[2] = IRQ_TYPE_LEVEL_LOW;
break;
case IORESOURCE_IRQ_HIGHLEVEL:
default:
irq_data.args[2] = IRQ_TYPE_LEVEL_HIGH;
break;
}
virq = irq_create_of_mapping(&irq_data);
if (WARN_ON(!virq))
return;
pr_debug("hwirq %u -> virq %u\n", hwirq, virq);
res->start = virq;
}
void __init board_staging_gic_fixup_resources(struct resource *res,
unsigned int nres)
{
unsigned int i;
for (i = 0; i < nres; i++)
gic_fixup_resource(&res[i]);
}
int __init board_staging_register_clock(const struct board_staging_clk *bsc)
{
int error;
pr_debug("Aliasing clock %s for con_id %s dev_id %s\n", bsc->clk,
bsc->con_id, bsc->dev_id);
error = clk_add_alias(bsc->con_id, bsc->dev_id, bsc->clk, NULL);
if (error)
pr_err("Failed to alias clock %s (%d)\n", bsc->clk, error);
return error;
}
#ifdef CONFIG_PM_GENERIC_DOMAINS_OF
static int board_staging_add_dev_domain(struct platform_device *pdev,
const char *domain)
{
struct device *dev = &pdev->dev;
struct of_phandle_args pd_args;
struct device_node *np;
np = of_find_node_by_path(domain);
if (!np) {
pr_err("Cannot find domain node %s\n", domain);
return -ENOENT;
}
pd_args.np = np;
pd_args.args_count = 0;
/* Initialization similar to device_pm_init_common() */
spin_lock_init(&dev->power.lock);
dev->power.early_init = true;
return of_genpd_add_device(&pd_args, dev);
}
#else
static inline int board_staging_add_dev_domain(struct platform_device *pdev,
const char *domain)
{
return 0;
}
#endif
int __init board_staging_register_device(const struct board_staging_dev *dev)
{
struct platform_device *pdev = dev->pdev;
unsigned int i;
int error;
pr_debug("Trying to register device %s\n", pdev->name);
if (board_staging_dt_node_available(pdev->resource,
pdev->num_resources)) {
pr_warn("Skipping %s, already in DT\n", pdev->name);
return -EEXIST;
}
board_staging_gic_fixup_resources(pdev->resource, pdev->num_resources);
for (i = 0; i < dev->nclocks; i++)
board_staging_register_clock(&dev->clocks[i]);
if (dev->domain)
board_staging_add_dev_domain(pdev, dev->domain);
error = platform_device_register(pdev);
if (error) {
pr_err("Failed to register device %s (%d)\n", pdev->name,
error);
return error;
}
return error;
}
void __init board_staging_register_devices(const struct board_staging_dev *devs,
unsigned int ndevs)
{
unsigned int i;
for (i = 0; i < ndevs; i++)
board_staging_register_device(&devs[i]);
}
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef __BOARD_H__
#define __BOARD_H__
#include <linux/init.h>
#include <linux/of.h>
struct board_staging_clk {
const char *clk;
const char *con_id;
const char *dev_id;
};
struct board_staging_dev {
/* Platform Device */
struct platform_device *pdev;
/* Clocks (optional) */
const struct board_staging_clk *clocks;
unsigned int nclocks;
/* Generic PM Domain (optional) */
const char *domain;
};
struct resource;
bool board_staging_dt_node_available(const struct resource *resource,
unsigned int num_resources);
int board_staging_gic_setup_xlate(const char *gic_match, unsigned int base);
void board_staging_gic_fixup_resources(struct resource *res, unsigned int nres);
int board_staging_register_clock(const struct board_staging_clk *bsc);
int board_staging_register_device(const struct board_staging_dev *dev);
void board_staging_register_devices(const struct board_staging_dev *devs,
unsigned int ndevs);
#define board_staging(str, fn) \
static int __init runtime_board_check(void) \
{ \
if (of_machine_is_compatible(str)) \
fn(); \
\
return 0; \
} \
\
device_initcall(runtime_board_check)
#endif /* __BOARD_H__ */
// SPDX-License-Identifier: GPL-2.0
/* Staging board support for KZM9D. Enable not-yet-DT-capable devices here. */
#include <linux/kernel.h>
#include <linux/platform_device.h>
#include "board.h"
static struct resource usbs1_res[] __initdata = {
DEFINE_RES_MEM(0xe2800000, 0x2000),
DEFINE_RES_IRQ(159),
};
static void __init kzm9d_init(void)
{
board_staging_gic_setup_xlate("arm,pl390", 32);
if (!board_staging_dt_node_available(usbs1_res,
ARRAY_SIZE(usbs1_res))) {
board_staging_gic_fixup_resources(usbs1_res,
ARRAY_SIZE(usbs1_res));
platform_device_register_simple("emxx_udc", -1, usbs1_res,
ARRAY_SIZE(usbs1_res));
}
}
board_staging("renesas,kzm9d", kzm9d_init);
# SPDX-License-Identifier: GPL-2.0
config USB_EMXX
tristate "EMXX USB Function Device Controller"
depends on USB_GADGET && (ARCH_RENESAS || COMPILE_TEST)
help
The Emma Mobile series of SoCs from Renesas Electronics and
former NEC Electronics include USB Function hardware.
Say "y" to link the driver statically, or "m" to build a
dynamically linked module called "emxx_udc" and force all
gadget drivers to also be dynamically linked.
# SPDX-License-Identifier: GPL-2.0
obj-$(CONFIG_USB_EMXX) := emxx_udc.o
* add clock framework support (platform device with CCF needs special care)
* break out board-specific VBUS GPIO to work with multiplatform
* convert VBUS GPIO to use GPIO descriptors from <linux/gpio/consumer.h>
and stop using the old GPIO API
* DT bindings
* move driver into drivers/usb/gadget/
This diff is collapsed.
This diff is collapsed.
...@@ -327,7 +327,6 @@ static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagereflis ...@@ -327,7 +327,6 @@ static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagereflis
unsigned int dirty_lines_start, dirty_lines_end; unsigned int dirty_lines_start, dirty_lines_end;
struct fb_deferred_io_pageref *pageref; struct fb_deferred_io_pageref *pageref;
unsigned int y_low = 0, y_high = 0; unsigned int y_low = 0, y_high = 0;
int count = 0;
spin_lock(&par->dirty_lock); spin_lock(&par->dirty_lock);
dirty_lines_start = par->dirty_lines_start; dirty_lines_start = par->dirty_lines_start;
...@@ -339,7 +338,6 @@ static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagereflis ...@@ -339,7 +338,6 @@ static void fbtft_deferred_io(struct fb_info *info, struct list_head *pagereflis
/* Mark display lines as dirty */ /* Mark display lines as dirty */
list_for_each_entry(pageref, pagereflist, list) { list_for_each_entry(pageref, pagereflist, list) {
count++;
y_low = pageref->offset / info->fix.line_length; y_low = pageref->offset / info->fix.line_length;
y_high = (pageref->offset + PAGE_SIZE - 1) / info->fix.line_length; y_high = (pageref->offset + PAGE_SIZE - 1) / info->fix.line_length;
dev_dbg(info->device, dev_dbg(info->device,
......
...@@ -285,7 +285,7 @@ static int controller_probe(struct platform_device *pdev) ...@@ -285,7 +285,7 @@ static int controller_probe(struct platform_device *pdev)
} }
} }
id = ida_simple_get(&controller_index_ida, 0, 0, GFP_KERNEL); id = ida_alloc(&controller_index_ida, GFP_KERNEL);
if (id < 0) { if (id < 0) {
err = id; err = id;
goto out_reset; goto out_reset;
...@@ -318,7 +318,7 @@ static int controller_probe(struct platform_device *pdev) ...@@ -318,7 +318,7 @@ static int controller_probe(struct platform_device *pdev)
out_dev: out_dev:
put_device(cd->class_dev); put_device(cd->class_dev);
out_ida: out_ida:
ida_simple_remove(&controller_index_ida, id); ida_free(&controller_index_ida, id);
out_reset: out_reset:
gpiod_set_value_cansleep(cd->reset_gpiod, 1); gpiod_set_value_cansleep(cd->reset_gpiod, 1);
return err; return err;
...@@ -330,7 +330,7 @@ static void controller_remove(struct platform_device *pdev) ...@@ -330,7 +330,7 @@ static void controller_remove(struct platform_device *pdev)
int id = cd->class_dev->id; int id = cd->class_dev->id;
device_unregister(cd->class_dev); device_unregister(cd->class_dev);
ida_simple_remove(&controller_index_ida, id); ida_free(&controller_index_ida, id);
gpiod_set_value_cansleep(cd->reset_gpiod, 1); gpiod_set_value_cansleep(cd->reset_gpiod, 1);
} }
......
...@@ -1195,7 +1195,7 @@ static void anybus_bus_remove(struct device *dev) ...@@ -1195,7 +1195,7 @@ static void anybus_bus_remove(struct device *dev)
adrv->remove(to_anybuss_client(dev)); adrv->remove(to_anybuss_client(dev));
} }
static struct bus_type anybus_bus = { static const struct bus_type anybus_bus = {
.name = "anybuss", .name = "anybuss",
.match = anybus_bus_match, .match = anybus_bus_match,
.probe = anybus_bus_probe, .probe = anybus_bus_probe,
......
...@@ -152,7 +152,7 @@ static const struct attribute_group fieldbus_group = { ...@@ -152,7 +152,7 @@ static const struct attribute_group fieldbus_group = {
}; };
__ATTRIBUTE_GROUPS(fieldbus); __ATTRIBUTE_GROUPS(fieldbus);
static struct class fieldbus_class = { static const struct class fieldbus_class = {
.name = "fieldbus_dev", .name = "fieldbus_dev",
.dev_groups = fieldbus_groups, .dev_groups = fieldbus_groups,
}; };
...@@ -247,7 +247,7 @@ static void __fieldbus_dev_unregister(struct fieldbus_dev *fb) ...@@ -247,7 +247,7 @@ static void __fieldbus_dev_unregister(struct fieldbus_dev *fb)
return; return;
device_destroy(&fieldbus_class, fb->cdev.dev); device_destroy(&fieldbus_class, fb->cdev.dev);
cdev_del(&fb->cdev); cdev_del(&fb->cdev);
ida_simple_remove(&fieldbus_ida, fb->id); ida_free(&fieldbus_ida, fb->id);
} }
void fieldbus_dev_unregister(struct fieldbus_dev *fb) void fieldbus_dev_unregister(struct fieldbus_dev *fb)
...@@ -267,7 +267,7 @@ static int __fieldbus_dev_register(struct fieldbus_dev *fb) ...@@ -267,7 +267,7 @@ static int __fieldbus_dev_register(struct fieldbus_dev *fb)
return -EINVAL; return -EINVAL;
if (!fb->read_area || !fb->write_area || !fb->fieldbus_id_get) if (!fb->read_area || !fb->write_area || !fb->fieldbus_id_get)
return -EINVAL; return -EINVAL;
fb->id = ida_simple_get(&fieldbus_ida, 0, MAX_FIELDBUSES, GFP_KERNEL); fb->id = ida_alloc_max(&fieldbus_ida, MAX_FIELDBUSES - 1, GFP_KERNEL);
if (fb->id < 0) if (fb->id < 0)
return fb->id; return fb->id;
devno = MKDEV(MAJOR(fieldbus_devt), fb->id); devno = MKDEV(MAJOR(fieldbus_devt), fb->id);
...@@ -290,7 +290,7 @@ static int __fieldbus_dev_register(struct fieldbus_dev *fb) ...@@ -290,7 +290,7 @@ static int __fieldbus_dev_register(struct fieldbus_dev *fb)
err_dev_create: err_dev_create:
cdev_del(&fb->cdev); cdev_del(&fb->cdev);
err_cdev: err_cdev:
ida_simple_remove(&fieldbus_ida, fb->id); ida_free(&fieldbus_ida, fb->id);
return err; return err;
} }
......
...@@ -43,7 +43,7 @@ static struct { ...@@ -43,7 +43,7 @@ static struct {
struct sock *sock; struct sock *sock;
} lte_event; } lte_event;
static struct device_type wwan_type = { static const struct device_type wwan_type = {
.name = "wwan", .name = "wwan",
}; };
......
...@@ -65,7 +65,6 @@ ...@@ -65,7 +65,6 @@
struct audio_apbridgea_hdr { struct audio_apbridgea_hdr {
__u8 type; __u8 type;
__le16 i2s_port; __le16 i2s_port;
__u8 data[];
} __packed; } __packed;
struct audio_apbridgea_set_config_request { struct audio_apbridgea_set_config_request {
......
...@@ -44,14 +44,14 @@ int gb_audio_manager_add(struct gb_audio_manager_module_descriptor *desc) ...@@ -44,14 +44,14 @@ int gb_audio_manager_add(struct gb_audio_manager_module_descriptor *desc)
int id; int id;
int err; int err;
id = ida_simple_get(&module_id, 0, 0, GFP_KERNEL); id = ida_alloc(&module_id, GFP_KERNEL);
if (id < 0) if (id < 0)
return id; return id;
err = gb_audio_manager_module_create(&module, manager_kset, err = gb_audio_manager_module_create(&module, manager_kset,
id, desc); id, desc);
if (err) { if (err) {
ida_simple_remove(&module_id, id); ida_free(&module_id, id);
return err; return err;
} }
...@@ -78,7 +78,7 @@ int gb_audio_manager_remove(int id) ...@@ -78,7 +78,7 @@ int gb_audio_manager_remove(int id)
list_del(&module->list); list_del(&module->list);
kobject_put(&module->kobj); kobject_put(&module->kobj);
up_write(&modules_rwsem); up_write(&modules_rwsem);
ida_simple_remove(&module_id, id); ida_free(&module_id, id);
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(gb_audio_manager_remove); EXPORT_SYMBOL_GPL(gb_audio_manager_remove);
...@@ -92,7 +92,7 @@ void gb_audio_manager_remove_all(void) ...@@ -92,7 +92,7 @@ void gb_audio_manager_remove_all(void)
list_for_each_entry_safe(module, next, &modules_list, list) { list_for_each_entry_safe(module, next, &modules_list, list) {
list_del(&module->list); list_del(&module->list);
ida_simple_remove(&module_id, module->id); ida_free(&module_id, module->id);
kobject_put(&module->kobj); kobject_put(&module->kobj);
} }
......
...@@ -761,7 +761,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol, ...@@ -761,7 +761,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol,
{ {
int ret, wi, ctl_id; int ret, wi, ctl_id;
unsigned int val, mux, change; unsigned int val, mux, change;
unsigned int mask;
struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol); struct snd_soc_dapm_widget_list *wlist = snd_kcontrol_chip(kcontrol);
struct snd_soc_dapm_widget *widget = wlist->widgets[0]; struct snd_soc_dapm_widget *widget = wlist->widgets[0];
struct gb_audio_ctl_elem_value gbvalue; struct gb_audio_ctl_elem_value gbvalue;
...@@ -802,7 +801,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol, ...@@ -802,7 +801,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol,
mux = ucontrol->value.enumerated.item[0]; mux = ucontrol->value.enumerated.item[0];
val = mux << e->shift_l; val = mux << e->shift_l;
mask = e->mask << e->shift_l;
if (le32_to_cpu(gbvalue.value.enumerated_item[0]) != if (le32_to_cpu(gbvalue.value.enumerated_item[0]) !=
ucontrol->value.enumerated.item[0]) { ucontrol->value.enumerated.item[0]) {
...@@ -815,7 +813,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol, ...@@ -815,7 +813,6 @@ static int gbcodec_enum_dapm_ctl_put(struct snd_kcontrol *kcontrol,
if (ucontrol->value.enumerated.item[1] > e->items - 1) if (ucontrol->value.enumerated.item[1] > e->items - 1)
return -EINVAL; return -EINVAL;
val |= ucontrol->value.enumerated.item[1] << e->shift_r; val |= ucontrol->value.enumerated.item[1] << e->shift_r;
mask |= e->mask << e->shift_r;
if (le32_to_cpu(gbvalue.value.enumerated_item[1]) != if (le32_to_cpu(gbvalue.value.enumerated_item[1]) !=
ucontrol->value.enumerated.item[1]) { ucontrol->value.enumerated.item[1]) {
change = 1; change = 1;
......
...@@ -324,7 +324,7 @@ int gb_cap_connection_init(struct gb_connection *connection) ...@@ -324,7 +324,7 @@ int gb_cap_connection_init(struct gb_connection *connection)
if (ret) if (ret)
goto err_list_del; goto err_list_del;
minor = ida_simple_get(&cap_minors_map, 0, NUM_MINORS, GFP_KERNEL); minor = ida_alloc_max(&cap_minors_map, NUM_MINORS - 1, GFP_KERNEL);
if (minor < 0) { if (minor < 0) {
ret = minor; ret = minor;
goto err_connection_disable; goto err_connection_disable;
...@@ -351,7 +351,7 @@ int gb_cap_connection_init(struct gb_connection *connection) ...@@ -351,7 +351,7 @@ int gb_cap_connection_init(struct gb_connection *connection)
err_del_cdev: err_del_cdev:
cdev_del(&cap->cdev); cdev_del(&cap->cdev);
err_remove_ida: err_remove_ida:
ida_simple_remove(&cap_minors_map, minor); ida_free(&cap_minors_map, minor);
err_connection_disable: err_connection_disable:
gb_connection_disable(connection); gb_connection_disable(connection);
err_list_del: err_list_del:
...@@ -375,7 +375,7 @@ void gb_cap_connection_exit(struct gb_connection *connection) ...@@ -375,7 +375,7 @@ void gb_cap_connection_exit(struct gb_connection *connection)
device_destroy(&cap_class, cap->dev_num); device_destroy(&cap_class, cap->dev_num);
cdev_del(&cap->cdev); cdev_del(&cap->cdev);
ida_simple_remove(&cap_minors_map, MINOR(cap->dev_num)); ida_free(&cap_minors_map, MINOR(cap->dev_num));
/* /*
* Disallow any new ioctl operations on the char device and wait for * Disallow any new ioctl operations on the char device and wait for
......
...@@ -243,10 +243,10 @@ static int gb_bootrom_get_firmware(struct gb_operation *op) ...@@ -243,10 +243,10 @@ static int gb_bootrom_get_firmware(struct gb_operation *op)
struct gb_bootrom *bootrom = gb_connection_get_data(op->connection); struct gb_bootrom *bootrom = gb_connection_get_data(op->connection);
const struct firmware *fw; const struct firmware *fw;
struct gb_bootrom_get_firmware_request *firmware_request; struct gb_bootrom_get_firmware_request *firmware_request;
struct gb_bootrom_get_firmware_response *firmware_response;
struct device *dev = &op->connection->bundle->dev; struct device *dev = &op->connection->bundle->dev;
unsigned int offset, size; unsigned int offset, size;
enum next_request_type next_request; enum next_request_type next_request;
u8 *firmware_response;
int ret = 0; int ret = 0;
/* Disable timeouts */ /* Disable timeouts */
...@@ -280,15 +280,15 @@ static int gb_bootrom_get_firmware(struct gb_operation *op) ...@@ -280,15 +280,15 @@ static int gb_bootrom_get_firmware(struct gb_operation *op)
goto unlock; goto unlock;
} }
if (!gb_operation_response_alloc(op, sizeof(*firmware_response) + size, /* gb_bootrom_get_firmware_response contains only a byte array */
GFP_KERNEL)) { if (!gb_operation_response_alloc(op, size, GFP_KERNEL)) {
dev_err(dev, "%s: error allocating response\n", __func__); dev_err(dev, "%s: error allocating response\n", __func__);
ret = -ENOMEM; ret = -ENOMEM;
goto unlock; goto unlock;
} }
firmware_response = op->response->payload; firmware_response = op->response->payload;
memcpy(firmware_response->data, fw->data + offset, size); memcpy(firmware_response, fw->data + offset, size);
dev_dbg(dev, "responding with firmware (offs = %u, size = %u)\n", dev_dbg(dev, "responding with firmware (offs = %u, size = %u)\n",
offset, size); offset, size);
......
...@@ -63,8 +63,7 @@ static void fw_req_release(struct kref *kref) ...@@ -63,8 +63,7 @@ static void fw_req_release(struct kref *kref)
* just hope that it never happens. * just hope that it never happens.
*/ */
if (!fw_req->timedout) if (!fw_req->timedout)
ida_simple_remove(&fw_req->fw_download->id_map, ida_free(&fw_req->fw_download->id_map, fw_req->firmware_id);
fw_req->firmware_id);
kfree(fw_req); kfree(fw_req);
} }
...@@ -171,7 +170,7 @@ static struct fw_request *find_firmware(struct fw_download *fw_download, ...@@ -171,7 +170,7 @@ static struct fw_request *find_firmware(struct fw_download *fw_download,
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
/* Allocate ids from 1 to 255 (u8-max), 0 is an invalid id */ /* Allocate ids from 1 to 255 (u8-max), 0 is an invalid id */
ret = ida_simple_get(&fw_download->id_map, 1, 256, GFP_KERNEL); ret = ida_alloc_range(&fw_download->id_map, 1, 255, GFP_KERNEL);
if (ret < 0) { if (ret < 0) {
dev_err(fw_download->parent, dev_err(fw_download->parent,
"failed to allocate firmware id (%d)\n", ret); "failed to allocate firmware id (%d)\n", ret);
...@@ -212,7 +211,7 @@ static struct fw_request *find_firmware(struct fw_download *fw_download, ...@@ -212,7 +211,7 @@ static struct fw_request *find_firmware(struct fw_download *fw_download,
return fw_req; return fw_req;
err_free_id: err_free_id:
ida_simple_remove(&fw_download->id_map, fw_req->firmware_id); ida_free(&fw_download->id_map, fw_req->firmware_id);
err_free_req: err_free_req:
kfree(fw_req); kfree(fw_req);
...@@ -271,11 +270,11 @@ static int fw_download_fetch_firmware(struct gb_operation *op) ...@@ -271,11 +270,11 @@ static int fw_download_fetch_firmware(struct gb_operation *op)
struct gb_connection *connection = op->connection; struct gb_connection *connection = op->connection;
struct fw_download *fw_download = gb_connection_get_data(connection); struct fw_download *fw_download = gb_connection_get_data(connection);
struct gb_fw_download_fetch_firmware_request *request; struct gb_fw_download_fetch_firmware_request *request;
struct gb_fw_download_fetch_firmware_response *response;
struct fw_request *fw_req; struct fw_request *fw_req;
const struct firmware *fw; const struct firmware *fw;
unsigned int offset, size; unsigned int offset, size;
u8 firmware_id; u8 firmware_id;
u8 *response;
int ret = 0; int ret = 0;
if (op->request->payload_size != sizeof(*request)) { if (op->request->payload_size != sizeof(*request)) {
...@@ -325,8 +324,8 @@ static int fw_download_fetch_firmware(struct gb_operation *op) ...@@ -325,8 +324,8 @@ static int fw_download_fetch_firmware(struct gb_operation *op)
goto put_fw; goto put_fw;
} }
if (!gb_operation_response_alloc(op, sizeof(*response) + size, /* gb_fw_download_fetch_firmware_response contains only a byte array */
GFP_KERNEL)) { if (!gb_operation_response_alloc(op, size, GFP_KERNEL)) {
dev_err(fw_download->parent, dev_err(fw_download->parent,
"error allocating fetch firmware response\n"); "error allocating fetch firmware response\n");
ret = -ENOMEM; ret = -ENOMEM;
...@@ -334,7 +333,7 @@ static int fw_download_fetch_firmware(struct gb_operation *op) ...@@ -334,7 +333,7 @@ static int fw_download_fetch_firmware(struct gb_operation *op)
} }
response = op->response->payload; response = op->response->payload;
memcpy(response->data, fw->data + offset, size); memcpy(response, fw->data + offset, size);
dev_dbg(fw_download->parent, dev_dbg(fw_download->parent,
"responding with firmware (offs = %u, size = %u)\n", offset, "responding with firmware (offs = %u, size = %u)\n", offset,
......
...@@ -165,7 +165,7 @@ static int fw_mgmt_load_and_validate_operation(struct fw_mgmt *fw_mgmt, ...@@ -165,7 +165,7 @@ static int fw_mgmt_load_and_validate_operation(struct fw_mgmt *fw_mgmt,
} }
/* Allocate ids from 1 to 255 (u8-max), 0 is an invalid id */ /* Allocate ids from 1 to 255 (u8-max), 0 is an invalid id */
ret = ida_simple_get(&fw_mgmt->id_map, 1, 256, GFP_KERNEL); ret = ida_alloc_range(&fw_mgmt->id_map, 1, 255, GFP_KERNEL);
if (ret < 0) { if (ret < 0) {
dev_err(fw_mgmt->parent, "failed to allocate request id (%d)\n", dev_err(fw_mgmt->parent, "failed to allocate request id (%d)\n",
ret); ret);
...@@ -180,8 +180,7 @@ static int fw_mgmt_load_and_validate_operation(struct fw_mgmt *fw_mgmt, ...@@ -180,8 +180,7 @@ static int fw_mgmt_load_and_validate_operation(struct fw_mgmt *fw_mgmt,
GB_FW_MGMT_TYPE_LOAD_AND_VALIDATE_FW, &request, GB_FW_MGMT_TYPE_LOAD_AND_VALIDATE_FW, &request,
sizeof(request), NULL, 0); sizeof(request), NULL, 0);
if (ret) { if (ret) {
ida_simple_remove(&fw_mgmt->id_map, ida_free(&fw_mgmt->id_map, fw_mgmt->intf_fw_request_id);
fw_mgmt->intf_fw_request_id);
fw_mgmt->intf_fw_request_id = 0; fw_mgmt->intf_fw_request_id = 0;
dev_err(fw_mgmt->parent, dev_err(fw_mgmt->parent,
"load and validate firmware request failed (%d)\n", "load and validate firmware request failed (%d)\n",
...@@ -220,7 +219,7 @@ static int fw_mgmt_interface_fw_loaded_operation(struct gb_operation *op) ...@@ -220,7 +219,7 @@ static int fw_mgmt_interface_fw_loaded_operation(struct gb_operation *op)
return -ENODEV; return -ENODEV;
} }
ida_simple_remove(&fw_mgmt->id_map, fw_mgmt->intf_fw_request_id); ida_free(&fw_mgmt->id_map, fw_mgmt->intf_fw_request_id);
fw_mgmt->intf_fw_request_id = 0; fw_mgmt->intf_fw_request_id = 0;
fw_mgmt->intf_fw_status = request->status; fw_mgmt->intf_fw_status = request->status;
fw_mgmt->intf_fw_major = le16_to_cpu(request->major); fw_mgmt->intf_fw_major = le16_to_cpu(request->major);
...@@ -316,7 +315,7 @@ static int fw_mgmt_backend_fw_update_operation(struct fw_mgmt *fw_mgmt, ...@@ -316,7 +315,7 @@ static int fw_mgmt_backend_fw_update_operation(struct fw_mgmt *fw_mgmt,
} }
/* Allocate ids from 1 to 255 (u8-max), 0 is an invalid id */ /* Allocate ids from 1 to 255 (u8-max), 0 is an invalid id */
ret = ida_simple_get(&fw_mgmt->id_map, 1, 256, GFP_KERNEL); ret = ida_alloc_range(&fw_mgmt->id_map, 1, 255, GFP_KERNEL);
if (ret < 0) { if (ret < 0) {
dev_err(fw_mgmt->parent, "failed to allocate request id (%d)\n", dev_err(fw_mgmt->parent, "failed to allocate request id (%d)\n",
ret); ret);
...@@ -330,8 +329,7 @@ static int fw_mgmt_backend_fw_update_operation(struct fw_mgmt *fw_mgmt, ...@@ -330,8 +329,7 @@ static int fw_mgmt_backend_fw_update_operation(struct fw_mgmt *fw_mgmt,
GB_FW_MGMT_TYPE_BACKEND_FW_UPDATE, &request, GB_FW_MGMT_TYPE_BACKEND_FW_UPDATE, &request,
sizeof(request), NULL, 0); sizeof(request), NULL, 0);
if (ret) { if (ret) {
ida_simple_remove(&fw_mgmt->id_map, ida_free(&fw_mgmt->id_map, fw_mgmt->backend_fw_request_id);
fw_mgmt->backend_fw_request_id);
fw_mgmt->backend_fw_request_id = 0; fw_mgmt->backend_fw_request_id = 0;
dev_err(fw_mgmt->parent, dev_err(fw_mgmt->parent,
"backend %s firmware update request failed (%d)\n", tag, "backend %s firmware update request failed (%d)\n", tag,
...@@ -369,7 +367,7 @@ static int fw_mgmt_backend_fw_updated_operation(struct gb_operation *op) ...@@ -369,7 +367,7 @@ static int fw_mgmt_backend_fw_updated_operation(struct gb_operation *op)
return -ENODEV; return -ENODEV;
} }
ida_simple_remove(&fw_mgmt->id_map, fw_mgmt->backend_fw_request_id); ida_free(&fw_mgmt->id_map, fw_mgmt->backend_fw_request_id);
fw_mgmt->backend_fw_request_id = 0; fw_mgmt->backend_fw_request_id = 0;
fw_mgmt->backend_fw_status = request->status; fw_mgmt->backend_fw_status = request->status;
...@@ -617,7 +615,7 @@ int gb_fw_mgmt_connection_init(struct gb_connection *connection) ...@@ -617,7 +615,7 @@ int gb_fw_mgmt_connection_init(struct gb_connection *connection)
if (ret) if (ret)
goto err_list_del; goto err_list_del;
minor = ida_simple_get(&fw_mgmt_minors_map, 0, NUM_MINORS, GFP_KERNEL); minor = ida_alloc_max(&fw_mgmt_minors_map, NUM_MINORS - 1, GFP_KERNEL);
if (minor < 0) { if (minor < 0) {
ret = minor; ret = minor;
goto err_connection_disable; goto err_connection_disable;
...@@ -645,7 +643,7 @@ int gb_fw_mgmt_connection_init(struct gb_connection *connection) ...@@ -645,7 +643,7 @@ int gb_fw_mgmt_connection_init(struct gb_connection *connection)
err_del_cdev: err_del_cdev:
cdev_del(&fw_mgmt->cdev); cdev_del(&fw_mgmt->cdev);
err_remove_ida: err_remove_ida:
ida_simple_remove(&fw_mgmt_minors_map, minor); ida_free(&fw_mgmt_minors_map, minor);
err_connection_disable: err_connection_disable:
gb_connection_disable(connection); gb_connection_disable(connection);
err_list_del: err_list_del:
...@@ -669,7 +667,7 @@ void gb_fw_mgmt_connection_exit(struct gb_connection *connection) ...@@ -669,7 +667,7 @@ void gb_fw_mgmt_connection_exit(struct gb_connection *connection)
device_destroy(&fw_mgmt_class, fw_mgmt->dev_num); device_destroy(&fw_mgmt_class, fw_mgmt->dev_num);
cdev_del(&fw_mgmt->cdev); cdev_del(&fw_mgmt->cdev);
ida_simple_remove(&fw_mgmt_minors_map, MINOR(fw_mgmt->dev_num)); ida_free(&fw_mgmt_minors_map, MINOR(fw_mgmt->dev_num));
/* /*
* Disallow any new ioctl operations on the char device and wait for * Disallow any new ioctl operations on the char device and wait for
......
...@@ -46,7 +46,7 @@ static void gbphy_dev_release(struct device *dev) ...@@ -46,7 +46,7 @@ static void gbphy_dev_release(struct device *dev)
{ {
struct gbphy_device *gbphy_dev = to_gbphy_dev(dev); struct gbphy_device *gbphy_dev = to_gbphy_dev(dev);
ida_simple_remove(&gbphy_id, gbphy_dev->id); ida_free(&gbphy_id, gbphy_dev->id);
kfree(gbphy_dev); kfree(gbphy_dev);
} }
...@@ -182,7 +182,7 @@ static void gbphy_dev_remove(struct device *dev) ...@@ -182,7 +182,7 @@ static void gbphy_dev_remove(struct device *dev)
pm_runtime_dont_use_autosuspend(dev); pm_runtime_dont_use_autosuspend(dev);
} }
static struct bus_type gbphy_bus_type = { static const struct bus_type gbphy_bus_type = {
.name = "gbphy", .name = "gbphy",
.match = gbphy_dev_match, .match = gbphy_dev_match,
.probe = gbphy_dev_probe, .probe = gbphy_dev_probe,
...@@ -225,13 +225,13 @@ static struct gbphy_device *gb_gbphy_create_dev(struct gb_bundle *bundle, ...@@ -225,13 +225,13 @@ static struct gbphy_device *gb_gbphy_create_dev(struct gb_bundle *bundle,
int retval; int retval;
int id; int id;
id = ida_simple_get(&gbphy_id, 1, 0, GFP_KERNEL); id = ida_alloc_min(&gbphy_id, 1, GFP_KERNEL);
if (id < 0) if (id < 0)
return ERR_PTR(id); return ERR_PTR(id);
gbphy_dev = kzalloc(sizeof(*gbphy_dev), GFP_KERNEL); gbphy_dev = kzalloc(sizeof(*gbphy_dev), GFP_KERNEL);
if (!gbphy_dev) { if (!gbphy_dev) {
ida_simple_remove(&gbphy_id, id); ida_free(&gbphy_id, id);
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
} }
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
/* IOCTL support */ /* IOCTL support */
struct cap_ioc_get_endpoint_uid { struct cap_ioc_get_endpoint_uid {
__u8 uid[8]; __u8 uid[8];
} __attribute__ ((__packed__)); } __packed;
struct cap_ioc_get_ims_certificate { struct cap_ioc_get_ims_certificate {
__u32 certificate_class; __u32 certificate_class;
...@@ -53,7 +53,7 @@ struct cap_ioc_get_ims_certificate { ...@@ -53,7 +53,7 @@ struct cap_ioc_get_ims_certificate {
__u8 result_code; __u8 result_code;
__u32 cert_size; __u32 cert_size;
__u8 certificate[CAP_CERTIFICATE_MAX_SIZE]; __u8 certificate[CAP_CERTIFICATE_MAX_SIZE];
} __attribute__ ((__packed__)); } __packed;
struct cap_ioc_authenticate { struct cap_ioc_authenticate {
__u32 auth_type; __u32 auth_type;
...@@ -64,7 +64,7 @@ struct cap_ioc_authenticate { ...@@ -64,7 +64,7 @@ struct cap_ioc_authenticate {
__u8 response[64]; __u8 response[64];
__u32 signature_size; __u32 signature_size;
__u8 signature[CAP_SIGNATURE_MAX_SIZE]; __u8 signature[CAP_SIGNATURE_MAX_SIZE];
} __attribute__ ((__packed__)); } __packed;
#define CAP_IOCTL_BASE 'C' #define CAP_IOCTL_BASE 'C'
#define CAP_IOC_GET_ENDPOINT_UID _IOR(CAP_IOCTL_BASE, 0, struct cap_ioc_get_endpoint_uid) #define CAP_IOC_GET_ENDPOINT_UID _IOR(CAP_IOCTL_BASE, 0, struct cap_ioc_get_endpoint_uid)
......
...@@ -41,14 +41,14 @@ struct fw_mgmt_ioc_get_intf_version { ...@@ -41,14 +41,14 @@ struct fw_mgmt_ioc_get_intf_version {
__u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE]; __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
__u16 major; __u16 major;
__u16 minor; __u16 minor;
} __attribute__ ((__packed__)); } __packed;
struct fw_mgmt_ioc_get_backend_version { struct fw_mgmt_ioc_get_backend_version {
__u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE]; __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
__u16 major; __u16 major;
__u16 minor; __u16 minor;
__u8 status; __u8 status;
} __attribute__ ((__packed__)); } __packed;
struct fw_mgmt_ioc_intf_load_and_validate { struct fw_mgmt_ioc_intf_load_and_validate {
__u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE]; __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
...@@ -56,12 +56,12 @@ struct fw_mgmt_ioc_intf_load_and_validate { ...@@ -56,12 +56,12 @@ struct fw_mgmt_ioc_intf_load_and_validate {
__u8 status; __u8 status;
__u16 major; __u16 major;
__u16 minor; __u16 minor;
} __attribute__ ((__packed__)); } __packed;
struct fw_mgmt_ioc_backend_fw_update { struct fw_mgmt_ioc_backend_fw_update {
__u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE]; __u8 firmware_tag[GB_FIRMWARE_U_TAG_MAX_SIZE];
__u8 status; __u8 status;
} __attribute__ ((__packed__)); } __packed;
#define FW_MGMT_IOCTL_BASE 'F' #define FW_MGMT_IOCTL_BASE 'F'
#define FW_MGMT_IOC_GET_INTF_FW _IOR(FW_MGMT_IOCTL_BASE, 0, struct fw_mgmt_ioc_get_intf_version) #define FW_MGMT_IOC_GET_INTF_FW _IOR(FW_MGMT_IOCTL_BASE, 0, struct fw_mgmt_ioc_get_intf_version)
......
...@@ -95,15 +95,15 @@ static struct led_classdev *get_channel_cdev(struct gb_channel *channel) ...@@ -95,15 +95,15 @@ static struct led_classdev *get_channel_cdev(struct gb_channel *channel)
static struct gb_channel *get_channel_from_mode(struct gb_light *light, static struct gb_channel *get_channel_from_mode(struct gb_light *light,
u32 mode) u32 mode)
{ {
struct gb_channel *channel = NULL; struct gb_channel *channel;
int i; int i;
for (i = 0; i < light->channels_count; i++) { for (i = 0; i < light->channels_count; i++) {
channel = &light->channels[i]; channel = &light->channels[i];
if (channel && channel->mode == mode) if (channel->mode == mode)
break;
}
return channel; return channel;
}
return NULL;
} }
static int __gb_lights_flash_intensity_set(struct gb_channel *channel, static int __gb_lights_flash_intensity_set(struct gb_channel *channel,
......
...@@ -1028,7 +1028,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle, ...@@ -1028,7 +1028,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle,
gb->file = debugfs_create_file(name, S_IFREG | 0444, gb_dev.root, gb, gb->file = debugfs_create_file(name, S_IFREG | 0444, gb_dev.root, gb,
&gb_loopback_dbgfs_latency_fops); &gb_loopback_dbgfs_latency_fops);
gb->id = ida_simple_get(&loopback_ida, 0, 0, GFP_KERNEL); gb->id = ida_alloc(&loopback_ida, GFP_KERNEL);
if (gb->id < 0) { if (gb->id < 0) {
retval = gb->id; retval = gb->id;
goto out_debugfs_remove; goto out_debugfs_remove;
...@@ -1079,7 +1079,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle, ...@@ -1079,7 +1079,7 @@ static int gb_loopback_probe(struct gb_bundle *bundle,
out_connection_disable: out_connection_disable:
gb_connection_disable(connection); gb_connection_disable(connection);
out_ida_remove: out_ida_remove:
ida_simple_remove(&loopback_ida, gb->id); ida_free(&loopback_ida, gb->id);
out_debugfs_remove: out_debugfs_remove:
debugfs_remove(gb->file); debugfs_remove(gb->file);
out_connection_destroy: out_connection_destroy:
...@@ -1121,7 +1121,7 @@ static void gb_loopback_disconnect(struct gb_bundle *bundle) ...@@ -1121,7 +1121,7 @@ static void gb_loopback_disconnect(struct gb_bundle *bundle)
spin_unlock_irqrestore(&gb_dev.lock, flags); spin_unlock_irqrestore(&gb_dev.lock, flags);
device_unregister(gb->dev); device_unregister(gb->dev);
ida_simple_remove(&loopback_ida, gb->id); ida_free(&loopback_ida, gb->id);
gb_connection_destroy(gb->connection); gb_connection_destroy(gb->connection);
kfree(gb); kfree(gb);
......
...@@ -181,7 +181,7 @@ static int gb_raw_probe(struct gb_bundle *bundle, ...@@ -181,7 +181,7 @@ static int gb_raw_probe(struct gb_bundle *bundle,
raw->connection = connection; raw->connection = connection;
greybus_set_drvdata(bundle, raw); greybus_set_drvdata(bundle, raw);
minor = ida_simple_get(&minors, 0, 0, GFP_KERNEL); minor = ida_alloc(&minors, GFP_KERNEL);
if (minor < 0) { if (minor < 0) {
retval = minor; retval = minor;
goto error_connection_destroy; goto error_connection_destroy;
...@@ -214,7 +214,7 @@ static int gb_raw_probe(struct gb_bundle *bundle, ...@@ -214,7 +214,7 @@ static int gb_raw_probe(struct gb_bundle *bundle,
gb_connection_disable(connection); gb_connection_disable(connection);
error_remove_ida: error_remove_ida:
ida_simple_remove(&minors, minor); ida_free(&minors, minor);
error_connection_destroy: error_connection_destroy:
gb_connection_destroy(connection); gb_connection_destroy(connection);
...@@ -235,7 +235,7 @@ static void gb_raw_disconnect(struct gb_bundle *bundle) ...@@ -235,7 +235,7 @@ static void gb_raw_disconnect(struct gb_bundle *bundle)
device_destroy(&raw_class, raw->dev); device_destroy(&raw_class, raw->dev);
cdev_del(&raw->cdev); cdev_del(&raw->cdev);
gb_connection_disable(connection); gb_connection_disable(connection);
ida_simple_remove(&minors, MINOR(raw->dev)); ida_free(&minors, MINOR(raw->dev));
gb_connection_destroy(connection); gb_connection_destroy(connection);
mutex_lock(&raw->list_lock); mutex_lock(&raw->list_lock);
......
...@@ -153,7 +153,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle, ...@@ -153,7 +153,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
* there is a "real" device somewhere in the kernel for this, but I * there is a "real" device somewhere in the kernel for this, but I
* can't find it at the moment... * can't find it at the moment...
*/ */
vib->minor = ida_simple_get(&minors, 0, 0, GFP_KERNEL); vib->minor = ida_alloc(&minors, GFP_KERNEL);
if (vib->minor < 0) { if (vib->minor < 0) {
retval = vib->minor; retval = vib->minor;
goto err_connection_disable; goto err_connection_disable;
...@@ -173,7 +173,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle, ...@@ -173,7 +173,7 @@ static int gb_vibrator_probe(struct gb_bundle *bundle,
return 0; return 0;
err_ida_remove: err_ida_remove:
ida_simple_remove(&minors, vib->minor); ida_free(&minors, vib->minor);
err_connection_disable: err_connection_disable:
gb_connection_disable(connection); gb_connection_disable(connection);
err_connection_destroy: err_connection_destroy:
...@@ -197,7 +197,7 @@ static void gb_vibrator_disconnect(struct gb_bundle *bundle) ...@@ -197,7 +197,7 @@ static void gb_vibrator_disconnect(struct gb_bundle *bundle)
turn_off(vib); turn_off(vib);
device_unregister(vib->dev); device_unregister(vib->dev);
ida_simple_remove(&minors, vib->minor); ida_free(&minors, vib->minor);
gb_connection_disable(vib->connection); gb_connection_disable(vib->connection);
gb_connection_destroy(vib->connection); gb_connection_destroy(vib->connection);
kfree(vib); kfree(vib);
......
ToDo list (incomplete, unordered) ToDo list (incomplete, unordered)
- add compile as module support - move the driver to the new i2c slave framework
- move half of the nvec init stuff to i2c-tegra.c
- move event handling to nvec_events
- finish suspend/resume support - finish suspend/resume support
- add support for more device implementations - fix udelay in the isr
- add atomic ops in order to fix shutoff/reboot problems
...@@ -709,10 +709,11 @@ static irqreturn_t nvec_interrupt(int irq, void *dev) ...@@ -709,10 +709,11 @@ static irqreturn_t nvec_interrupt(int irq, void *dev)
status & RNW ? " RNW" : ""); status & RNW ? " RNW" : "");
/* /*
* TODO: A correct fix needs to be found for this. * TODO: replace the udelay with a read back after each writel above
* in order to work around a hardware issue, see i2c-tegra.c
* *
* We experience less incomplete messages with this delay than without * Unfortunately, this change causes an intialisation issue with the
* it, but we don't know why. Help is appreciated. * touchpad, which needs to be fixed first.
*/ */
udelay(100); udelay(100);
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include <linux/phy.h> #include <linux/phy.h>
#include <linux/ratelimit.h> #include <linux/ratelimit.h>
#include <linux/of_mdio.h> #include <linux/of_mdio.h>
#include <generated/utsrelease.h>
#include <net/dst.h> #include <net/dst.h>
#include "octeon-ethernet.h" #include "octeon-ethernet.h"
...@@ -22,7 +21,6 @@ static void cvm_oct_get_drvinfo(struct net_device *dev, ...@@ -22,7 +21,6 @@ static void cvm_oct_get_drvinfo(struct net_device *dev,
struct ethtool_drvinfo *info) struct ethtool_drvinfo *info)
{ {
strscpy(info->driver, KBUILD_MODNAME, sizeof(info->driver)); strscpy(info->driver, KBUILD_MODNAME, sizeof(info->driver));
strscpy(info->version, UTS_RELEASE, sizeof(info->version));
strscpy(info->bus_info, "Builtin", sizeof(info->bus_info)); strscpy(info->bus_info, "Builtin", sizeof(info->bus_info));
} }
......
...@@ -49,6 +49,7 @@ ...@@ -49,6 +49,7 @@
#define N_PI433_MINORS BIT(MINORBITS) /*32*/ /* ... up to 256 */ #define N_PI433_MINORS BIT(MINORBITS) /*32*/ /* ... up to 256 */
#define MAX_MSG_SIZE 900 /* min: FIFO_SIZE! */ #define MAX_MSG_SIZE 900 /* min: FIFO_SIZE! */
#define MSG_FIFO_SIZE 65536 /* 65536 = 2^16 */ #define MSG_FIFO_SIZE 65536 /* 65536 = 2^16 */
#define FIFO_THRESHOLD 15 /* bytes */
#define NUM_DIO 2 #define NUM_DIO 2
static dev_t pi433_dev; static dev_t pi433_dev;
......
...@@ -8,12 +8,12 @@ ...@@ -8,12 +8,12 @@
#include <linux/types.h> #include <linux/types.h>
#include <linux/spi/spi.h> #include <linux/spi/spi.h>
#include <linux/units.h>
#include "rf69.h" #include "rf69.h"
#include "rf69_registers.h" #include "rf69_registers.h"
#define F_OSC 32000000 /* in Hz */ #define F_OSC (32 * HZ_PER_MHZ)
#define FIFO_SIZE 66 /* in byte */
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
...@@ -11,11 +11,7 @@ ...@@ -11,11 +11,7 @@
#include "rf69_enum.h" #include "rf69_enum.h"
#include "rf69_registers.h" #include "rf69_registers.h"
/* NOTE: Modifying FREQUENCY value impacts CE certification */
#define F_OSC 32000000 /* Hz */
#define FREQUENCY 433920000 /* Hz */
#define FIFO_SIZE 66 /* bytes */ #define FIFO_SIZE 66 /* bytes */
#define FIFO_THRESHOLD 15 /* bytes */
u8 rf69_read_reg(struct spi_device *spi, u8 addr); u8 rf69_read_reg(struct spi_device *spi, u8 addr);
int rf69_get_version(struct spi_device *spi); int rf69_get_version(struct spi_device *spi);
......
...@@ -714,7 +714,6 @@ void rtl92e_set_channel(struct net_device *dev, u8 channel) ...@@ -714,7 +714,6 @@ void rtl92e_set_channel(struct net_device *dev, u8 channel)
if (priv->up) if (priv->up)
_rtl92e_phy_switch_channel_work_item(dev); _rtl92e_phy_switch_channel_work_item(dev);
priv->sw_chnl_in_progress = false; priv->sw_chnl_in_progress = false;
return;
} }
static void _rtl92e_cck_tx_power_track_bw_switch_tssi(struct net_device *dev) static void _rtl92e_cck_tx_power_track_bw_switch_tssi(struct net_device *dev)
......
...@@ -172,7 +172,7 @@ bool rtl92e_set_rf_state(struct net_device *dev, ...@@ -172,7 +172,7 @@ bool rtl92e_set_rf_state(struct net_device *dev,
priv->blinked_ingpio = true; priv->blinked_ingpio = true;
else else
priv->blinked_ingpio = false; priv->blinked_ingpio = false;
rtllib_MgntDisconnect(priv->rtllib, rtllib_mgnt_disconnect(priv->rtllib,
WLAN_REASON_DISASSOC_STA_HAS_LEFT); WLAN_REASON_DISASSOC_STA_HAS_LEFT);
} }
} }
...@@ -236,14 +236,14 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap) ...@@ -236,14 +236,14 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap)
if (priv->dot11_current_preamble_mode != PREAMBLE_SHORT) { if (priv->dot11_current_preamble_mode != PREAMBLE_SHORT) {
ShortPreamble = true; ShortPreamble = true;
priv->dot11_current_preamble_mode = PREAMBLE_SHORT; priv->dot11_current_preamble_mode = PREAMBLE_SHORT;
priv->rtllib->SetHwRegHandler(dev, HW_VAR_ACK_PREAMBLE, priv->rtllib->set_hw_reg_handler(dev, HW_VAR_ACK_PREAMBLE,
(unsigned char *)&ShortPreamble); (unsigned char *)&ShortPreamble);
} }
} else { } else {
if (priv->dot11_current_preamble_mode != PREAMBLE_LONG) { if (priv->dot11_current_preamble_mode != PREAMBLE_LONG) {
ShortPreamble = false; ShortPreamble = false;
priv->dot11_current_preamble_mode = PREAMBLE_LONG; priv->dot11_current_preamble_mode = PREAMBLE_LONG;
priv->rtllib->SetHwRegHandler(dev, HW_VAR_ACK_PREAMBLE, priv->rtllib->set_hw_reg_handler(dev, HW_VAR_ACK_PREAMBLE,
(unsigned char *)&ShortPreamble); (unsigned char *)&ShortPreamble);
} }
} }
...@@ -256,13 +256,13 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap) ...@@ -256,13 +256,13 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap)
(!priv->rtllib->ht_info->current_rt2rt_long_slot_time)) { (!priv->rtllib->ht_info->current_rt2rt_long_slot_time)) {
if (cur_slot_time != SHORT_SLOT_TIME) { if (cur_slot_time != SHORT_SLOT_TIME) {
slot_time_val = SHORT_SLOT_TIME; slot_time_val = SHORT_SLOT_TIME;
priv->rtllib->SetHwRegHandler(dev, priv->rtllib->set_hw_reg_handler(dev,
HW_VAR_SLOT_TIME, &slot_time_val); HW_VAR_SLOT_TIME, &slot_time_val);
} }
} else { } else {
if (cur_slot_time != NON_SHORT_SLOT_TIME) { if (cur_slot_time != NON_SHORT_SLOT_TIME) {
slot_time_val = NON_SHORT_SLOT_TIME; slot_time_val = NON_SHORT_SLOT_TIME;
priv->rtllib->SetHwRegHandler(dev, priv->rtllib->set_hw_reg_handler(dev,
HW_VAR_SLOT_TIME, &slot_time_val); HW_VAR_SLOT_TIME, &slot_time_val);
} }
} }
...@@ -301,7 +301,7 @@ static void _rtl92e_qos_activate(void *data) ...@@ -301,7 +301,7 @@ static void _rtl92e_qos_activate(void *data)
goto success; goto success;
for (i = 0; i < QOS_QUEUE_NUM; i++) for (i = 0; i < QOS_QUEUE_NUM; i++)
priv->rtllib->SetHwRegHandler(dev, HW_VAR_AC_PARAM, (u8 *)(&i)); priv->rtllib->set_hw_reg_handler(dev, HW_VAR_AC_PARAM, (u8 *)(&i));
success: success:
mutex_unlock(&priv->mutex); mutex_unlock(&priv->mutex);
...@@ -656,12 +656,12 @@ static void _rtl92e_init_priv_handler(struct net_device *dev) ...@@ -656,12 +656,12 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
priv->rtllib->enter_sleep_state = rtl92e_enter_sleep; priv->rtllib->enter_sleep_state = rtl92e_enter_sleep;
priv->rtllib->ps_is_queue_empty = _rtl92e_is_tx_queue_empty; priv->rtllib->ps_is_queue_empty = _rtl92e_is_tx_queue_empty;
priv->rtllib->GetNmodeSupportBySecCfg = rtl92e_get_nmode_support_by_sec; priv->rtllib->get_nmode_support_by_sec_cfg = rtl92e_get_nmode_support_by_sec;
priv->rtllib->GetHalfNmodeSupportByAPsHandler = priv->rtllib->get_half_nmode_support_by_aps_handler =
rtl92e_is_halfn_supported_by_ap; rtl92e_is_halfn_supported_by_ap;
priv->rtllib->SetHwRegHandler = rtl92e_set_reg; priv->rtllib->set_hw_reg_handler = rtl92e_set_reg;
priv->rtllib->AllowAllDestAddrHandler = rtl92e_set_monitor_mode; priv->rtllib->allow_all_dest_addr_handler = rtl92e_set_monitor_mode;
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;
...@@ -705,7 +705,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) ...@@ -705,7 +705,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
priv->hw_rf_off_action = 0; priv->hw_rf_off_action = 0;
priv->set_rf_pwr_state_in_progress = false; priv->set_rf_pwr_state_in_progress = false;
priv->rtllib->pwr_save_ctrl.bLeisurePs = true; priv->rtllib->pwr_save_ctrl.bLeisurePs = true;
priv->rtllib->LPSDelayCnt = 0; priv->rtllib->lps_delay_cnt = 0;
priv->rtllib->sta_sleep = LPS_IS_WAKE; priv->rtllib->sta_sleep = LPS_IS_WAKE;
priv->rtllib->rf_power_state = rf_on; priv->rtllib->rf_power_state = rf_on;
...@@ -909,25 +909,24 @@ static void _rtl92e_if_check_reset(struct net_device *dev) ...@@ -909,25 +909,24 @@ static void _rtl92e_if_check_reset(struct net_device *dev)
netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n", netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n",
__func__, TxResetType, RxResetType); __func__, TxResetType, RxResetType);
} }
return;
} }
static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum, static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum,
u32 *TotalRxDataNum) u32 *TotalRxDataNum)
{ {
u16 SlotIndex; u16 slot_index;
u8 i; u8 i;
*TotalRxBcnNum = 0; *TotalRxBcnNum = 0;
*TotalRxDataNum = 0; *TotalRxDataNum = 0;
SlotIndex = (priv->rtllib->link_detect_info.SlotIndex++) % slot_index = (priv->rtllib->link_detect_info.slot_index++) %
(priv->rtllib->link_detect_info.SlotNum); (priv->rtllib->link_detect_info.slot_num);
priv->rtllib->link_detect_info.RxBcnNum[SlotIndex] = priv->rtllib->link_detect_info.RxBcnNum[slot_index] =
priv->rtllib->link_detect_info.NumRecvBcnInPeriod; priv->rtllib->link_detect_info.num_recv_bcn_in_period;
priv->rtllib->link_detect_info.RxDataNum[SlotIndex] = priv->rtllib->link_detect_info.RxDataNum[slot_index] =
priv->rtllib->link_detect_info.NumRecvDataInPeriod; priv->rtllib->link_detect_info.num_recv_data_in_period;
for (i = 0; i < priv->rtllib->link_detect_info.SlotNum; i++) { for (i = 0; i < priv->rtllib->link_detect_info.slot_num; i++) {
*TotalRxBcnNum += priv->rtllib->link_detect_info.RxBcnNum[i]; *TotalRxBcnNum += priv->rtllib->link_detect_info.RxBcnNum[i];
*TotalRxDataNum += priv->rtllib->link_detect_info.RxDataNum[i]; *TotalRxDataNum += priv->rtllib->link_detect_info.RxDataNum[i];
} }
...@@ -943,7 +942,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) ...@@ -943,7 +942,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
unsigned long flags; unsigned long flags;
struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl); (&priv->rtllib->pwr_save_ctrl);
bool bBusyTraffic = false; bool busy_traffic = false;
bool bHigherBusyTraffic = false; bool bHigherBusyTraffic = false;
bool bHigherBusyRxTraffic = false; bool bHigherBusyRxTraffic = false;
bool bEnterPS = false; bool bEnterPS = false;
...@@ -965,15 +964,14 @@ static void _rtl92e_watchdog_wq_cb(void *data) ...@@ -965,15 +964,14 @@ static void _rtl92e_watchdog_wq_cb(void *data)
MAC80211_NOLINK) && MAC80211_NOLINK) &&
(ieee->rf_power_state == rf_on) && !ieee->is_set_key && (ieee->rf_power_state == rf_on) && !ieee->is_set_key &&
(!ieee->proto_stoppping) && !ieee->wx_set_enc) { (!ieee->proto_stoppping) && !ieee->wx_set_enc) {
if (ieee->pwr_save_ctrl.ReturnPoint == IPS_CALLBACK_NONE) { if (ieee->pwr_save_ctrl.ReturnPoint == IPS_CALLBACK_NONE)
rtl92e_ips_enter(dev); rtl92e_ips_enter(dev);
} }
} }
}
if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode == IW_MODE_INFRA)) { if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode == IW_MODE_INFRA)) {
if (ieee->link_detect_info.num_rx_ok_in_period > 100 || if (ieee->link_detect_info.num_rx_ok_in_period > 100 ||
ieee->link_detect_info.num_tx_ok_in_period > 100) ieee->link_detect_info.num_tx_ok_in_period > 100)
bBusyTraffic = true; busy_traffic = true;
if (ieee->link_detect_info.num_rx_ok_in_period > 4000 || if (ieee->link_detect_info.num_rx_ok_in_period > 4000 ||
ieee->link_detect_info.num_tx_ok_in_period > 4000) { ieee->link_detect_info.num_tx_ok_in_period > 4000) {
...@@ -984,9 +982,9 @@ static void _rtl92e_watchdog_wq_cb(void *data) ...@@ -984,9 +982,9 @@ static void _rtl92e_watchdog_wq_cb(void *data)
bHigherBusyRxTraffic = false; bHigherBusyRxTraffic = false;
} }
if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + if (((ieee->link_detect_info.num_rx_unicast_ok_in_period +
ieee->link_detect_info.num_tx_ok_in_period) > 8) || ieee->link_detect_info.num_tx_ok_in_period) > 8) ||
(ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) (ieee->link_detect_info.num_rx_unicast_ok_in_period > 2))
bEnterPS = false; bEnterPS = false;
else else
bEnterPS = true; bEnterPS = true;
...@@ -1005,8 +1003,8 @@ static void _rtl92e_watchdog_wq_cb(void *data) ...@@ -1005,8 +1003,8 @@ static void _rtl92e_watchdog_wq_cb(void *data)
ieee->link_detect_info.num_rx_ok_in_period = 0; ieee->link_detect_info.num_rx_ok_in_period = 0;
ieee->link_detect_info.num_tx_ok_in_period = 0; ieee->link_detect_info.num_tx_ok_in_period = 0;
ieee->link_detect_info.NumRxUnicastOkInPeriod = 0; ieee->link_detect_info.num_rx_unicast_ok_in_period = 0;
ieee->link_detect_info.bBusyTraffic = bBusyTraffic; ieee->link_detect_info.busy_traffic = busy_traffic;
ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic; ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic;
ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic; ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic;
...@@ -1032,7 +1030,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) ...@@ -1032,7 +1030,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
ieee->link_state = RTLLIB_ASSOCIATING; ieee->link_state = RTLLIB_ASSOCIATING;
RemovePeerTS(priv->rtllib, remove_peer_ts(priv->rtllib,
priv->rtllib->current_network.bssid); priv->rtllib->current_network.bssid);
ieee->is_roaming = true; ieee->is_roaming = true;
ieee->is_set_key = false; ieee->is_set_key = false;
...@@ -1046,8 +1044,8 @@ static void _rtl92e_watchdog_wq_cb(void *data) ...@@ -1046,8 +1044,8 @@ static void _rtl92e_watchdog_wq_cb(void *data)
priv->check_roaming_cnt = 0; priv->check_roaming_cnt = 0;
} }
ieee->link_detect_info.NumRecvBcnInPeriod = 0; ieee->link_detect_info.num_recv_bcn_in_period = 0;
ieee->link_detect_info.NumRecvDataInPeriod = 0; ieee->link_detect_info.num_recv_data_in_period = 0;
} }
spin_lock_irqsave(&priv->tx_lock, flags); spin_lock_irqsave(&priv->tx_lock, flags);
...@@ -1257,7 +1255,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb) ...@@ -1257,7 +1255,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb)
int idx; int idx;
u32 fwinfo_size = 0; u32 fwinfo_size = 0;
priv->rtllib->bAwakePktSent = true; priv->rtllib->awake_pkt_sent = true;
fwinfo_size = sizeof(struct tx_fwinfo_8190pci); fwinfo_size = sizeof(struct tx_fwinfo_8190pci);
...@@ -1502,8 +1500,6 @@ static void _rtl92e_rx_normal(struct net_device *dev) ...@@ -1502,8 +1500,6 @@ static void _rtl92e_rx_normal(struct net_device *dev)
}; };
unsigned int count = priv->rxringcount; unsigned int count = priv->rxringcount;
stats.nic_type = NIC_8192E;
while (count--) { while (count--) {
struct rx_desc *pdesc = &priv->rx_ring struct rx_desc *pdesc = &priv->rx_ring
[priv->rx_idx]; [priv->rx_idx];
......
This diff is collapsed.
...@@ -208,12 +208,12 @@ void rtl92e_leisure_ps_enter(struct net_device *dev) ...@@ -208,12 +208,12 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
return; return;
if (psc->bLeisurePs) { if (psc->bLeisurePs) {
if (psc->LpsIdleCount >= RT_CHECK_FOR_HANG_PERIOD) { if (psc->lps_idle_count >= RT_CHECK_FOR_HANG_PERIOD) {
if (priv->rtllib->ps == RTLLIB_PS_DISABLED) if (priv->rtllib->ps == RTLLIB_PS_DISABLED)
_rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST); _rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST);
} else { } else {
psc->LpsIdleCount++; psc->lps_idle_count++;
} }
} }
} }
......
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