Re: [PATCH] rtlwifi: rtl8192de: Fix misleading REG_MCUFWDL information

2018-11-05 Thread Pkshih
On Mon, 2018-11-05 at 19:25 +0800, Shaokun Zhang wrote: > RT_TRACE shows REG_MCUFWDL value as a decimal value with a '0x' > prefix, which is somewhat misleading. > > Fix it to print hexadecimal, as was intended. > > Cc: Ping-Ke Shih > Cc: Kalle Valo > Signed-off-by: Shaokun Zhang > --- >  

[PATCH v2] rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h

2018-10-01 Thread pkshih
From: Ping-Ke Shih The following: bool efuse_re_pg_sec1flag; u8 efuse_re_pg_data[8]; are not referenced anywhere in the rtlwifi code. This patch is originally created by Rick Veens , and Joe Perches reminded to apply it to rtlwifi. Signed-off-by: Ping-Ke Shih --- v2: change author to me

Re: [PATCH] rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h

2018-10-01 Thread Pkshih
On Mon, 2018-10-01 at 12:10 +0300, Kalle Valo wrote: > writes: > > > From: Rick Veens > > > > The following: > >  bool efuse_re_pg_sec1flag; > >  u8 efuse_re_pg_data[8]; > > are not referenced anywhere in the rtlwifi code. > > > > This patch is originally created by Rick Veens , > > and Joe

[PATCH] rtlwifi: Removed unused define and code efuse_re_pg* from wifi.h

2018-10-01 Thread pkshih
From: Rick Veens The following: bool efuse_re_pg_sec1flag; u8 efuse_re_pg_data[8]; are not referenced anywhere in the rtlwifi code. This patch is originally created by Rick Veens , and Joe Perches reminded to apply it to rtlwifi. Signed-off-by: Ping-Ke Shih ---

Re: [PATCH v2] rtlwifi: remove set but unused variables

2018-09-03 Thread Pkshih
On Mon, 2018-09-03 at 22:57 +0800, Kevin Lo wrote: > Remove set but unused variables from _rtl88ee_hw_configure() and > _rtl8723e_hw_configure(). > > Signed-off-by: Kevin Lo Acked-by: Ping-Ke Shih

Re: [PATCH] staging: r8822be: Fix RTL8822be can't find any wireless AP

2018-07-08 Thread Pkshih
On Sun, 2018-07-08 at 11:30 -0500, Larry Finger wrote: > On 07/06/2018 12:44 AM, pks...@realtek.com wrote: > > From: Ping-Ke Shih > >  > > RTL8822be can't bring up properly on ASUS X530UN, and dmesg says: > > [ 8.591333] r8822be: module is from the staging directory, the quality > > is unknown,

Re: [PATCH 13/14] rtlwifi: access skb->data to get C2H data by macro

2018-07-03 Thread Pkshih
On Fri, 2018-06-29 at 10:30 +0300, Kalle Valo wrote: > Pkshih writes: > > > On Tue, 2018-05-29 at 08:18 +0300, Kalle Valo wrote: > >> writes: > >>  > > > > Because C2H data is little endian order, the struct will look like > > struct foo { > &g

Re: [PATCH v2] rtlwifi: rtl8821ae: fix firmware is not ready to run

2018-06-27 Thread Pkshih
On Wed, 2018-06-27 at 08:36 -0500, Larry Finger wrote: > On 06/27/2018 03:01 AM, pks...@realtek.com wrote: > > From: Ping-Ke Shih > >  > > rtl8821ae uses two kinds of firmwares for normal and WoWlan cases, and > > each firmware has firmware data buffer and size individually. Original > > code

[PATCH v2] rtlwifi: rtl8821ae: fix firmware is not ready to run

2018-06-27 Thread pkshih
From: Ping-Ke Shih rtl8821ae uses two kinds of firmwares for normal and WoWlan cases, and each firmware has firmware data buffer and size individually. Original code always overwrite size of normal firmware rtlpriv->rtlhal.fwsize, and this mismatch causes firmware checksum error, then firmware

[PATCH] rtlwifi: rtl8821ae: fix firmware is not ready to run

2018-06-27 Thread pkshih
From: Ping-Ke Shih rtl8821ae uses two kinds of firmwares for normal and WoWlan cases, and each firmware has two firmware data buffer and size individually. Original code always overwrite size of normal firmware rtlpriv->rtlhal.fwsize, and this mismatch causes firmware checksum error, then

[PATCH v2] rtlwifi: Fix kernel Oops "Fw download fail!!"

2018-06-21 Thread pkshih
From: Ping-Ke Shih When connecting to AP, mac80211 asks driver to enter and leave PS quickly, but driver deinit doesn't wait for delayed work complete when entering PS, then driver reinit procedure and delay work are running simultaneously. This will cause unpredictable kernel oops or crash like

Re: [PATCH] rtlwifi: Fix kernel Oops "Fw download fail!!"

2018-06-21 Thread Pkshih
On Fri, 2018-06-22 at 07:00 +0200, Arend Van Spriel wrote: > Op vr 22 jun. 2018 04:27 schreef Pkshih : > > > > On Thu, 2018-06-21 at 10:14 -0500, Larry Finger wrote: > > > On 06/21/2018 02:06 AM, pks...@realtek.com wrote: > > > > From: Ping-Ke Shih > [snip]

Re: [PATCH] rtlwifi: Fix kernel Oops "Fw download fail!!"

2018-06-21 Thread Pkshih
On Thu, 2018-06-21 at 10:14 -0500, Larry Finger wrote: > On 06/21/2018 02:06 AM, pks...@realtek.com wrote: > > From: Ping-Ke Shih > >  > > When connecting to AP, mac80211 asks driver to enter and leave PS quickly, > > but driver deinit doesn't wait for delayed work complete when entering PS, > >

[PATCH] rtlwifi: Fix kernel Oops "Fw download fail!!"

2018-06-21 Thread pkshih
From: Ping-Ke Shih When connecting to AP, mac80211 asks driver to enter and leave PS quickly, but driver deinit doesn't wait for delayed work complete when entering PS, then driver reinit procedure and delay work are running simultaneously. This will cause unpredictable kernel oops or crash like

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

2018-06-04 Thread Pkshih
On Thu, 2018-05-24 at 11:27 +0300, Kalle Valo wrote: >  > You are missing my point: I don't even have time to review huge rtlwifi > patches when they are not even ready for upstream. I cannot start > working on cleaning up rtlwifi code and doing multiple iterations of > reviews on these kind of

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

2018-05-30 Thread Pkshih
On Fri, 2018-04-13 at 14:16 +0800, pks...@realtek.com wrote: > 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

Re: [PATCH 13/14] rtlwifi: access skb->data to get C2H data by macro

2018-05-30 Thread Pkshih
On Tue, 2018-05-29 at 08:18 +0300, Kalle Valo wrote: > writes: >  > > From: Ping-Ke Shih > > > > The format of C2H data is ID(1 byte) + Length(1 byte) + value, and it is > > more readable to use macros to access C2H data. > > > > Signed-off-by: Ping-Ke Shih >  > [...] >  > > ---

Re: rtl8723be signal strength loss, and possibly a OOPS/BUG

2018-05-21 Thread Pkshih
On Sat, 2018-05-19 at 20:43 +, Mattias Jernberg wrote: > Hi >  > With kernel 4.16 I experience a loss in signal strength on rtl8723be, > it is very similar to having the ant_sel parameter wrong (or missing), > iw scan shows only my own access point next to me and with a signal > strength of

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

2018-05-18 Thread Pkshih
On Wed, 2018-05-16 at 15:36 +0300, Kalle Valo wrote: > Pkshih <pks...@realtek.com> writes: >  > > On Mon, 2018-04-30 at 14:03 +0530, Krishna Chaitanya wrote: > >> On Mon, Apr 30, 2018 at 8:10 AM, Pkshih <pks...@realtek.com> wrote: > >> > > >&g

[PATCH 02/14] rtlwifi: remove CONNECTION_MONITOR flag

2018-05-18 Thread pkshih
From: Ping-Ke Shih To use keep-alive mechanism in mac80211 stack, since driver supports reporting accurate nullfunc frame tx ack now. Signed-off-by: Tzu-En Huang Signed-off-by: Ping-Ke Shih ---

[PATCH 01/14] rtlwifi: support accurate nullfunc frame tx ack report

2018-05-18 Thread pkshih
From: Tzu-En Huang In order to realize the keep-alive mechanism in mac80211 stack, reporting accurate tx ack status for nullfunc frame is added in this commit. If current frame is nullfunc frame, we ask firmware to report by filling TX report bit in TX descriptor. After

[PATCH 07/14] rtlwifi: remove dummy hal_op rx_command_packet from rtl8188ee and rtl8723ae

2018-05-18 Thread pkshih
From: Ping-Ke Shih The caller of hal_op rx_command_packet will assert function pointer before calling, so we can remove dummy functions safely. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c | 2 --

[PATCH 09/14] rtlwifi: remove duplicate C2H handler

2018-05-18 Thread pkshih
From: Ping-Ke Shih Merge duplicate C2H handler and implement the handler in base.c. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/base.c| 72 + drivers/net/wireless/realtek/rtlwifi/base.h| 3 +

[PATCH 10/14] rtlwifi: remove hal_op rx_command_packet

2018-05-18 Thread pkshih
From: Ping-Ke Shih Because the hal_op rx_command_packet does C2H handler if rx packet type is C2H, and the handler have been moved to base.c so we can call the handler directly. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/pci.c

[PATCH 06/14] rtlwifi: remove unused fw C2H command ID

2018-05-18 Thread pkshih
From: Ping-Ke Shih The IDs are defined by driver and map to the fw C2H IDs, but they aren't used now result in removal. Signed-off-by: Ping-Ke Shih --- .../net/wireless/realtek/rtlwifi/rtl8188ee/def.h | 25 --

[PATCH 08/14] rtlwifi: Add hal_op c2h_ra_report_handler for special process

2018-05-18 Thread pkshih
From: Ping-Ke Shih We're going to merge C2H handler into one, but one special case is to handle RA_REPORT that implements in individual IC folder. So this commit adds a hal_op for caller in common code. Signed-off-by: Ping-Ke Shih ---

[PATCH 05/14] rtlwifi: remove duplicate C2H definition

2018-05-18 Thread pkshih
From: Ping-Ke Shih Move C2H definition to wifi.h, because the definitions of 8192ee, 8723be and 8821ae are the same. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/rtl8192ee/fw.c | 16

[PATCH 11/14] rtlwifi: remove hal_op c2h_content_parsing

2018-05-18 Thread pkshih
From: Ping-Ke Shih Similar to rx_command_packet, we can call rtl_c2h_content_parsing so the hal_op isn't necessary. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/base.c | 7 +++

[PATCH 00/14] rtlwifi: remove duplicate C2H handlers

2018-05-18 Thread pkshih
From: Ping-Ke Shih The goal of patch 1/14 and 2/14 is to use keep-alive mechanism in mac80211 stack that needs accurate TX ack status for null frame reported by firmware through C2H. The remaining patches are step by step to remove duplicate C2H handlers that widely

[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

[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

[PATCH 13/14] rtlwifi: access skb->data to get C2H data by macro

2018-05-18 Thread pkshih
From: Ping-Ke Shih The format of C2H data is ID(1 byte) + Length(1 byte) + value, and it is more readable to use macros to access C2H data. Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtlwifi/base.c | 8

[PATCH 04/14] rtlwifi: rename register-based C2H command IDs to V0

2018-05-18 Thread pkshih
From: Ping-Ke Shih Current chips use packet-based C2H commands whose IDs differ from old ones, so this commit simply gives C2H_V0_ as prefix of command IDs. Signed-off-by: Ping-Ke Shih --- .../net/wireless/realtek/rtlwifi/rtl8723ae/hal_btc.c | 6 +++---

[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

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 <pks...@realtek.com> wrote: > > > > > > > -Original Message- > > > From: Barry Day [mailto:brise...@gmail.com] > > > Sent: Saturday, April 2

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 <pks...@realtek.com> 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 <pks...@realtek.com>

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 <pks...@realtek.com> wrote: > > On Wed, 2018-05-02 at 05:44 +, Pkshih wrote: > >> > >> > -Original Message- > >> > From:

[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 |

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

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: [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: [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 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.

[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

[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 +

[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 +

[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 +

[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:

[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 +

[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 ---

[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

[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

[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

[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:

[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

[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

[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

[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

[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 |

[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 ---

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 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

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

[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

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

2018-04-13 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 ---

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

2018-04-13 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 ---

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

2018-04-13 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

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

2018-04-13 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

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

2018-04-13 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

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

2018-04-13 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

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

2018-04-13 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

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

2018-04-13 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

[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 ---

[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 ---

[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

[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

[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

[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

[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

[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

[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

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

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 <pks...@realtek.com> > > >  > > > This file supports 88

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:

[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):

[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

[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

[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 +

[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

[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

[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

[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

[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:

[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 +

[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 ---

[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 +

[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 ---

[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:

[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 |

[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 +

  1   2   3   >