[PATCH] rtlwifi: fix potential NULL pointer dereference

2019-03-12 Thread pkshih
From: Ping-Ke Shih In case dev_alloc_skb fails, the fix safely returns to avoid potential NULL pointer dereference. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/fw.c | 2 ++ drivers/net/wireless/realtek/rtlwifi/rtl8192c/fw_common.c | 2 ++ drivers/net/wi

Re: [PATCH] rtlwifi: rtl8188ee: Remove extraneous file

2019-04-16 Thread Pkshih
On Tue, 2019-04-16 at 19:35 -0500, Larry Finger wrote: > Somehow file drivers/net/wireless/realtek/rtlwifi/rtl8188ee/trx.c.rej was > incorporated into the sources. Obviously, it can be removed. > > Signed-off-by: Larry Finger > Reported-by: Andrew Morton > Cc: Andrew Morton > --- > Andrew, > >

[PATCH 3/4] rtlwifi: 8192de: Fix used uninitialized variables in power tracking

2019-05-10 Thread pkshih
From: Ping-Ke Shih ofdm_index_old[] is the index of ofdmswing_table[], and used to indicate initial value of ROFDM0_X{A,B}TXIQIMBALANCE in rtl8192de_phy_reg_2tarray[] table, and the initial value is corresponding to calibration thermal value written in efuse, namely rtlefuse->eeprom_thermalmeter.

[PATCH 0/4] rtlwifi: 8192de: Fix used uninitialized variables in power tracking

2019-05-10 Thread pkshih
From: Ping-Ke Shih This issue is found by Coverity and repoerted by Colin Ian King. An array ofdm_index[3] is never initialized. In order to fix this issue, I refactor the code to be more readable, and then I investigate the variable ofdm_index[] should be initialized as the index corresponding

[PATCH 2/4] rtlwifi: 8192de: make tables to be 'static const'

2019-05-10 Thread pkshih
From: Ping-Ke Shih This can reduce code size 264 bytes, and make code more readable. text data bss dec hex filename Before: 13586 0 16 136023522 rtl8192de/dm.o After: 13322 0 16 13338341a rtl8192de/dm.o Signed-off-by: Ping-Ke Shih

[PATCH 1/4] rtlwifi: 8192de: Reduce indentation and fix coding style

2019-05-10 Thread pkshih
From: Ping-Ke Shih This commit doesn't change logic at all. Since indentation is lower, the wrapped statements can be put in single line that will become more readable. Signed-off-by: Ping-Ke Shih --- .../wireless/realtek/rtlwifi/rtl8192de/dm.c | 640 +- 1 file changed, 303 i

[PATCH 4/4] rtlwifi: 8192de: use le32 to access cckswing tables

2019-05-10 Thread pkshih
From: Ping-Ke Shih The cckswing tables cckswing_table_ch1ch13 and cckswing_table_ch14 are u8 array in little-endian order. To compare four u8 value with register u32 value, cast the value to cpu order. Signed-off-by: Ping-Ke Shih --- .../wireless/realtek/rtlwifi/rtl8192de/dm.c | 36 -

[PATCH] rtlwifi: rtl8192cu: fix error handle when usb probe failed

2019-05-28 Thread pkshih
From: Ping-Ke Shih rtl_usb_probe() must do error handle rtl_deinit_core() only if rtl_init_core() is done, otherwise goto error_out2. | usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 | rtl_usb: reg 0xf0, usbctrl_vendorreq TimeOut! status:0xffb9 value=0x0 | rtl8192cu: Chip

[PATCH] rtlwifi: remove assignment to itself

2019-07-22 Thread pkshih
From: Ping-Ke Shih Module parameters of 'sw_crypto' and 'disable_watchdog' are false by default. If new value is desired, we can do it during inserting module, assignment existing in source code is not reasonable. Reported-by: David Binderman CC: Larry Finger Signed-off-by: Ping-Ke Shih ---

RE: [PATCH 3/6] rtlwifi: rtl8192ee: Remove set but not used variable 'err'

2019-10-01 Thread Pkshih
> -Original Message- > From: linux-wireless-ow...@vger.kernel.org > [mailto:linux-wireless-ow...@vger.kernel.org] On Behalf > Of zhengbin > Sent: Monday, September 30, 2019 4:55 PM > To: Pkshih; kv...@codeaurora.org; da...@davemloft.net; > linux-wireless@v

Re: [PATCH v2] rtlwifi: rtl8192ee: Remove set but not used variable 'err'

2019-10-03 Thread Pkshih
On Fri, 2019-10-04 at 10:36 +0800, zhengbin (A) wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c: In function > rtl92ee_download_fw: > drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c:111:6: warning: variable > err set but not used

Re: [PATCH 0/8] net/rtlwifi: remove some unused variables

2019-10-04 Thread Pkshih
On Fri, 2019-10-04 at 16:43 +0800, zhengbin wrote: > zhengbin (8): >   rtlwifi: rtl8821ae: Remove set but not used variables 'rtstatus','bd' >   rtlwifi: rtl8723ae: Remove set but not used variables > 'reg_ecc','reg_ec4','reg_eac','b_pathb_ok' >   rtlwifi: rtl8192c: Remove set but not used vari

RE: [PATCH v3 4/5] rtw88: add set_bitrate_mask support

2019-10-22 Thread Pkshih
> -Original Message- > From: linux-wireless-ow...@vger.kernel.org > [mailto:linux-wireless-ow...@vger.kernel.org] On Behalf > Of Chris Chiu > Sent: Tuesday, October 22, 2019 8:49 PM > To: Tony Chuang > Cc: Kalle Valo; linux-wireless; Brian Norris > Subject: Re: [PATCH v3 4/5] rtw88: add

[PATCH 00/17] rtlwifi: halmac: Add new moudle halmac

2018-03-30 Thread pkshih
From: Ping-Ke Shih Hi Kalle, This patchset is to add our new module halmac, so it may be pain you result from huge patches. In order to reduce the pain, I try to classify them and put related files into a patch, so I hope you can review them easier. If you have better way to review this module, p

[PATCH 08/17] rtlwifi: halmac: add GPIO pin/pinmux definitions

2018-03-30 Thread pkshih
From: Ping-Ke Shih GPIO with pinmux can switch to many functions such as LED, UART, JTAG, WoWLAN, etc. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_gpio_8822b.c | 847 + .../halmac_88xx/halmac_8822b/halmac_gpio_8822b.h | 34 + .../rtlwifi/halmac/

[PATCH 02/17] rtlwifi: add debug ID COMP_HALMAC

2018-03-30 Thread pkshih
From: Ping-Ke Shih Add a debug ID for the module halmac Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/debug.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/debug.h b/drivers/net/wireless/realtek/rtlwifi/debug.h index ad6834af61

[PATCH 04/17] rtlwifi: halmac: add main definition used by halmac

2018-03-30 Thread pkshih
From: Ping-Ke Shih The files contain main definition of struct, enum, prototypes, state machine, etc. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/halmac/halmac_state_machine.h | 157 ++ .../wireless/realtek/rtlwifi/halmac/halmac_type.h | 2134 2 files changed, 2

[PATCH 12/17] rtlwifi: halmac: add halmac init/deinit functions

2018-03-30 Thread pkshih
From: Ping-Ke Shih Add files to initialize and free halmac context. Since halmac is an three levels hierarchy file structure, so the added files provide interfaces of halmac, 88xx and 8822b. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_init_8822b.c | 688 +

[PATCH 14/17] rtlwifi: halmac: add bus interface commands

2018-03-30 Thread pkshih
From: Ping-Ke Shih The halmac supports three buses interfaces, PCI, USB and SDIO, and this commit makes it possible to change their phy parameters. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_pcie_8822b.c | 218 + .../halmac_88xx/halmac_8822b/halmac_pcie_8822b.h

[PATCH 15/17] rtlwifi: halmac: add to control WiFi mac functions and registers

2018-03-30 Thread pkshih
From: Ping-Ke Shih This commit provides WiFi mac functions to control wifi easier, and also provides generic access entries for driver and other modules. Signed-off-by: Ping-Ke Shih --- .../halmac_8822b/halmac_cfg_wmac_8822b.c | 144 + .../halmac_8822b/halmac_cfg_wmac_8822b.h

[PATCH 09/17] rtlwifi: halmac: add power sequence to turn on/off wifi card

2018-03-30 Thread pkshih
From: Ping-Ke Shih Define power sequence command, and fill the sequences of 8822b. Signed-off-by: Ping-Ke Shih --- .../halmac_8822b/halmac_pwr_seq_8822b.c| 396 + .../halmac_8822b/halmac_pwr_seq_8822b.h| 26 ++ .../realtek/rtlwifi/halmac/halmac_pwr_

[PATCH 11/17] rtlwifi: halmac: add files to implement halmac ops

2018-03-30 Thread pkshih
From: Ping-Ke Shih The structure halmac_ops defined in wifi.h, and this commit implements and hooks ops to the structure, so a symbol rtl_halmac_get_ops_pointer is expoerted to access this module. Meanwhile, we implement ops defined and needed by this module. Signed-off-by: Ping-Ke Shih --- ..

[PATCH 01/17] rtlwifi: add halmac structure to wifi.h

2018-03-30 Thread pkshih
From: Ping-Ke Shih Add structure and ops to interact with halmac and other modules. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 58 + 1 file changed, 58 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/driv

[PATCH 17/17] rtlwifi: add halmac to Makefile and Kconfig

2018-03-30 Thread pkshih
From: Ping-Ke Shih Add halmac to Makefile and Kconfig, so we can build this module if 8822BE is selected. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/Kconfig | 5 drivers/net/wireless/realtek/rtlwifi/Makefile | 1 + .../net/wireless/realtek/rtlwifi/ha

[PATCH 03/17] rtlwifi: add dmdef.h to share with driver and other modules

2018-03-30 Thread pkshih
From: Ping-Ke Shih This header file is maintained by new module phydm, and share with driver and other modules, such as halmac. This patch adds only one enumeration, and more information will be added later. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/dmdef.h | 40

[PATCH 07/17] rtlwifi: halmac: add definition of TX/RX descriptor

2018-03-30 Thread pkshih
From: Ping-Ke Shih TX/RX descriptor are the headers to describe the packet content. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/halmac/halmac_rx_bd_nic.h | 36 ++ .../realtek/rtlwifi/halmac/halmac_rx_desc_chip.h | 100 + .../realtek/rtlwifi/halmac/halmac_rx_desc_nic.h|

[PATCH 16/17] rtlwifi: halmac: add to support BB and RF functions

2018-03-30 Thread pkshih
From: Ping-Ke Shih Some BB and RF functions collaborate with firmware or MAC. For instances, the IQK and PSD functions are implemented in firmware, so use a H2C command to trigger. For MIMO function, use the helper functions to control related MAC registers. Signed-off-by: Ping-Ke Shih --- ...

[PATCH 05/17] rtlwifi: halmac: describe number and size of chip functions

2018-03-30 Thread pkshih
From: Ping-Ke Shih The number and size of chip fucntions are different, such as TX/RX FIFO size, efuse size, etc. So they are defined in an individual file. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_8822b_cfg.h| 68 ++ .../rtlwifi/halmac/halmac

[PATCH 10/17] rtlwifi: halmac: access efuse through halmac helper functions

2018-03-30 Thread pkshih
From: Ping-Ke Shih This file provides interfaces to read and write efuse contents. Signed-off-by: Ping-Ke Shih --- .../rtlwifi/halmac/halmac_88xx/halmac_efuse_88xx.c | 1918 .../rtlwifi/halmac/halmac_88xx/halmac_efuse_88xx.h | 101 ++ 2 files changed, 2019 insertions(+)

Re: [PATCH 11/17] rtlwifi: halmac: add files to implement halmac ops

2018-03-31 Thread Pkshih
On Fri, 2018-03-30 at 21:17 +0200, Johannes Berg wrote: > On Fri, 2018-03-30 at 15:19 +0800, pks...@realtek.com wrote: > >  > > +static struct rtl_halmac_ops rtl_halmac_operation = { > > You should make this const, if at all possible (it looks like it should > be). > I'll do it. > > + .halmac_

Re: [PATCH 06/12] wireless: Convert simple uses of a static const Ethernet broadcast address

2018-03-31 Thread Pkshih
On Sat, 2018-03-31 at 00:05 -0700, Joe Perches wrote: > Use the new ether_broadcast_addr global instead to save some object code. > > Signed-off-by: Joe Perches > --- >  drivers/net/wireless/admtek/adm8211.c   | 3 +-- >  drivers/net/wireless/ath/carl9170/mac.c | 4 +--- >  drivers/

[PATCH v2 17/17] rtlwifi: add halmac to Makefile and Kconfig

2018-04-03 Thread pkshih
From: Ping-Ke Shih Add halmac to Makefile and Kconfig, so we can build this module if 8822BE is selected. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/Kconfig | 5 drivers/net/wireless/realtek/rtlwifi/Makefile | 1 + .../net/wireless/realtek/rtlwifi/ha

[PATCH v2 14/17] rtlwifi: halmac: add bus interface commands

2018-04-03 Thread pkshih
From: Ping-Ke Shih The halmac supports three buses interfaces, PCI, USB and SDIO, and this commit makes it possible to change their phy parameters. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_pcie_8822b.c | 218 + .../halmac_88xx/halmac_8822b/halmac_pcie_8822b.h

[PATCH v2 16/17] rtlwifi: halmac: add to support BB and RF functions

2018-04-03 Thread pkshih
From: Ping-Ke Shih Some BB and RF functions collaborate with firmware or MAC. For instances, the IQK and PSD functions are implemented in firmware, so use a H2C command to trigger. For MIMO function, use the helper functions to control related MAC registers. Signed-off-by: Ping-Ke Shih --- ...

[PATCH v2 12/17] rtlwifi: halmac: add halmac init/deinit functions

2018-04-03 Thread pkshih
From: Ping-Ke Shih Add files to initialize and free halmac context. Since halmac is an three levels hierarchy file structure, so the added files provide interfaces of halmac, 88xx and 8822b. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_init_8822b.c | 688 +

[PATCH v2 15/17] rtlwifi: halmac: add to control WiFi mac functions and registers

2018-04-03 Thread pkshih
From: Ping-Ke Shih This commit provides WiFi mac functions to control wifi easier, and also provides generic access entries for driver and other modules. Signed-off-by: Ping-Ke Shih --- .../halmac_8822b/halmac_cfg_wmac_8822b.c | 144 + .../halmac_8822b/halmac_cfg_wmac_8822b.h

[PATCH v2 03/17] rtlwifi: add dmdef.h to share with driver and other modules

2018-04-03 Thread pkshih
From: Ping-Ke Shih This header file is maintained by new module phydm, and share with driver and other modules, such as halmac. This patch adds only one enumeration, and more information will be added later. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/dmdef.h | 40

[PATCH v2 05/17] rtlwifi: halmac: describe number and size of chip functions

2018-04-03 Thread pkshih
From: Ping-Ke Shih The number and size of chip fucntions are different, such as TX/RX FIFO size, efuse size, etc. So they are defined in an individual file. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_8822b_cfg.h| 68 ++ .../rtlwifi/halmac/halmac

[PATCH v2 10/17] rtlwifi: halmac: access efuse through halmac helper functions

2018-04-03 Thread pkshih
From: Ping-Ke Shih This file provides interfaces to read and write efuse contents. Signed-off-by: Ping-Ke Shih --- .../rtlwifi/halmac/halmac_88xx/halmac_efuse_88xx.c | 1918 .../rtlwifi/halmac/halmac_88xx/halmac_efuse_88xx.h | 101 ++ 2 files changed, 2019 insertions(+)

[PATCH v2 08/17] rtlwifi: halmac: add GPIO pin/pinmux definitions

2018-04-03 Thread pkshih
From: Ping-Ke Shih GPIO with pinmux can switch to many functions such as LED, UART, JTAG, WoWLAN, etc. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_gpio_8822b.c | 847 + .../halmac_88xx/halmac_8822b/halmac_gpio_8822b.h | 34 + .../rtlwifi/halmac/

[PATCH v2 01/17] rtlwifi: add halmac structure to wifi.h

2018-04-03 Thread pkshih
From: Ping-Ke Shih Add structure and ops to interact with halmac and other modules. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 58 + 1 file changed, 58 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/driv

[PATCH v2 04/17] rtlwifi: halmac: add main definition used by halmac

2018-04-03 Thread pkshih
From: Ping-Ke Shih The files contain main definition of struct, enum, prototypes, state machine, etc. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/halmac/halmac_state_machine.h | 157 ++ .../wireless/realtek/rtlwifi/halmac/halmac_type.h | 2134 2 files changed, 2

[PATCH v2 11/17] rtlwifi: halmac: add files to implement halmac ops

2018-04-03 Thread pkshih
From: Ping-Ke Shih The structure halmac_ops defined in wifi.h, and this commit implements and hooks ops to the structure, so a symbol rtl_halmac_get_ops_pointer is expoerted to access this module. Meanwhile, we implement ops defined and needed by this module. Signed-off-by: Ping-Ke Shih --- ..

[PATCH v2 07/17] rtlwifi: halmac: add definition of TX/RX descriptor

2018-04-03 Thread pkshih
From: Ping-Ke Shih TX/RX descriptor are the headers to describe the packet content. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/halmac/halmac_rx_bd_nic.h | 36 ++ .../realtek/rtlwifi/halmac/halmac_rx_desc_chip.h | 100 + .../realtek/rtlwifi/halmac/halmac_rx_desc_nic.h|

[PATCH v2 09/17] rtlwifi: halmac: add power sequence to turn on/off wifi card

2018-04-03 Thread pkshih
From: Ping-Ke Shih Define power sequence command, and fill the sequences of 8822b. Signed-off-by: Ping-Ke Shih --- .../halmac_8822b/halmac_pwr_seq_8822b.c| 396 + .../halmac_8822b/halmac_pwr_seq_8822b.h| 26 ++ .../realtek/rtlwifi/halmac/halmac_pwr_

[PATCH v2 02/17] rtlwifi: add debug ID COMP_HALMAC

2018-04-03 Thread pkshih
From: Ping-Ke Shih Add a debug ID for the module halmac Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/debug.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/debug.h b/drivers/net/wireless/realtek/rtlwifi/debug.h index ad6834af61

[PATCH v2 00/17] rtlwifi: halmac: Add new module halmac

2018-04-03 Thread pkshih
From: Ping-Ke Shih v2: remove indirection to get halmac ops Only patches 1/17 and 11/17 are changed. Patches 1/17-3/17 are added structure to support this module. Patches 4/17-16/17 add new files. Patch 17/17 add this module to Makefile and Kconfig. Ping-Ke Shih (17): rtlwifi: add halmac

Re: [PATCH 1/9] rtlwifi: btcoex: Add 8822b1ant coex files

2018-04-04 Thread Pkshih
On Wed, 2018-04-04 at 02:43 +, Larry Finger wrote: > On 03/28/2018 02:27 AM, pks...@realtek.com wrote: > > From: Ping-Ke Shih > >  > > This file supports 8822be WiFi module with two physical antenna that > > means one antenna will share with BT. > >  > > Signed-off-by: Ping-Ke Shih > > --- >

Re: [PATCH 1/9] rtlwifi: btcoex: Add 8822b1ant coex files

2018-04-04 Thread Pkshih
On Wed, 2018-04-04 at 20:41 +0800, Pkshih wrote: > On Wed, 2018-04-04 at 02:43 +, Larry Finger wrote: > > On 03/28/2018 02:27 AM, pks...@realtek.com wrote: > > > From: Ping-Ke Shih > > >  > > > This file supports 8822be WiFi module with two physical anten

Re: [rtlwifi-btcoex] Suspicious code in halbtc8821a1ant driver

2018-04-04 Thread Pkshih
On Thu, 2018-04-05 at 01:25 +, Gustavo A. R. Silva wrote: > Hi all, > > While doing some static analysis I came across the following piece of code at > drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1581: > > 1581 static void btc8821a1ant_act_bt_sco_hid_only_busy(struct btc_

[PATCH] rtlwifi: btcoex: remove identical statements within if-else branches

2018-04-09 Thread pkshih
From: Ping-Ke Shih Since the statements are identical, we can safely remove the statements. The commit 42e74946f016 ("rtlwifi: btcoexist: Fix if == else warnings in halbtc8821a1ant.c") had fixed the statements, but the commit c6821613e653 ("rtlwifi: btcoex: follow linux coding style") that conver

[PATCH v3 5/9] rtlwifi: btcoex: Add 8822b to Makefile

2018-04-09 Thread pkshih
From: Ping-Ke Shih Add btcoex of 8822b to Makefile. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/btcoexist/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/Makefile b/drivers/net/wireless/realtek/rtlwifi/btc

[PATCH v3 0/9] rtlwifi: btcoex: Add 8822b btcoex support

2018-04-09 Thread pkshih
From: Ping-Ke Shih v3: forget to CC wireless mailing list, so resend again. No any change. v2: fix misspelling and boolean expression in patch 1/9 Patches 1-2 are revised by patches 12 of previous patchset. 8822b coex files are split into two patches, and I remove some comments and apply 'static

[PATCH v3 4/9] rtlwifi: btcoex: Add 8822b routine to btc interfaces

2018-04-09 Thread pkshih
From: Ping-Ke Shih Add 8822b routines to run btcoex algorithm Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 100 + 1 file changed, 100 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers

[PATCH v3 3/9] rtlwifi: btcoex: Add 8822b header files to precomp.h

2018-04-09 Thread pkshih
From: Ping-Ke Shih Add 8822b header files to precomp.h for routing functions. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbt_precomp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbt_precomp.h b/

[PATCH v3 9/9] rtlwifi: btcoex: Remove global variables of chip specific context

2018-04-09 Thread pkshih
From: Ping-Ke Shih Remove the global varaibles, and use local varialbes that point the fields defined in 'struct btc_coexist' instead, so it is possible to support multiple devices. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c| 44 -- .../realtek/

[PATCH v3 7/9] rtlwifi: btcoex: Add modifier const to version related variables

2018-04-09 Thread pkshih
From: Ping-Ke Shih The variables declared as 'static' look a little weird. Since they are version of btcoex and only used to display in debug message, this patch changes them to 'static const' to make it clear. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halb

[PATCH v3 6/9] rtlwifi: btcoex: remove comments that are not meaningful

2018-04-09 Thread pkshih
From: Ping-Ke Shih The comments aren't meaningful and the use of '***...***' isn't upstream style, so remove them. This patch doesn't change any code. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c| 22 +--- .../realtek/rtlwifi/btcoexist/hal

[PATCH v3 8/9] rtlwifi: btcoex: Add struct members to replace global varaibles

2018-04-09 Thread pkshih
From: Ping-Ke Shih Chip specific context plays as global variables that will not support multiple devices simultaneously. This patch adds 'union' fields to hold the variables, and next patch will remove all of them. To use the declaration of fields in halbtcoutsrc.h, I move the including order i

[PATCH v4 8/9] rtlwifi: btcoex: Add struct members to replace global varaibles

2018-04-12 Thread pkshih
From: Ping-Ke Shih Chip specific context plays as global variables that will not support multiple devices simultaneously. This patch adds 'union' fields to hold the variables, and next patch will remove all of them. To use the declaration of fields in halbtcoutsrc.h, I move the including order i

[PATCH v4 3/9] rtlwifi: btcoex: Add 8822b header files to precomp.h

2018-04-12 Thread pkshih
From: Ping-Ke Shih Add 8822b header files to precomp.h for routing functions. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halbt_precomp.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbt_precomp.h b/

[PATCH v4 5/9] rtlwifi: btcoex: Add 8822b routine to btc interfaces

2018-04-12 Thread pkshih
From: Ping-Ke Shih Add 8822b routines to run btcoex algorithm Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/btcoexist/halbtcoutsrc.c | 100 + 1 file changed, 100 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtcoutsrc.c b/drivers

[PATCH v4 6/9] rtlwifi: btcoex: remove comments that are not meaningful

2018-04-12 Thread pkshih
From: Ping-Ke Shih The comments aren't meaningful and the use of '***...***' isn't upstream style, so remove them. This patch doesn't change any code. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c| 22 +--- .../realtek/rtlwifi/btcoexist/hal

[PATCH v4 7/9] rtlwifi: btcoex: Add modifier const to version related variables

2018-04-12 Thread pkshih
From: Ping-Ke Shih The variables declared as 'static' look a little weird. Since they are version of btcoex and only used to display in debug message, this patch changes them to 'static const' to make it clear. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/btcoexist/halb

[PATCH v4 4/9] rtlwifi: btcoex: Add 8822b to Makefile

2018-04-12 Thread pkshih
From: Ping-Ke Shih Add btcoex of 8822b to Makefile. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/btcoexist/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/btcoexist/Makefile b/drivers/net/wireless/realtek/rtlwifi/btc

[PATCH v4 9/9] rtlwifi: btcoex: Remove global variables of chip specific context

2018-04-12 Thread pkshih
From: Ping-Ke Shih Remove the global varaibles, and use local varialbes that point the fields defined in 'struct btc_coexist' instead, so it is possible to support multiple devices. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/btcoexist/halbtc8192e2ant.c| 44 -- .../realtek/

[PATCH v4 0/9] rtlwifi: btcoex: Add 8822b btcoex support

2018-04-12 Thread pkshih
From: Ping-Ke Shih v4: swap the order of patch 4/9 and 5/9, because kbuild test robot reports undefined reference. No source code change. v3: forget to CC wireless mailing list, so resend again. No any change. v2: fix misspelling and boolean expression in patch 1/9 Patches 1-2 are revised by

[PATCH] rtlwifi: cleanup 8723be ant_sel definition

2018-04-19 Thread pkshih
From: Ping-Ke Shih The module parameter ant_sel is used to control antenna number and path. There is an existing enum ANT_{X2,X1} defined the antenna number, so add a new enum ANT_{MAIN,AUX} to make it readable. After this work, incorrect given values depend on ant_sel were exposed, so refill val

Re: [PATCH] rtlwifi: cleanup 8723be ant_sel definition

2018-04-19 Thread Pkshih
On Thu, 2018-04-19 at 12:52 +0300, Kalle Valo wrote: > writes: > > > From: Ping-Ke Shih > > > > The module parameter ant_sel is used to control antenna number and path. > > There is an existing enum ANT_{X2,X1} defined the antenna number, so > > add a new enum ANT_{MAIN,AUX} to make it readable.

[PATCH v2] rtlwifi: cleanup 8723be ant_sel definition

2018-04-19 Thread pkshih
From: Ping-Ke Shih The module parameter ant_sel is used to control antenna number and path. There is an existing enum ANT_{X2,X1} defined the antenna number, so add a new enum ANT_{MAIN,AUX} to make it readable. After this work, incorrect given values depend on ant_sel were exposed, so refill val

Re: [PATCH v2] rtlwifi: cleanup 8723be ant_sel definition

2018-04-22 Thread Pkshih
Thanks for spending your time to teach and help, Kalle and Larry. I'll record this example to internal white board. PK

[PATCH v3 03/19] rtlwifi: add dmdef.h to share with driver and other modules

2018-04-24 Thread pkshih
From: Ping-Ke Shih This header file is maintained by new module phydm, and share with driver and other modules, such as halmac. This patch adds only one enumeration, and more information will be added later. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/dmdef.h | 40

[PATCH v3 19/19] rtlwifi: add halmac to Makefile and Kconfig

2018-04-24 Thread pkshih
From: Ping-Ke Shih Add halmac to Makefile and Kconfig, so we can build this module if 8822BE is selected. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/Kconfig | 5 drivers/net/wireless/realtek/rtlwifi/Makefile | 1 + .../net/wireless/realtek/rtlwifi/ha

[PATCH v3 02/19] rtlwifi: add debug ID COMP_HALMAC

2018-04-24 Thread pkshih
From: Ping-Ke Shih Add a debug ID for the module halmac Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/debug.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/debug.h b/drivers/net/wireless/realtek/rtlwifi/debug.h index ad6834af61

[PATCH v3 05/19] rtlwifi: halmac: describe number and size of chip functions

2018-04-24 Thread pkshih
From: Ping-Ke Shih The number and size of chip fucntions are different, such as TX/RX FIFO size, efuse size, etc. So they are defined in an individual file. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_8822b_cfg.h| 68 ++ .../rtlwifi/halmac/halmac

[PATCH v3 00/19] rtlwifi: halmac: Add new module halmac

2018-04-24 Thread pkshih
From: Ping-Ke Shih v3: patch 06/17 in v2 is too big, so mail server may block the mail. In this patchset, I decompose the patch into three patches 06/19-08/19, so in patchset view v2 and v3 are identical. v2: remove indirection to get halmac ops Only patches 1/17 and 11/17 are change

[PATCH v3 04/19] rtlwifi: halmac: add main definition used by halmac

2018-04-24 Thread pkshih
From: Ping-Ke Shih The files contain main definition of struct, enum, prototypes, state machine, etc. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/halmac/halmac_state_machine.h | 157 ++ .../wireless/realtek/rtlwifi/halmac/halmac_type.h | 2134 2 files changed, 2

[PATCH v3 13/19] rtlwifi: halmac: add files to implement halmac ops

2018-04-24 Thread pkshih
From: Ping-Ke Shih The structure halmac_ops defined in wifi.h, and this commit implements and hooks ops to the structure, so a symbol rtl_halmac_get_ops_pointer is expoerted to access this module. Meanwhile, we implement ops defined and needed by this module. Signed-off-by: Ping-Ke Shih --- ..

[PATCH v3 01/19] rtlwifi: add halmac structure to wifi.h

2018-04-24 Thread pkshih
From: Ping-Ke Shih Add structure and ops to interact with halmac and other modules. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/wifi.h | 58 + 1 file changed, 58 insertions(+) diff --git a/drivers/net/wireless/realtek/rtlwifi/wifi.h b/driv

[PATCH v3 06/19] rtlwifi: halmac: add register definitions

2018-04-24 Thread pkshih
From: Ping-Ke Shih List all MAC registers including rtl8822b. Signed-off-by: Ping-Ke Shih --- .../wireless/realtek/rtlwifi/halmac/halmac_reg2.h | 1292 .../realtek/rtlwifi/halmac/halmac_reg_8822b.h | 733 +++ 2 files changed, 2025 insertions(+) create mode

[PATCH v3 11/19] rtlwifi: halmac: add power sequence to turn on/off wifi card

2018-04-24 Thread pkshih
From: Ping-Ke Shih Define power sequence command, and fill the sequences of 8822b. Signed-off-by: Ping-Ke Shih --- .../halmac_8822b/halmac_pwr_seq_8822b.c| 396 + .../halmac_8822b/halmac_pwr_seq_8822b.h| 26 ++ .../realtek/rtlwifi/halmac/halmac_pwr_

[PATCH v3 18/19] rtlwifi: halmac: add to support BB and RF functions

2018-04-24 Thread pkshih
From: Ping-Ke Shih Some BB and RF functions collaborate with firmware or MAC. For instances, the IQK and PSD functions are implemented in firmware, so use a H2C command to trigger. For MIMO function, use the helper functions to control related MAC registers. Signed-off-by: Ping-Ke Shih --- ...

[PATCH v3 10/19] rtlwifi: halmac: add GPIO pin/pinmux definitions

2018-04-24 Thread pkshih
From: Ping-Ke Shih GPIO with pinmux can switch to many functions such as LED, UART, JTAG, WoWLAN, etc. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_gpio_8822b.c | 847 + .../halmac_88xx/halmac_8822b/halmac_gpio_8822b.h | 34 + .../rtlwifi/halmac/

[PATCH v3 14/19] rtlwifi: halmac: add halmac init/deinit functions

2018-04-24 Thread pkshih
From: Ping-Ke Shih Add files to initialize and free halmac context. Since halmac is an three levels hierarchy file structure, so the added files provide interfaces of halmac, 88xx and 8822b. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_init_8822b.c | 688 +

[PATCH v3 09/19] rtlwifi: halmac: add definition of TX/RX descriptor

2018-04-24 Thread pkshih
From: Ping-Ke Shih TX/RX descriptor are the headers to describe the packet content. Signed-off-by: Ping-Ke Shih --- .../realtek/rtlwifi/halmac/halmac_rx_bd_nic.h | 36 ++ .../realtek/rtlwifi/halmac/halmac_rx_desc_chip.h | 100 + .../realtek/rtlwifi/halmac/halmac_rx_desc_nic.h|

[PATCH v3 16/19] rtlwifi: halmac: add bus interface commands

2018-04-24 Thread pkshih
From: Ping-Ke Shih The halmac supports three buses interfaces, PCI, USB and SDIO, and this commit makes it possible to change their phy parameters. Signed-off-by: Ping-Ke Shih --- .../halmac_88xx/halmac_8822b/halmac_pcie_8822b.c | 218 + .../halmac_88xx/halmac_8822b/halmac_pcie_8822b.h

[PATCH v3 12/19] rtlwifi: halmac: access efuse through halmac helper functions

2018-04-24 Thread pkshih
From: Ping-Ke Shih This file provides interfaces to read and write efuse contents. Signed-off-by: Ping-Ke Shih --- .../rtlwifi/halmac/halmac_88xx/halmac_efuse_88xx.c | 1918 .../rtlwifi/halmac/halmac_88xx/halmac_efuse_88xx.h | 101 ++ 2 files changed, 2019 insertions(+)

[PATCH v3 17/19] rtlwifi: halmac: add to control WiFi mac functions and registers

2018-04-24 Thread pkshih
From: Ping-Ke Shih This commit provides WiFi mac functions to control wifi easier, and also provides generic access entries for driver and other modules. Signed-off-by: Ping-Ke Shih --- .../halmac_8822b/halmac_cfg_wmac_8822b.c | 144 + .../halmac_8822b/halmac_cfg_wmac_8822b.h

Re: [PATCH v2 00/17] rtlwifi: halmac: Add new module halmac

2018-04-24 Thread Pkshih
On Tue, 2018-04-24 at 17:12 +, Kalle Valo wrote: > writes: >  > > From: Ping-Ke Shih > > > > v2: remove indirection to get halmac ops > > Only patches 1/17 and 11/17 are changed. > > > > Patches 1/17-3/17 are added structure to support this module. > > Patches 4/17-16/17 add new files. >

RE: [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac

2018-04-26 Thread Pkshih
> -Original Message- > From: Kalle Valo [mailto:kv...@codeaurora.org] > Sent: Wednesday, April 25, 2018 3:36 PM > To: Pkshih > Cc: larry.fin...@lwfinger.net; linux-wireless@vger.kernel.org > Subject: Re: [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac > &

RE: [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac

2018-04-29 Thread Pkshih
> -Original Message- > From: Barry Day [mailto:brise...@gmail.com] > Sent: Saturday, April 28, 2018 6:42 AM > To: Pkshih > Cc: Kalle Valo; larry.fin...@lwfinger.net; linux-wireless@vger.kernel.org > Subject: Re: [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac &

RE: RTL8723BE performance regression

2018-05-01 Thread Pkshih
> -Original Message- > From: João Paulo Rechi Vita [mailto:jprv...@gmail.com] > Sent: Wednesday, May 02, 2018 6:41 AM > To: Larry Finger > Cc: Steve deRosier; 莊彥宣; Pkshih; Birming Chiu; Shaofu; Steven Ting; > Chaoming_Li; Kalle Valo; > linux-wireless; Network Deve

Re: RTL8723BE performance regression

2018-05-01 Thread Pkshih
On Wed, 2018-05-02 at 05:44 +, Pkshih wrote: > > > -Original Message- > > From: João Paulo Rechi Vita [mailto:jprv...@gmail.com] > > Sent: Wednesday, May 02, 2018 6:41 AM > > To: Larry Finger > > Cc: Steve deRosier; 莊彥宣; Pkshih; Birming Chiu; Shao

[PATCH] rtlwifi: remove duplicate definition of antenna number for btcoex

2018-05-03 Thread pkshih
From: Ping-Ke Shih Two enumerations bt_total_ant_num and bt_ant_num are identical, so one can be removed. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/hw.c | 4 ++-- drivers/net/wireless/realtek/rtlwifi/wifi.h | 5 - 2 files changed, 2 insertions(+

Re: RTL8723BE performance regression

2018-05-08 Thread Pkshih
On Mon, 2018-05-07 at 14:49 -0700, João Paulo Rechi Vita wrote: > On Tue, May 1, 2018 at 10:58 PM, Pkshih wrote: > > On Wed, 2018-05-02 at 05:44 +0000, Pkshih wrote: > >> > >> > -Original Message- > >> > From: João Paulo Rechi Vita [mailto:jprv...

Re: RTL8723BE performance regression

2018-05-13 Thread Pkshih
On Wed, 2018-05-09 at 13:33 -0700, João Paulo Rechi Vita wrote: > On Tue, May 8, 2018 at 1:37 AM, Pkshih wrote: > > On Mon, 2018-05-07 at 14:49 -0700, João Paulo Rechi Vita wrote: > >> On Tue, May 1, 2018 at 10:58 PM, Pkshih wrote: > >> > On Wed, 2018-05-0

Re: [PATCH v3 00/19] rtlwifi: halmac: Add new module halmac

2018-05-15 Thread Pkshih
On Mon, 2018-04-30 at 14:03 +0530, Krishna Chaitanya wrote: > On Mon, Apr 30, 2018 at 8:10 AM, Pkshih wrote: > > > > > > > -Original Message- > > > From: Barry Day [mailto:brise...@gmail.com] > > > Sent: Saturday, April 28, 2018 6:42 AM > &

[PATCH 14/14] rtlwifi: fix btmpinfo timeout while processing C2H_BT_INFO

2018-05-18 Thread pkshih
From: Ping-Ke Shih In former patch, I enqueu all C2H commands and processed by a workqueue. In case C2H_BT_INFO will issue a H2C command to set BT reg, and wait for a C2H ack. But it is totally impossible that C2H workqueue waits for a C2H command, so kernel log warn rtlwifi: :<0> btmpinf

[PATCH 12/14] rtlwifi: use sk_buff to queue C2H commands

2018-05-18 Thread pkshih
From: Ping-Ke Shih We use 'struct rtl_c2hcmd' to store C2H commands originally, and the code is slightly complex to enqueue and dequeue and also wastes time to allocate and memcpy data. Since C2H commands are asynchronous events, they can be processed in work queue, so RX ISR enqueues C2H result

[PATCH 03/14] rtlwifi: remove duplicate rx_packet_type definition

2018-05-18 Thread pkshih
From: Ping-Ke Shih Move duplicate definitions from def.h of ic folder to wifi.h Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/def.h | 7 --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/def.h | 8 drivers/net/wireless/realtek/rtlwifi/rtl8723be/de

  1   2   3   >