[PATCH] coding style: Fix 1 error and 5 warnings
This is a patch to the ddk750_power.c file that fixes up five "line over 80 characters" warnings and one "return is not a function, parentheses are not required" error found by the checkpatch.pl script. Signed-off-by: Antoine BLIN --- drivers/staging/sm750fb/ddk750_power.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index c8c51be..42961ea 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -8,7 +8,8 @@ void ddk750_setDPMS(DPMS_t state) if (getChipType() == SM750LE) { value = PEEK32(CRT_DISPLAY_CTRL); - POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state)); + POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, + DPMS, state)); } else { value = PEEK32(SYSTEM_CTRL); value = FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state); @@ -20,7 +21,7 @@ unsigned int getPowerMode(void) { if (getChipType() == SM750LE) return 0; - return (FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE)); + return FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE); } @@ -39,15 +40,18 @@ void setPowerMode(unsigned int powerMode) switch (powerMode) { case POWER_MODE_CTRL_MODE_MODE0: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE0); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + MODE0); break; case POWER_MODE_CTRL_MODE_MODE1: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE1); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + MODE1); break; case POWER_MODE_CTRL_MODE_SLEEP: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, SLEEP); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + SLEEP); break; default: @@ -138,8 +142,9 @@ void enableZVPort(unsigned int enable) gate = FIELD_SET(gate, CURRENT_GATE, I2C,ON); #endif } else { - /* Disable ZV Port Gate. There is no way to know whether the GPIO pins are being used -or not. Therefore, do not disable the GPIO gate. */ + /* Disable ZV Port Gate. There is no way to know whether the + GPIO pins are being used or not. Therefore, do not disable the + GPIO gate. */ gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, OFF); } -- 2.4.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: dgnc: cleanup dgnc_finalize_board_init()
Trivial cleanups: - Transform a printk() to a dev_err() call - Fix 2 lines over 80 characters Signed-off-by: Antoine Sirinelli --- drivers/staging/dgnc/dgnc_driver.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c index b1a39b2..900deb6 100644 --- a/drivers/staging/dgnc/dgnc_driver.c +++ b/drivers/staging/dgnc/dgnc_driver.c @@ -730,15 +730,18 @@ static int dgnc_finalize_board_init(struct dgnc_board *brd) { DPR_INIT(("dgnc_finalize_board_init() - start #2\n")); if (brd->irq) { - rc = request_irq(brd->irq, brd->bd_ops->intr, IRQF_SHARED, "DGNC", brd); + rc = request_irq(brd->irq, brd->bd_ops->intr, +IRQF_SHARED, "DGNC", brd); if (rc) { - printk("Failed to hook IRQ %d\n",brd->irq); + dev_err(&brd->pdev->dev, + "Failed to hook IRQ %d\n", brd->irq); brd->state = BOARD_FAILED; brd->dpastatus = BD_NOFEP; rc = -ENODEV; } else { - DPR_INIT(("Requested and received usage of IRQ %d\n", brd->irq)); + DPR_INIT(("Requested and received usage of IRQ %d\n", + brd->irq)); } } return rc; -- 1.9.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH V2 00/27] Drivers: ccree - align block comments
Hello Derek, On Tue, May 30, 2017 at 06:09:37PM +1200, Derek Robson wrote: > Fixed block comments across whole ccree driver Since all these commits are doing the same logical change across a single driver, you could probably squash them all into a single one. Thanks! Antoine -- Antoine Ténart, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com signature.asc Description: PGP signature ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: wlan-ng: Fix sparse warnings by using appropriate endian types
From: Antoine Fix the following sparse endianness warnings: drivers/staging/wlan-ng/prism2sta.c:1949:17: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1949:17: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:1949:17: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:375:46: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:377:33: warning: cast to restricted __le16 drivers/staging/wlan-ng/prism2sta.c:378:47: warning: cast to restricted __le16 Signed-off-by: antoine --- drivers/staging/wlan-ng/hfa384x.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wlan-ng/hfa384x.h b/drivers/staging/wlan-ng/hfa384x.h index 310e2c454590..ef0b9628305d 100644 --- a/drivers/staging/wlan-ng/hfa384x.h +++ b/drivers/staging/wlan-ng/hfa384x.h @@ -445,9 +445,9 @@ struct hfa384x_downloadbuffer { /*-- Information Record: commsquality --*/ struct hfa384x_commsquality { - u16 cq_curr_bss; - u16 asl_curr_bss; - u16 anl_curr_fc; + __le16 cq_curr_bss; + __le16 asl_curr_bss; + __le16 anl_curr_fc; } __packed; /*-- Information Record: dmbcommsquality --*/ -- 2.13.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Re: [PATCH] Staging: wlan-ng: Fix sparse warnings by using appropriate endian types
Hi, My real name is Antoine BLIN. I'm sorry for the mistake ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: sm750fb: ddk750_power.c: Remove optionnal parentheses.
Fix up "return is not a function, parentheses are not required" error found by the checkpatch.pl script. Signed-off-by: Antoine BLIN --- drivers/staging/sm750fb/ddk750_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index c8c51be..3c04447 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -20,7 +20,7 @@ unsigned int getPowerMode(void) { if (getChipType() == SM750LE) return 0; - return (FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE)); + return FIELD_GET(PEEK32(POWER_MODE_CTRL), POWER_MODE_CTRL, MODE); } -- 2.4.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: sm750fb: ddk750_power.c: Split lines over 80 characters.
Fix up "line over 80 characters" warning found by the checkpatch.pl script. Signed-off-by: Antoine BLIN --- drivers/staging/sm750fb/ddk750_power.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/drivers/staging/sm750fb/ddk750_power.c b/drivers/staging/sm750fb/ddk750_power.c index 3c04447..e580dab 100644 --- a/drivers/staging/sm750fb/ddk750_power.c +++ b/drivers/staging/sm750fb/ddk750_power.c @@ -8,7 +8,8 @@ void ddk750_setDPMS(DPMS_t state) if (getChipType() == SM750LE) { value = PEEK32(CRT_DISPLAY_CTRL); - POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, DPMS, state)); + POKE32(CRT_DISPLAY_CTRL, FIELD_VALUE(value, CRT_DISPLAY_CTRL, +DPMS, state)); } else { value = PEEK32(SYSTEM_CTRL); value = FIELD_VALUE(value, SYSTEM_CTRL, DPMS, state); @@ -39,15 +40,18 @@ void setPowerMode(unsigned int powerMode) switch (powerMode) { case POWER_MODE_CTRL_MODE_MODE0: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE0); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + MODE0); break; case POWER_MODE_CTRL_MODE_MODE1: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, MODE1); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + MODE1); break; case POWER_MODE_CTRL_MODE_SLEEP: - control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, SLEEP); + control_value = FIELD_SET(control_value, POWER_MODE_CTRL, MODE, + SLEEP); break; default: @@ -138,8 +142,9 @@ void enableZVPort(unsigned int enable) gate = FIELD_SET(gate, CURRENT_GATE, I2C,ON); #endif } else { - /* Disable ZV Port Gate. There is no way to know whether the GPIO pins are being used -or not. Therefore, do not disable the GPIO gate. */ + /* Disable ZV Port Gate. There is no way to know whether the + GPIO pins are being used or not. Therefore, do not disable the + GPIO gate. */ gate = FIELD_SET(gate, CURRENT_GATE, ZVPORT, OFF); } -- 2.4.5 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] Fix some lines over 80 characters in imx-drm staging driver
>From 73eb48f2b376c56f0a354ea0e6c2c71972aaffae Mon Sep 17 00:00:00 2001 From: Antoine Schweitzer-Chaput Date: Wed, 16 Apr 2014 09:59:26 +0200 Subject: [PATCH 1/1] Fix some lines over 80 characters in imx-drm staging driver Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/imx-drm/ipu-v3/ipu-common.c | 6 -- drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c index ca85d3d..0ea00de 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c @@ -900,7 +900,8 @@ static void ipu_irq_handle(struct ipu_soc *ipu, const int *regs, int num_regs) status &= ipu_cm_read(ipu, IPU_INT_CTRL(regs[i])); for_each_set_bit(bit, &status, 32) { - irq = irq_linear_revmap(ipu->domain, regs[i] * 32 + bit); + irq = irq_linear_revmap(ipu->domain, + regs[i] * 32 + bit); if (irq) generic_handle_irq(irq); } @@ -1053,7 +1054,8 @@ static int ipu_irq_init(struct ipu_soc *ipu) } ret = irq_alloc_domain_generic_chips(ipu->domain, 32, 1, "IPU", -handle_level_irq, 0, IRQF_VALID, 0); +handle_level_irq, 0, +IRQF_VALID, 0); if (ret < 0) { dev_err(ipu->dev, "failed to alloc generic irq chips\n"); irq_domain_remove(ipu->domain); diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d5de8bb..5f587d8 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -367,7 +367,8 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, writel(DC_WR_CH_CONF_WORD_SIZE_24 | DC_WR_CH_CONF_DISP_ID_PARALLEL(0), priv->channels[5].base + DC_WR_CH_CONF); - writel(DC_GEN_SYNC_1_6_SYNC | DC_GEN_SYNC_PRIORITY_1, priv->dc_reg + DC_GEN); + writel(DC_GEN_SYNC_1_6_SYNC | DC_GEN_SYNC_PRIORITY_1, + priv->dc_reg + DC_GEN); ipu->dc_priv = priv; -- 1.9.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] Staging: imx-drm: Fix some lines over 80 characters
Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/imx-drm/ipu-v3/ipu-common.c | 6 -- drivers/staging/imx-drm/ipu-v3/ipu-dc.c | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-common.c b/drivers/staging/imx-drm/ipu-v3/ipu-common.c index ca85d3d..0ea00de 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-common.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-common.c @@ -900,7 +900,8 @@ static void ipu_irq_handle(struct ipu_soc *ipu, const int *regs, int num_regs) status &= ipu_cm_read(ipu, IPU_INT_CTRL(regs[i])); for_each_set_bit(bit, &status, 32) { - irq = irq_linear_revmap(ipu->domain, regs[i] * 32 + bit); + irq = irq_linear_revmap(ipu->domain, + regs[i] * 32 + bit); if (irq) generic_handle_irq(irq); } @@ -1053,7 +1054,8 @@ static int ipu_irq_init(struct ipu_soc *ipu) } ret = irq_alloc_domain_generic_chips(ipu->domain, 32, 1, "IPU", -handle_level_irq, 0, IRQF_VALID, 0); +handle_level_irq, 0, +IRQF_VALID, 0); if (ret < 0) { dev_err(ipu->dev, "failed to alloc generic irq chips\n"); irq_domain_remove(ipu->domain); diff --git a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c index d5de8bb..5f587d8 100644 --- a/drivers/staging/imx-drm/ipu-v3/ipu-dc.c +++ b/drivers/staging/imx-drm/ipu-v3/ipu-dc.c @@ -367,7 +367,8 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev, writel(DC_WR_CH_CONF_WORD_SIZE_24 | DC_WR_CH_CONF_DISP_ID_PARALLEL(0), priv->channels[5].base + DC_WR_CH_CONF); - writel(DC_GEN_SYNC_1_6_SYNC | DC_GEN_SYNC_PRIORITY_1, priv->dc_reg + DC_GEN); + writel(DC_GEN_SYNC_1_6_SYNC | DC_GEN_SYNC_PRIORITY_1, + priv->dc_reg + DC_GEN); ipu->dc_priv = priv; -- 1.9.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: rtl8192u: mark some functions as static.
Some functions defined in r8192U_core.c and only used locally are marked as static. This fixes some warnings issued by sparse. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/r8192U_core.c |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..4536a87 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev) /* this is only for debug */ -void dump_eprom(struct net_device *dev) +static void dump_eprom(struct net_device *dev) { int i; for (i = 0; i < 63; i++) @@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate) return N_DBPS; } -unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue) +static unsigned int txqueue2outpipe(struct r8192_priv *priv, + unsigned int tx_queue) { if (tx_queue >= 9) { RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__); @@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb, } -u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, bool bIsRxAggrSubframe) +static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, + bool bIsRxAggrSubframe) { #ifdef USB_RX_AGGREGATION_SUPPORT if (bIsRxAggrSubframe) -- 1.7.10.4 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] staging: rlt8192u: mark some functions as static
Some functions defined in r8192U_core.c and only used locally are marked as static. This fixes some warnings issues by sparse. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/r8192U_core.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..4536a87 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -667,7 +667,7 @@ static void tx_timeout(struct net_device *dev) /* this is only for debug */ -void dump_eprom(struct net_device *dev) +static void dump_eprom(struct net_device *dev) { int i; for (i = 0; i < 63; i++) @@ -1553,7 +1553,8 @@ u16 N_DBPSOfRate(u16 DataRate) return N_DBPS; } -unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue) +static unsigned int txqueue2outpipe(struct r8192_priv *priv, + unsigned int tx_queue) { if (tx_queue >= 9) { RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__); @@ -4873,7 +4874,8 @@ static void query_rxdesc_status(struct sk_buff *skb, } -u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, bool bIsRxAggrSubframe) +static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, + bool bIsRxAggrSubframe) { #ifdef USB_RX_AGGREGATION_SUPPORT if (bIsRxAggrSubframe) -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] staging: rlt8192u: conditional compilation in r8192U_core.c
function dump_eprom is only used when DEBUG_EPROM is set. function txqueue2outpipe is only used when USE_ONE_PIPE is unset. function GetRxPacketShiftBytes819xUsb is only used when USB_RX_AGGREGATION_SUPPORT is set. Compile these functions only when they will actually be used. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/r8192U_core.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 4536a87..b6718c0 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -667,12 +667,14 @@ static void tx_timeout(struct net_device *dev) /* this is only for debug */ +#ifdef DEBUG_EPROM static void dump_eprom(struct net_device *dev) { int i; for (i = 0; i < 63; i++) RT_TRACE(COMP_EPROM, "EEPROM addr %x : %x", i, eprom_read(dev, i)); } +#endif void rtl8192_update_msr(struct net_device *dev) { @@ -1553,6 +1555,7 @@ u16 N_DBPSOfRate(u16 DataRate) return N_DBPS; } +#ifndef USE_ONE_PIPE static unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue) { @@ -1562,6 +1565,7 @@ static unsigned int txqueue2outpipe(struct r8192_priv *priv, } return priv->txqueue_to_outpipemap[tx_queue]; } +#endif short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb) { @@ -4874,18 +4878,18 @@ static void query_rxdesc_status(struct sk_buff *skb, } +#ifdef USB_RX_AGGREGATION_SUPPORT static u32 GetRxPacketShiftBytes819xUsb(struct ieee80211_rx_stats *Status, bool bIsRxAggrSubframe) { -#ifdef USB_RX_AGGREGATION_SUPPORT if (bIsRxAggrSubframe) return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize + Status->RxBufShift + 8); else -#endif return (sizeof(rx_desc_819x_usb) + Status->RxDrvInfoSize + Status->RxBufShift); } +#endif static void rtl8192_rx_nomal(struct sk_buff *skb) { -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 1/1] staging: rtl8192u: mark some functions as static.
On Wed, Jul 30, 2014 at 05:06:41PM -0700, Greg Kroah-Hartman wrote: > On Mon, Jul 28, 2014 at 05:52:46PM +0200, Antoine Schweitzer-Chaput wrote: > > Some functions defined in r8192U_core.c and only used locally are marked as > > static. > > This fixes some warnings issued by sparse. > > > > Signed-off-by: Antoine Schweitzer-Chaput > > And it creates new warnings with gcc, which isn't acceptable :( It does, but this warning's root cause was already present: these functions are only called under specific compilation options but always compiled. This patch basically unhides this issue. Since these are two different things I was reluctant to tackle both in the same patch. > Please fix these properly, I can't take patches that add warnings to the > build. I'll resend now, with an additional patch making sure these functions are compiled only when they are used. Antoine ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] staging: rlt8192u: conditional compilation in r8192U_core.c
On Fri, Aug 01, 2014 at 12:59:43AM -0700, Greg KH wrote: > > /* this is only for debug */ > > +#ifdef DEBUG_EPROM > > how can this ever be set? If no one sets it, just remove the code > entirely please. I guess it's supposed to be set manually in the code (there's a large list around l.60). > > +#ifndef USE_ONE_PIPE > > Same here, if the option can never be selected, just delete the code. > > > +#ifdef USB_RX_AGGREGATION_SUPPORT > > Same here. These two are set in the Makefile, but not configurable from the outside. I'll remove all of these, and possibly other options in the same case. Antoine ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/1] staging: rtl8192u: remove unselectable options DEBUG_*, USE_ONE_PIPE, USB_RX_AGGREGATION_SUPPORT, USB_TX_DRIVER_AGGREGATION_ENABLE
The code which was only reachable using these options is also removed. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/Makefile | 3 - drivers/staging/rtl8192u/r8192U_core.c | 482 ++--- 2 files changed, 16 insertions(+), 469 deletions(-) diff --git a/drivers/staging/rtl8192u/Makefile b/drivers/staging/rtl8192u/Makefile index eefc657..703c150 100644 --- a/drivers/staging/rtl8192u/Makefile +++ b/drivers/staging/rtl8192u/Makefile @@ -6,9 +6,6 @@ ccflags-y += -O2 ccflags-y += -DCONFIG_FORCE_HARD_FLOAT=y ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX ccflags-y += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO -#ccflags-y += -DUSB_TX_DRIVER_AGGREGATION_ENABLE -#ccflags-y += -DUSB_RX_AGGREGATION_SUPPORT -ccflags-y += -DUSE_ONE_PIPE ccflags-y += -Idrivers/staging/rtl8192u/ieee80211 r8192u_usb-y := r8192U_core.o r8180_93cx6.o r8192U_wx.o\ diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..edd43e1 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -56,29 +56,6 @@ double __extendsfdf2(float a) } #endif -#undef LOOP_TEST -#undef DUMP_RX -#undef DUMP_TX -#undef DEBUG_TX_DESC2 -#undef RX_DONT_PASS_UL -#undef DEBUG_EPROM -#undef DEBUG_RX_VERBOSE -#undef DUMMY_RX -#undef DEBUG_ZERO_RX -#undef DEBUG_RX_SKB -#undef DEBUG_TX_FRAG -#undef DEBUG_RX_FRAG -#undef DEBUG_TX_FILLDESC -#undef DEBUG_TX -#undef DEBUG_IRQ -#undef DEBUG_RX -#undef DEBUG_RXALLOC -#undef DEBUG_REGISTERS -#undef DEBUG_RING -#undef DEBUG_IRQ_TASKLET -#undef DEBUG_TX_ALLOC -#undef DEBUG_TX_DESC - #define CONFIG_RTL8192_IO_MAP #include @@ -665,15 +642,6 @@ static void tx_timeout(struct net_device *dev) schedule_work(&priv->reset_wq); } - -/* this is only for debug */ -void dump_eprom(struct net_device *dev) -{ - int i; - for (i = 0; i < 63; i++) - RT_TRACE(COMP_EPROM, "EEPROM addr %x : %x", i, eprom_read(dev, i)); -} - void rtl8192_update_msr(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); @@ -711,13 +679,11 @@ void rtl8192_set_chan(struct net_device *dev, short ch) /* this hack should avoid frame TX during channel setting*/ -#ifndef LOOP_TEST //need to implement rf set channel here WB if (priv->rf_set_chan) priv->rf_set_chan(dev, priv->chan); mdelay(10); -#endif } static void rtl8192_rx_isr(struct urb *urb); @@ -725,14 +691,8 @@ static void rtl8192_rx_isr(struct urb *urb); static u32 get_rxpacket_shiftbytes_819xusb(struct ieee80211_rx_stats *pstats) { -#ifdef USB_RX_AGGREGATION_SUPPORT - if (pstats->bisrxaggrsubframe) - return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize - + pstats->RxBufShift + 8); - else -#endif - return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize - + pstats->RxBufShift); + return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize + + pstats->RxBufShift); } static int rtl8192_rx_initiate(struct net_device *dev) @@ -1043,197 +1003,8 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) return ret; } - void rtl8192_try_wake_queue(struct net_device *dev, int pri); -#ifdef USB_TX_DRIVER_AGGREGATION_ENABLE -u16 DrvAggr_PaddingAdd(struct net_device *dev, struct sk_buff *skb) -{ - u16 PaddingNum = 256 - ((skb->len + TX_PACKET_DRVAGGR_SUBFRAME_SHIFT_BYTES) % 256); - return PaddingNum & 0xff; -} - -u8 MRateToHwRate8190Pci(u8 rate); -u8 QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc); -u8 MapHwQueueToFirmwareQueue(u8 QueueID); -struct sk_buff *DrvAggr_Aggregation(struct net_device *dev, struct ieee80211_drv_agg_txb *pSendList) -{ - struct ieee80211_device *ieee = netdev_priv(dev); - struct r8192_priv *priv = ieee80211_priv(dev); - cb_desc *tcb_desc = NULL; - u8 i; - u32 TotalLength; - struct sk_buff *skb; - struct sk_buff *agg_skb; - tx_desc_819x_usb_aggr_subframe *tx_agg_desc = NULL; - tx_fwinfo_819x_usb *tx_fwinfo = NULL; - - // - // Local variable initialization. - // - /* first skb initialization */ - skb = pSendList->tx_agg_frames[0]; - TotalLength = skb->len; - - /* Get the total aggregation length including the padding space and -* sub frame header. -*/ - for (i = 1; i < pSendList->nr_drv_agg_frames; i++) { - TotalLength += DrvAggr_PaddingAdd(dev, skb); - skb = pSendList->tx_agg_frames[i]; - TotalLength += (skb->len + TX_PACKET_DRVAGGR_SUBFRAME_SHIFT_BYTES); - } - - /* allocate skb to contain the aggregated packets */ -
Re: [PATCH 1/1] staging: rtl8192u: remove unselectable options DEBUG_*, USE_ONE_PIPE, USB_RX_AGGREGATION_SUPPORT, USB_TX_DRIVER_AGGREGATION_ENABLE
On Fri, Aug 01, 2014 at 08:54:07AM -0700, Greg KH wrote: > On Tue, Jun 24, 2014 at 03:52:05PM +0200, Antoine Schweitzer-Chaput wrote: > > The code which was only reachable using these options is also removed. > > > > Signed-off-by: Antoine Schweitzer-Chaput > > --- > > drivers/staging/rtl8192u/Makefile | 3 - > > drivers/staging/rtl8192u/r8192U_core.c | 482 > > ++--- > > 2 files changed, 16 insertions(+), 469 deletions(-) > > > > diff --git a/drivers/staging/rtl8192u/Makefile > > b/drivers/staging/rtl8192u/Makefile > > index eefc657..703c150 100644 > > --- a/drivers/staging/rtl8192u/Makefile > > +++ b/drivers/staging/rtl8192u/Makefile > > @@ -6,9 +6,6 @@ ccflags-y += -O2 > > ccflags-y += -DCONFIG_FORCE_HARD_FLOAT=y > > ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX > > ccflags-y += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO > > -#ccflags-y += -DUSB_TX_DRIVER_AGGREGATION_ENABLE > > -#ccflags-y += -DUSB_RX_AGGREGATION_SUPPORT > > -ccflags-y += -DUSE_ONE_PIPE > > Why delete this last one if it is being set? Since it is always set, and not modifiable anywhere, it allows removing the code in r8192U_core.c under #ifndef USE_ONE_PIPE > Did you test this change on hardware? No, I didn't have the chance. I however compared the generated code after preprocessing (using gcc -E -P) with and without this change, and the only differences are the 3 removed functions (dump_eprom, txqueue2outpipe, and GetRxPacketShiftBytes819xUsb). Antoine ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/6] staging: rtl8192u: remove define always set USE_ONE_PIPE
Also remove the code previously under #ifndef USE_ONE_PIPE. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/Makefile | 1 - drivers/staging/rtl8192u/r8192U_core.c | 19 --- 2 files changed, 20 deletions(-) diff --git a/drivers/staging/rtl8192u/Makefile b/drivers/staging/rtl8192u/Makefile index eefc657..a3a7e3f 100644 --- a/drivers/staging/rtl8192u/Makefile +++ b/drivers/staging/rtl8192u/Makefile @@ -8,7 +8,6 @@ ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX ccflags-y += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO #ccflags-y += -DUSB_TX_DRIVER_AGGREGATION_ENABLE #ccflags-y += -DUSB_RX_AGGREGATION_SUPPORT -ccflags-y += -DUSE_ONE_PIPE ccflags-y += -Idrivers/staging/rtl8192u/ieee80211 r8192u_usb-y := r8192U_core.o r8180_93cx6.o r8192U_wx.o\ diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index ccf00f7..17642b7 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1543,15 +1543,6 @@ u16 N_DBPSOfRate(u16 DataRate) return N_DBPS; } -unsigned int txqueue2outpipe(struct r8192_priv *priv, unsigned int tx_queue) -{ - if (tx_queue >= 9) { - RT_TRACE(COMP_ERR, "%s():Unknown queue ID!!!\n", __func__); - return 0x04; - } - return priv->txqueue_to_outpipemap[tx_queue]; -} - short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb) { struct r8192_priv *priv = ieee80211_priv(dev); @@ -1581,12 +1572,7 @@ short rtl819xU_tx_cmd(struct net_device *dev, struct sk_buff *skb) // // Fill up USB_OUT_CONTEXT. // - // Get index to out pipe from specified QueueID. -#ifndef USE_ONE_PIPE - idx_pipe = txqueue2outpipe(priv, queue_index); -#else idx_pipe = 0x04; -#endif usb_fill_bulk_urb(tx_urb, priv->udev, usb_sndbulkpipe(priv->udev, idx_pipe), skb->data, skb->len, rtl8192_tx_isr, skb); @@ -1915,12 +1901,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb) //DWORD 2 tx_desc->TxBufferSize = (u32)(skb->len - USB_HWDESC_HEADER_LEN); } - /* Get index to out pipe from specified QueueID */ -#ifndef USE_ONE_PIPE - idx_pipe = txqueue2outpipe(priv, tcb_desc->queue_index); -#else idx_pipe = 0x5; -#endif /* To submit bulk urb */ usb_fill_bulk_urb(tx_urb, udev, -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 6/6] staging: rtl8192u: remove misc. unused defines
Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/r8192U_core.c | 21 - 1 file changed, 21 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 0f59605..4f3fa35 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -56,27 +56,6 @@ double __extendsfdf2(float a) } #endif -#undef DUMP_RX -#undef DUMP_TX -#undef DEBUG_TX_DESC2 -#undef RX_DONT_PASS_UL -#undef DEBUG_RX_VERBOSE -#undef DUMMY_RX -#undef DEBUG_ZERO_RX -#undef DEBUG_RX_SKB -#undef DEBUG_TX_FRAG -#undef DEBUG_RX_FRAG -#undef DEBUG_TX_FILLDESC -#undef DEBUG_TX -#undef DEBUG_IRQ -#undef DEBUG_RX -#undef DEBUG_RXALLOC -#undef DEBUG_REGISTERS -#undef DEBUG_RING -#undef DEBUG_IRQ_TASKLET -#undef DEBUG_TX_ALLOC -#undef DEBUG_TX_DESC - #define CONFIG_RTL8192_IO_MAP #include -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/6] staging: rtl8192u: remove unused define USB_RX_AGGREGATION_SUPPORT
Also remove related unreachable code. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/Makefile | 1 - drivers/staging/rtl8192u/r8192U_core.c | 174 +++-- 2 files changed, 11 insertions(+), 164 deletions(-) diff --git a/drivers/staging/rtl8192u/Makefile b/drivers/staging/rtl8192u/Makefile index 416a05a..703c150 100644 --- a/drivers/staging/rtl8192u/Makefile +++ b/drivers/staging/rtl8192u/Makefile @@ -6,7 +6,6 @@ ccflags-y += -O2 ccflags-y += -DCONFIG_FORCE_HARD_FLOAT=y ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX ccflags-y += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO -#ccflags-y += -DUSB_RX_AGGREGATION_SUPPORT ccflags-y += -Idrivers/staging/rtl8192u/ieee80211 r8192u_usb-y := r8192U_core.o r8180_93cx6.o r8192U_wx.o\ diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index fd7a2f3..bd15651 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -715,14 +715,8 @@ static void rtl8192_rx_isr(struct urb *urb); static u32 get_rxpacket_shiftbytes_819xusb(struct ieee80211_rx_stats *pstats) { -#ifdef USB_RX_AGGREGATION_SUPPORT - if (pstats->bisrxaggrsubframe) - return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize - + pstats->RxBufShift + 8); - else -#endif - return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize - + pstats->RxBufShift); + return (sizeof(rx_desc_819x_usb) + pstats->RxDrvInfoSize + + pstats->RxBufShift); } static int rtl8192_rx_initiate(struct net_device *dev) @@ -2796,22 +2790,6 @@ static bool rtl8192_adapter_start(struct net_device *dev) for (i = 0; i < QOS_QUEUE_NUM; i++) write_nic_dword(dev, WDCAPARA_ADD[i], DEFAULT_EDCA); } -#ifdef USB_RX_AGGREGATION_SUPPORT - //3 For usb rx firmware aggregation control - if (priv->ResetProgress == RESET_TYPE_NORESET) { - u32 ulValue; - PRT_HIGH_THROUGHPUT pHTInfo = priv->ieee80211->pHTInfo; - ulValue = (pHTInfo->UsbRxFwAggrEn<<24) | (pHTInfo->UsbRxFwAggrPageNum<<16) | - (pHTInfo->UsbRxFwAggrPacketNum<<8) | (pHTInfo->UsbRxFwAggrTimeout); - /* -* If usb rx firmware aggregation is enabled, -* when anyone of three threshold conditions above is reached, -* firmware will send aggregated packet to driver. -*/ - write_nic_dword(dev, 0x1a8, ulValue); - priv->bCurrentRxAggrEnable = true; - } -#endif rtl8192_phy_configmac(dev); @@ -4497,30 +4475,16 @@ static void query_rxdesc_status(struct sk_buff *skb, // //Get Rx Descriptor Information // -#ifdef USB_RX_AGGREGATION_SUPPORT - if (bIsRxAggrSubframe) { - rx_desc_819x_usb_aggr_subframe *desc = (rx_desc_819x_usb_aggr_subframe *)skb->data; - stats->Length = desc->Length; - stats->RxDrvInfoSize = desc->RxDrvInfoSize; - stats->RxBufShift = 0; //RxBufShift = 2 in RxDesc, but usb didn't shift bytes in fact. - stats->bICV = desc->ICV; - stats->bCRC = desc->CRC32; - stats->bHwError = stats->bCRC|stats->bICV; - stats->Decrypted = !desc->SWDec;//RTL8190 set this bit to indicate that Hw does not decrypt packet - } else -#endif - { - rx_desc_819x_usb *desc = (rx_desc_819x_usb *)skb->data; + rx_desc_819x_usb *desc = (rx_desc_819x_usb *)skb->data; - stats->Length = desc->Length; - stats->RxDrvInfoSize = desc->RxDrvInfoSize; - stats->RxBufShift = 0; - stats->bICV = desc->ICV; - stats->bCRC = desc->CRC32; - stats->bHwError = stats->bCRC|stats->bICV; - //RTL8190 set this bit to indicate that Hw does not decrypt packet - stats->Decrypted = !desc->SWDec; - } + stats->Length = desc->Length; + stats->RxDrvInfoSize = desc->RxDrvInfoSize; + stats->RxBufShift = 0; + stats->bICV = desc->ICV; + stats->bCRC = desc->CRC32; + stats->bHwError = stats->bCRC|stats->bICV; + /* RTL8190 set this bit to indicate that Hw does not decrypt packet */ + stats->Decrypted = !desc->SWDec; if ((priv->ieee80211->pHTInfo->bCurrentHTSupport == true) && (priv->ieee80211->pairwise_key_type == KEY_TYPE_CCMP)) stats->bHwError = false; @@ -4585,11 +4549,6 @@ static void query_rxdesc_status(struct sk_buff *skb,
[PATCH 3/6] staging: rtl8192u: remove unused define USB_TX_DRIVER_AGGREGATION_ENABLE
Also remove the unreachable code. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/Makefile | 1 - drivers/staging/rtl8192u/r8192U_core.c | 250 + 2 files changed, 4 insertions(+), 247 deletions(-) diff --git a/drivers/staging/rtl8192u/Makefile b/drivers/staging/rtl8192u/Makefile index a3a7e3f..416a05a 100644 --- a/drivers/staging/rtl8192u/Makefile +++ b/drivers/staging/rtl8192u/Makefile @@ -6,7 +6,6 @@ ccflags-y += -O2 ccflags-y += -DCONFIG_FORCE_HARD_FLOAT=y ccflags-y += -DJACKSON_NEW_8187 -DJACKSON_NEW_RX ccflags-y += -DTHOMAS_BEACON -DTHOMAS_TASKLET -DTHOMAS_SKB -DTHOMAS_TURBO -#ccflags-y += -DUSB_TX_DRIVER_AGGREGATION_ENABLE #ccflags-y += -DUSB_RX_AGGREGATION_SUPPORT ccflags-y += -Idrivers/staging/rtl8192u/ieee80211 diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 17642b7..fd7a2f3 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -1036,194 +1036,6 @@ static int rtl8192_hard_start_xmit(struct sk_buff *skb, struct net_device *dev) void rtl8192_try_wake_queue(struct net_device *dev, int pri); -#ifdef USB_TX_DRIVER_AGGREGATION_ENABLE -u16 DrvAggr_PaddingAdd(struct net_device *dev, struct sk_buff *skb) -{ - u16 PaddingNum = 256 - ((skb->len + TX_PACKET_DRVAGGR_SUBFRAME_SHIFT_BYTES) % 256); - return PaddingNum & 0xff; -} - -u8 MRateToHwRate8190Pci(u8 rate); -u8 QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc); -u8 MapHwQueueToFirmwareQueue(u8 QueueID); -struct sk_buff *DrvAggr_Aggregation(struct net_device *dev, struct ieee80211_drv_agg_txb *pSendList) -{ - struct ieee80211_device *ieee = netdev_priv(dev); - struct r8192_priv *priv = ieee80211_priv(dev); - cb_desc *tcb_desc = NULL; - u8 i; - u32 TotalLength; - struct sk_buff *skb; - struct sk_buff *agg_skb; - tx_desc_819x_usb_aggr_subframe *tx_agg_desc = NULL; - tx_fwinfo_819x_usb *tx_fwinfo = NULL; - - // - // Local variable initialization. - // - /* first skb initialization */ - skb = pSendList->tx_agg_frames[0]; - TotalLength = skb->len; - - /* Get the total aggregation length including the padding space and -* sub frame header. -*/ - for (i = 1; i < pSendList->nr_drv_agg_frames; i++) { - TotalLength += DrvAggr_PaddingAdd(dev, skb); - skb = pSendList->tx_agg_frames[i]; - TotalLength += (skb->len + TX_PACKET_DRVAGGR_SUBFRAME_SHIFT_BYTES); - } - - /* allocate skb to contain the aggregated packets */ - agg_skb = dev_alloc_skb(TotalLength + ieee->tx_headroom); - memset(agg_skb->data, 0, agg_skb->len); - skb_reserve(agg_skb, ieee->tx_headroom); - - /* reserve info for first subframe Tx descriptor to be set in the tx function */ - skb = pSendList->tx_agg_frames[0]; - tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); - tcb_desc->drv_agg_enable = 1; - tcb_desc->pkt_size = skb->len; - tcb_desc->DrvAggrNum = pSendList->nr_drv_agg_frames; - netdev_dbg(dev, "DrvAggNum = %d\n", tcb_desc->DrvAggrNum); - memcpy(agg_skb->cb, skb->cb, sizeof(skb->cb)); - memcpy(skb_put(agg_skb, skb->len), skb->data, skb->len); - - for (i = 1; i < pSendList->nr_drv_agg_frames; i++) { - /* push the next sub frame to be 256 byte aline */ - skb_put(agg_skb, DrvAggr_PaddingAdd(dev, skb)); - - /* Subframe drv Tx descriptor and firmware info setting */ - skb = pSendList->tx_agg_frames[i]; - tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); - tx_agg_desc = (tx_desc_819x_usb_aggr_subframe *)skb_tail_pointer(agg_skb); - tx_fwinfo = (tx_fwinfo_819x_usb *)(skb_tail_pointer(agg_skb) + sizeof(tx_desc_819x_usb_aggr_subframe)); - - memset(tx_fwinfo, 0, sizeof(tx_fwinfo_819x_usb)); - /* DWORD 0 */ - tx_fwinfo->TxHT = (tcb_desc->data_rate&0x80) ? 1 : 0; - tx_fwinfo->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate); - tx_fwinfo->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur; - tx_fwinfo->Short = QueryIsShort(tx_fwinfo->TxHT, tx_fwinfo->TxRate, tcb_desc); - if (tcb_desc->bAMPDUEnable) { /* AMPDU enabled */ - tx_fwinfo->AllowAggregation = 1; - /* DWORD 1 */ - tx_fwinfo->RxMF = tcb_desc->ampdu_factor; - tx_fwinfo->RxAMD = tcb_desc->ampdu_density&0x07;//ampdudensity - } else { - tx_fwinfo->AllowAggregation = 0; - /*
[PATCH 5/6] staging: rtl8192u: remove unused define LOOP_TEST
Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/r8192U_core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index bd15651..0f59605 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -56,7 +56,6 @@ double __extendsfdf2(float a) } #endif -#undef LOOP_TEST #undef DUMP_RX #undef DUMP_TX #undef DEBUG_TX_DESC2 @@ -701,13 +700,11 @@ void rtl8192_set_chan(struct net_device *dev, short ch) /* this hack should avoid frame TX during channel setting*/ -#ifndef LOOP_TEST //need to implement rf set channel here WB if (priv->rf_set_chan) priv->rf_set_chan(dev, priv->chan); mdelay(10); -#endif } static void rtl8192_rx_isr(struct urb *urb); -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/6] staging: rtl8192u: remove unused define DEBUG_EPROM
Also remove the code now unreachable. Signed-off-by: Antoine Schweitzer-Chaput --- drivers/staging/rtl8192u/r8192U_core.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 7640386..ccf00f7 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -61,7 +61,6 @@ double __extendsfdf2(float a) #undef DUMP_TX #undef DEBUG_TX_DESC2 #undef RX_DONT_PASS_UL -#undef DEBUG_EPROM #undef DEBUG_RX_VERBOSE #undef DUMMY_RX #undef DEBUG_ZERO_RX @@ -665,15 +664,6 @@ static void tx_timeout(struct net_device *dev) schedule_work(&priv->reset_wq); } - -/* this is only for debug */ -void dump_eprom(struct net_device *dev) -{ - int i; - for (i = 0; i < 63; i++) - RT_TRACE(COMP_EPROM, "EEPROM addr %x : %x", i, eprom_read(dev, i)); -} - void rtl8192_update_msr(struct net_device *dev) { struct r8192_priv *priv = ieee80211_priv(dev); @@ -2869,9 +2859,6 @@ static short rtl8192_init(struct net_device *dev) return -ENOMEM; } -#ifdef DEBUG_EPROM - dump_eprom(dev); -#endif return 0; } -- 1.9.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] Staging: rtl8192u: fix sparse warnings in r8192U_core.c
On Thu, Aug 07, 2014 at 10:10:47AM +0530, A Raghavendra Rao wrote: > Signed-off-by: A Raghavendra Rao This looks very similar to what I submitted on July 31st. At this time Greg had additional comments which led to a quite different patchset (though its review is not completed yet), you may find interesting to review this whole thread. Antoine ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel