[PATCH net-next] net: wwan: Fix bit ops double shift

2021-04-20 Thread Loic Poulain
bit operation helpers such as test_bit, clear_bit, etc take bit position as parameter and not value. Current usage causes double shift => BIT(BIT(0)). Fix that in wwan_core and mhi_wwan_ctrl. Fixes: 9a44c1cc6388 ("net: Add a WWAN subsystem") Reported-by: Dan Carpenter Signed-off-by:

[PATCH net-next] net: wwan: mhi_wwan_ctrl: Fix RX buffer starvation

2021-04-20 Thread Loic Poulain
s returned, preventing to requeue one buffer, and leading to RX buffer starvation. Fixes: fa588eba632d ("net: Add Qcom WWAN control driver") Signed-off-by: Loic Poulain --- drivers/net/wwan/mhi_wwan_ctrl.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/

[PATCH net-next v11 2/2] net: Add Qcom WWAN control driver

2021-04-16 Thread Loic Poulain
for controlling a modem, and for which related opensource userpace support exist. Signed-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to dedicated drivers/net/wwan directory v4: Rework to use wwan framework instead of self cdev management v5: Fix errors/typos in

[PATCH net-next v11 1/2] net: Add a WWAN subsystem

2021-04-16 Thread Loic Poulain
annes's earlier WWAN subsystem proposal. This initial version is purposely minimalist, it's essentially moving the generic part of the previously proposed mhi_wwan_ctrl driver inside a common WWAN framework, but the implementation is open and flexible enough to allow extension for furth

[PATCH net-next v10 2/2] net: Add Qcom WWAN control driver

2021-04-12 Thread Loic Poulain
for controlling a modem, and for which related opensource userpace support exist. Signed-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to dedicated drivers/net/wwan directory v4: Rework to use wwan framework instead of self cdev management v5: Fix errors/typos in

[PATCH net-next v10 1/2] net: Add a WWAN subsystem

2021-04-12 Thread Loic Poulain
annes's earlier WWAN subsystem proposal. This initial version is purposely minimalist, it's essentially moving the generic part of the previously proposed mhi_wwan_ctrl driver inside a common WWAN framework, but the implementation is open and flexible enough to allow extension for furth

Re: [PATCH net-next v9 1/2] net: Add a WWAN subsystem

2021-04-08 Thread Loic Poulain
Hi Dan, On Wed, 7 Apr 2021 at 16:32, Dan Williams wrote: > > On Mon, 2021-04-05 at 11:52 +0200, Loic Poulain wrote: > > This change introduces initial support for a WWAN framework. Given > > the > > complexity and heterogeneity of existing WWAN hardwares and > &g

Re: [PATCH net-next v9 2/2] net: Add Qcom WWAN control driver

2021-04-05 Thread Loic Poulain
On Mon, 5 Apr 2021 at 11:44, Loic Poulain wrote: > > The MHI WWWAN control driver allows MHI QCOM-based modems to expose > different modem control protocols/ports via the WWAN framework, so that > userspace modem tools or daemon (e.g. ModemManager) can control WWAN > config and st

[PATCH net-next v9 2/2] net: Add Qcom WWAN control driver

2021-04-05 Thread Loic Poulain
for controlling a modem, and for which related opensource userpace support exist. Signed-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to dedicated drivers/net/wwan directory v4: Rework to use wwan framework instead of self cdev management v5: Fix errors/typos in

[PATCH net-next v9 1/2] net: Add a WWAN subsystem

2021-04-05 Thread Loic Poulain
annes's earlier WWAN subsystem proposal. This initial version is purposely minimalist, it's essentially moving the generic part of the previously proposed mhi_wwan_ctrl driver inside a common WWAN framework, but the implementation is open and flexible enough to allow extension for furth

Re: [PATCH net-next v8 2/2] net: Add Qcom WWAN control driver

2021-04-02 Thread Loic Poulain
On Fri, 2 Apr 2021 at 17:43, Greg KH wrote: > > On Fri, Apr 02, 2021 at 05:41:01PM +0200, Loic Poulain wrote: > > On Fri, 2 Apr 2021 at 16:05, Greg KH wrote: > > > > > > On Fri, Apr 02, 2021 at 04:06:37PM +0200, Loic Poulain wrote: > > > > The MHI

Re: [PATCH net-next v8 2/2] net: Add Qcom WWAN control driver

2021-04-02 Thread Loic Poulain
On Fri, 2 Apr 2021 at 16:05, Greg KH wrote: > > On Fri, Apr 02, 2021 at 04:06:37PM +0200, Loic Poulain wrote: > > The MHI WWWAN control driver allows MHI QCOM-based modems to expose > > different modem control protocols/ports via the WWAN framework, so that > > userspa

[PATCH net-next v8 2/2] net: Add Qcom WWAN control driver

2021-04-02 Thread Loic Poulain
for controlling a modem, and for which related opensource userpace support exist. Signed-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to dedicated drivers/net/wwan directory v4: Rework to use wwan framework instead of self cdev management v5: Fix errors/typos in

[PATCH net-next v8 1/2] net: Add a WWAN subsystem

2021-04-02 Thread Loic Poulain
work, but the implementation is open and flexible enough to allow extension for further drivers. Signed-off-by: Loic Poulain --- v2: not part of the series v3: not part of the series v4: Introduce WWAN framework/subsystem v5: Specify WWAN_CORE module name in Kconfig v6: - Move to unified

Re: [PATCH net-next v6 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Loic Poulain
On Wed, 31 Mar 2021 at 16:54, Greg KH wrote: > > On Wed, Mar 31, 2021 at 01:35:04PM +0200, Loic Poulain wrote: > > Hi Greg, > > > > On Wed, 31 Mar 2021 at 12:44, Greg KH wrote: > > > > > > On Wed, Mar 31, 2021 at 12:39:09PM +0200, Loic Poulain wro

Re: [PATCH net-next v6 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Loic Poulain
Hi Greg, On Wed, 31 Mar 2021 at 12:44, Greg KH wrote: > > On Wed, Mar 31, 2021 at 12:39:09PM +0200, Loic Poulain wrote: > > This change introduces initial support for a WWAN subsystem. Given the > > complexity and heterogeneity of existing WWAN hardwares and interfaces, >

[PATCH net-next v7 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Loic Poulain
but the implementation is open and flexible enough to allow extension for further drivers. Signed-off-by: Loic Poulain --- v2: not part of the series v3: not part of the series v4: Introduce WWAN framework/subsystem v5: Specify WWAN_CORE module name in Kconfig v6: - Move to unified wwan_core.

[PATCH net-next v7 2/2] net: Add Qcom WWAN control driver

2021-03-31 Thread Loic Poulain
for accessing MHI bus from userspace. As suggested, this new version is WWAN specific and is dedicated to only expose channels used for controlling a modem, and for which related opensource userpace support exist. Signed-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to

[PATCH net-next v6 2/2] net: Add Qcom WWAN control driver

2021-03-31 Thread Loic Poulain
for accessing MHI bus from userspace. As suggested, this new version is WWAN specific and is dedicated to only expose channels used for controlling a modem, and for which related opensource userpace support exist. Signed-off-by: Loic Poulain --- v2: not part of the series v3: not part of the

[PATCH net-next v6 1/2] net: Add a WWAN subsystem

2021-03-31 Thread Loic Poulain
but the implementation is open and flexible enough to allow extension for further drivers. Signed-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to dedicated drivers/net/wwan directory v4: Rework to use wwan framework instead of self cdev management v5: Fix errors/typos

[PATCH] net: qrtr: Fix memory leak on qrtr_tx_wait failure

2021-03-30 Thread Loic Poulain
ot+739016799a89c530b...@syzkaller.appspotmail.com Signed-off-by: Loic Poulain --- net/qrtr/qrtr.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c index f4ab3ca6..a01b50c7 100644 --- a/net/qrtr/qrtr.c +++ b/net/qrtr/qrtr.c @@ -271,7 +

[PATCH net-next v3 1/2] net: mhi: Add support for non-linear MBIM skb processing

2021-03-29 Thread Loic Poulain
' non-linear MBIM packets without skb linearization. The IP packets are simply extracted from the MBIM frame using the skb_copy_bits helper. Signed-off-by: Loic Poulain --- v2: added to the series for reducing chained skb processing overhead v3: Fix missing net_err_ratelimited print param (

[PATCH net-next v3 2/2] net: mhi: Allow decoupled MTU/MRU

2021-03-29 Thread Loic Poulain
specified is used to allocate MHI RX buffers (skb). For MBIM, Set the default MTU to 1500, which is the usual network MTU for WWAN IP packets, and MRU to 3.5K (for allocation efficiency), allowing skb to fit in an usual 4K page (including padding, skb_shared_info, ...). Signed-off-by: Lo

[PATCH net-next v2 2/2] net: mhi: Allow decoupled MTU/MRU

2021-03-29 Thread Loic Poulain
specified is used to allocate MHI RX buffers (skb). For MBIM, Set the default MTU to 1500, which is the usual network MTU for WWAN IP packets, and MRU to 3.5K (for allocation efficiency), allowing skb to fit in an usual 4K page (including padding, skb_shared_info, ...). Signed-off-by: Loic Poulai

[PATCH net-next v2 1/2] net: mhi: Add support for non-linear MBIM skb processing

2021-03-29 Thread Loic Poulain
' non-linear MBIM packets without skb linearization. The IP packets are simply extracted from the MBIM frame using the skb_copy_bits helper. Signed-off-by: Loic Poulain --- v2: added to the series for reducing chained skb processing overhead drivers/net/mhi/proto_m

[RESEND PATCH net-next 1/2] net: mhi: Allow decoupled MTU/MRU

2021-03-23 Thread Loic Poulain
If a maximum receive unit (MRU) size is specified, use it for RX buffers allocation instead of the MTU. Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 1 + drivers/net/mhi/net.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mhi/mhi.h b/drivers/net

[RESEND PATCH net-next 2/2] net: mhi: proto_mbim: Adjust MTU and MRU

2021-03-23 Thread Loic Poulain
size of MBIM-over-MHI packets. Signed-off-by: Loic Poulain --- drivers/net/mhi/proto_mbim.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/mhi/proto_mbim.c b/drivers/net/mhi/proto_mbim.c index 75b5484..29d8577 100644 --- a/drivers/net/mhi/proto_mbim.c +++ b/drivers/net/mhi

Re: [PATCH net-next v5 1/2] net: Add a WWAN subsystem

2021-03-12 Thread Loic Poulain
Hi Greg, On Fri, 12 Mar 2021 at 07:56, Greg KH wrote: > > On Thu, Mar 11, 2021 at 09:41:03PM +0100, Loic Poulain wrote: > > This change introduces initial support for a WWAN subsystem. Given the > > complexity and heterogeneity of existing WWAN hardwares and interfaces, >

Re: [PATCH net-next v5 2/2] net: Add Qcom WWAN control driver

2021-03-12 Thread Loic Poulain
Hi Greg, On Fri, 12 Mar 2021 at 09:16, Greg KH wrote: > > On Thu, Mar 11, 2021 at 09:41:04PM +0100, Loic Poulain wrote: > > The MHI WWWAN control driver allows MHI QCOM-based modems to expose > > different modem control protocols/ports to userspace, so that userspace > &g

[PATCH net-next v5 2/2] net: Add Qcom WWAN control driver

2021-03-11 Thread Loic Poulain
subsystem (when available) or to be discussed as a new MHI driver (e.g AI accelerator, WiFi debug channels, etc...). Signed-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to dedicated drivers/net/wwan directory v4: Rework to use wwan framework instead of self cdev

[PATCH net-next v5 1/2] net: Add a WWAN subsystem

2021-03-11 Thread Loic Poulain
the implementation is open and flexible enough to allow extension for further drivers. Signed-off-by: Loic Poulain --- v2: not part of the series v3: not part of the series v4: Introduce WWAN framework/subsystem v5: Specify WWAN_CORE module name in Kconfig drivers/net/Kconfig

Re: [PATCH net-next v4 1/2] net: Add a WWAN subsystem

2021-03-11 Thread Loic Poulain
On Thu, 11 Mar 2021 at 17:48, Greg KH wrote: > > On Thu, Mar 11, 2021 at 05:39:05PM +0100, Loic Poulain wrote: > > This change introduces initial support for a WWAN subsystem. Given the > > complexity and heterogeneity of existing WWAN hardwares and interfaces, > > there

[PATCH net-next v4 2/2] net: Add Qcom WWAN control driver

2021-03-11 Thread Loic Poulain
subsystem (when available) or to be discussed as a new MHI driver (e.g AI accelerator, WiFi debug channels, etc...). Signed-off-by: Loic Poulain --- drivers/net/wwan/Kconfig | 14 ++ drivers/net/wwan/Makefile| 1 + drivers/net/wwan/mhi_wwan_ctrl.c | 497

[PATCH net-next v4 1/2] net: Add a WWAN subsystem

2021-03-11 Thread Loic Poulain
the implementation is open and flexible enough to allow extension for further drivers. Signed-off-by: Loic Poulain --- drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/wwan/Kconfig | 19 ++ drivers/net/wwan/Makefile| 8 +++ driv

Re: [PATCH net-next v3] net: Add Qcom WWAN control driver

2021-03-09 Thread Loic Poulain
Hi Greg, On Tue, 9 Mar 2021 at 10:35, Greg KH wrote: > > On Tue, Mar 09, 2021 at 09:42:16AM +0100, Loic Poulain wrote: > > The MHI WWWAN control driver allows MHI Qcom based modems to expose > > different modem control protocols/ports to userspace, so that userspace > &g

[PATCH net-next v3] net: Add Qcom WWAN control driver

2021-03-09 Thread Loic Poulain
ned-off-by: Loic Poulain --- v2: update copyright (2021) v3: Move driver to dedicated drivers/net/wwan directory drivers/net/Kconfig | 2 + drivers/net/Makefile | 1 + drivers/net/wwan/Kconfig | 26 ++ drivers/net/wwan/Makefile| 6 + driver

Re: [PATCH v2] bus: mhi: Add Qcom WWAN control driver

2021-03-09 Thread Loic Poulain
On Tue, 9 Mar 2021 at 09:19, Greg KH wrote: > > On Mon, Mar 08, 2021 at 09:59:27PM +0100, Loic Poulain wrote: > > The MHI WWWAN control driver allows MHI Qcom based modems to expose > > different modem control protocols to userspace, so that userspace > > modem tools or d

[PATCH v2] bus: mhi: Add Qcom WWAN control driver

2021-03-08 Thread Loic Poulain
to be discussed as a new MHI driver (e.g AI accelerator, WiFi debug channels, etc...). Co-developed-by: Hemant Kumar Signed-off-by: Hemant Kumar Signed-off-by: Loic Poulain --- v2: update copyright (2021) drivers/bus/mhi/Kconfig | 12 + drivers/bus/mhi/Makefile| 3 + drivers/bus

[PATCH net-next 2/2] net: mhi: proto_mbim: Adjust MTU and MRU

2021-03-01 Thread Loic Poulain
size of MBIM-over-MHI packets. Signed-off-by: Loic Poulain --- drivers/net/mhi/proto_mbim.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/mhi/proto_mbim.c b/drivers/net/mhi/proto_mbim.c index 75b5484..29d8577 100644 --- a/drivers/net/mhi/proto_mbim.c +++ b/drivers/net/mhi

[PATCH net-next 1/2] net: mhi: Allow decoupled MTU/MRU

2021-03-01 Thread Loic Poulain
If a maximum receive unit (MRU) size is specified, use it for RX buffers allocation instead of the MTU. Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 1 + drivers/net/mhi/net.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/mhi/mhi.h b/drivers/net

[PATCH net-next v5 4/5] net: mhi: Add rx_length_errors stat

2021-02-09 Thread Loic Poulain
This can be used by proto when packet len is incorrect. Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 1 + drivers/net/mhi/net.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/mhi/mhi.h b/drivers/net/mhi/mhi.h index 5050e4a..82210e0 100644 --- a/drivers/net/mhi

[PATCH net-next v5 5/5] net: mhi: Add mbim proto

2021-02-09 Thread Loic Poulain
no support for DSS. Moreover the multi-session (for multi-pdn) is not supported in this initial version, but will be added latter, and aligned with the cdc-mbim solution (VLAN tags). This code has been inspired from the mhi_mbim downstream implementation (Carl Yin ). Signed-off-by: Loic Poulain

[PATCH net-next v5 0/5] Add MBIM over MHI support

2021-02-09 Thread Loic Poulain
ess parens pair v5: - fix sparse issue reported by Jakub: proto_mbim.c:159:41: warning: restricted __le32 degrades to integer => use explicit endianess accessors for all values. Loic Poulain (5): net: mhi: Add protocol support net: mhi: Add dedicated folder net: mhi: Create mhi

[PATCH net-next v5 3/5] net: mhi: Create mhi.h

2021-02-09 Thread Loic Poulain
Move mhi-net shared structures to mhi header, that will be used by upcoming proto(s). Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 36 drivers/net/mhi/net.c | 33 ++--- 2 files changed, 38 insertions(+), 31 deletions

[PATCH net-next v5 2/5] net: mhi: Add dedicated folder

2021-02-09 Thread Loic Poulain
Create a dedicated mhi directory for mhi-net, mhi-net is going to be split into differente files (for additional protocol support). Signed-off-by: Loic Poulain --- drivers/net/Makefile | 2 +- drivers/net/mhi/Makefile | 3 + drivers/net/mhi/net.c| 429

[PATCH net-next v5 1/5] net: mhi: Add protocol support

2021-02-09 Thread Loic Poulain
protocol. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 69 ++- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index 8800991..b92c2e1 100644 --- a/drivers/net/mhi_net.c +++ b/drivers

[PATCH net-next v4 3/5] net: mhi: Create mhi.h

2021-02-07 Thread Loic Poulain
Move mhi-net shared structures to mhi header, that will be used by upcoming proto(s). Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 36 drivers/net/mhi/net.c | 33 ++--- 2 files changed, 38 insertions(+), 31 deletions

[PATCH net-next v4 5/5] net: mhi: Add mbim proto

2021-02-07 Thread Loic Poulain
no support for DSS. Moreover the multi-session (for multi-pdn) is not supported in this initial version, but will be added latter, and aligned with the cdc-mbim solution (VLAN tags). This code has been inspired from the mhi_mbim downstream implementation (Carl Yin ). Signed-off-by: Loic Poulain

[PATCH net-next v4 4/5] net: mhi: Add rx_length_errors stat

2021-02-07 Thread Loic Poulain
This can be used by proto when packet len is incorrect. Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 1 + drivers/net/mhi/net.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/mhi/mhi.h b/drivers/net/mhi/mhi.h index 5050e4a..82210e0 100644 --- a/drivers/net/mhi

[PATCH net-next v4 2/5] net: mhi: Add dedicated folder

2021-02-07 Thread Loic Poulain
Create a dedicated mhi directory for mhi-net, mhi-net is going to be split into differente files (for additional protocol support). Signed-off-by: Loic Poulain --- drivers/net/Makefile | 2 +- drivers/net/mhi/Makefile | 3 + drivers/net/mhi/net.c| 429

[PATCH net-next v4 1/5] net: mhi: Add protocol support

2021-02-07 Thread Loic Poulain
protocol. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 69 ++- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index 8800991..b92c2e1 100644 --- a/drivers/net/mhi_net.c +++ b/drivers

[PATCH net-next v4 0/5] Add MBIM over MHI support

2021-02-07 Thread Loic Poulain
ess parens pair *** BLURB HERE *** Loic Poulain (5): net: mhi: Add protocol support net: mhi: Add dedicated folder net: mhi: Create mhi.h net: mhi: Add rx_length_errors stat net: mhi: Add mbim proto drivers/net/Makefile | 2 +- drivers/net/mhi/Makefile | 3 + drivers/net

Re: [PATCH net-next v3 0/5] Add MBIM over MHI support

2021-02-04 Thread Loic Poulain
Hi Jakub, On Thu, 4 Feb 2021 at 19:09, Loic Poulain wrote: > > This patch adds MBIM decoding/encoding support to mhi-net, using > mhi-net rx and tx_fixup 'proto' callbacks introduced in the series. This series has been rebased on top of the recently submitted: [PATCH n

[PATCH net-next v3 2/5] net: mhi: Add dedicated folder

2021-02-04 Thread Loic Poulain
Create a dedicated mhi directory for mhi-net, mhi-net is going to be split into differente files (for additional protocol support). Signed-off-by: Loic Poulain --- drivers/net/Makefile | 2 +- drivers/net/mhi/Makefile | 3 + drivers/net/mhi/net.c| 429

[PATCH net-next v3 5/5] net: mhi: Add mbim proto

2021-02-04 Thread Loic Poulain
no support for DSS. Moreover the multi-session (for multi-pdn) is not supported in this initial version, but will be added latter, and aligned with the cdc-mbim solution (VLAN tags). This code has been inspired from the mhi_mbim downstream implementation (Carl Yin ). Signed-off-by: Loic Poulain

[PATCH net-next v3 1/5] net: mhi: Add protocol support

2021-02-04 Thread Loic Poulain
protocol. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 69 ++- 1 file changed, 57 insertions(+), 12 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index 8800991..b92c2e1 100644 --- a/drivers/net/mhi_net.c +++ b/drivers

[PATCH net-next v3 3/5] net: mhi: Create mhi.h

2021-02-04 Thread Loic Poulain
Move mhi-net shared structures to mhi header, that will be used by upcoming proto(s). Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 36 drivers/net/mhi/net.c | 33 ++--- 2 files changed, 38 insertions(+), 31 deletions

[PATCH net-next v3 0/5] Add MBIM over MHI support

2021-02-04 Thread Loic Poulain
unecessary parenthesis - mbim: report errors and rx_length_errors - mbim: rate_limited errors in rx/tx path - mbim: create define for NDP signature mask - mbim: switch-case to if for signature check - mbim: skb_cow_head() to fix headroom if necessary Loic Poulain (5): net: mhi: Ad

[PATCH net-next v3 4/5] net: mhi: Add rx_length_errors stat

2021-02-04 Thread Loic Poulain
This can be used by proto when packet len is incorrect. Signed-off-by: Loic Poulain --- drivers/net/mhi/mhi.h | 1 + drivers/net/mhi/net.c | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/net/mhi/mhi.h b/drivers/net/mhi/mhi.h index 5050e4a..82210e0 100644 --- a/drivers/net/mhi

[PATCH net-next v5 1/2] net: mhi-net: Add re-aggregation of fragmented packets

2021-02-04 Thread Loic Poulain
of the device (e.g. modem MTU). Signed-off-by: Loic Poulain --- v2: use zero-copy skb chaining instead of skb_copy_expand. v3: Fix nit in commit msg + remove misleading inline comment for frag_list v4: no change v5: reword/fix commit subject drivers/net/mhi_net.c | 74

[PATCH net-next v5 2/2] net: qualcomm: rmnet: Fix rx_handler for non-linear skbs

2021-02-04 Thread Loic Poulain
There is no guarantee that rmnet rx_handler is only fed with linear skbs, but current rmnet implementation does not check that, leading to crash in case of non linear skbs processed as linear ones. Fix that by ensuring skb linearization before processing. Signed-off-by: Loic Poulain Acked-by

Re: [PATCH net-next v4 1/2] net: mhi-net: Add de-aggeration support

2021-02-03 Thread Loic Poulain
Hi Jesse, On Thu, 4 Feb 2021 at 00:16, Jesse Brandeburg wrote: > > Loic Poulain wrote: > > > When device side MTU is larger than host side MTU, the packets > > (typically rmnet packets) are split over multiple MHI transfers. > > In that case, fragments must be re-aggre

Re: [PATCH net-next v2 1/3] net: mhi: Add RX/TX fixup callbacks

2021-02-03 Thread Loic Poulain
Hi Jakub, On Thu, 4 Feb 2021 at 00:08, Jakub Kicinski wrote: > > Please put the maintainers or the list thru which you expect the patch > to be applied in the To: field of your emails. > > On Mon, 1 Feb 2021 22:05:40 +0100 Loic Poulain wrote: > > + if (pro

Re: [RESEND PATCH v18 0/3] userspace MHI client interface driver

2021-02-03 Thread Loic Poulain
Hi Jakub, On Wed, 3 Feb 2021 at 19:05, Jakub Kicinski wrote: > > On Wed, 03 Feb 2021 09:45:06 +0530 Manivannan Sadhasivam wrote: > > >> Jakub, Dave, Adding you both to get your reviews on this series. I've > > >> provided an explanation above and in the previous iteration [1]. > > > > > >Let's be

[PATCH net-next v4 2/2] net: qualcomm: rmnet: Fix rx_handler for non-linear skbs

2021-02-03 Thread Loic Poulain
There is no guarantee that rmnet rx_handler is only fed with linear skbs, but current rmnet implementation does not check that, leading to crash in case of non linear skbs processed as linear ones. Fix that by ensuring skb linearization before processing. Signed-off-by: Loic Poulain Acked-by

[PATCH net-next v4 1/2] net: mhi-net: Add de-aggeration support

2021-02-03 Thread Loic Poulain
of the device (e.g. modem MTU). Signed-off-by: Loic Poulain --- v2: use zero-copy skb chaining instead of skb_copy_expand. v3: Fix nit in commit msg + remove misleading inline comment for frag_list v4: no change drivers/net/mhi_net.c | 74 --- 1

Re: [PATCH net-next v3 2/2] net: qualcomm: rmnet: Fix rx_handler for non-linear skbs

2021-02-03 Thread Loic Poulain
On Wed, 3 Feb 2021 at 15:04, Willem de Bruijn wrote: > > On Wed, Feb 3, 2021 at 8:17 AM Loic Poulain wrote: > > > > There is no guarantee that rmnet rx_handler is only fed with linear > > skbs, but current rmnet implementation does not check that, leading > > to cr

[PATCH net-next v3 2/2] net: qualcomm: rmnet: Fix rx_handler for non-linear skbs

2021-02-03 Thread Loic Poulain
There is no guarantee that rmnet rx_handler is only fed with linear skbs, but current rmnet implementation does not check that, leading to crash in case of non linear skbs processed as linear ones. Fix that by ensuring skb linearization before processing. Signed-off-by: Loic Poulain Acked-by

[PATCH net-next v3 1/2] net: mhi-net: Add de-aggeration support

2021-02-03 Thread Loic Poulain
of the device (e.g. modem MTU). Signed-off-by: Loic Poulain --- v2: use zero-copy skb chaining instead of skb_copy_expand. v3: Fix nit in commit msg + remove misleading inline comment for frag_list drivers/net/mhi_net.c | 74 --- 1 file changed

Re: [PATCH net-next v2 1/2] net: mhi-net: Add de-aggeration support

2021-02-02 Thread Loic Poulain
Hi Willem, On Tue, 2 Feb 2021 at 23:45, Willem de Bruijn wrote: > > On Tue, Feb 2, 2021 at 11:08 AM Loic Poulain wrote: > > > > When device side MTU is larger than host side MTU, the packets > > (typically rmnet packets) are split over multiple MHI transfers. > > I

[PATCH net-next v2 2/2] net: qualcomm: rmnet: Fix rx_handler for non-linear skbs

2021-02-02 Thread Loic Poulain
There is no guarantee that rmnet rx_handler is only fed with linear skbs, but current rmnet implementation does not check that, leading to crash in case of non linear skbs processed as linear ones. Fix that by ensuring skb linearization before processing. Signed-off-by: Loic Poulain --- v2

[PATCH net-next v2 1/2] net: mhi-net: Add de-aggeration support

2021-02-02 Thread Loic Poulain
of the device (e.g. modem MTU). Signed-off-by: Loic Poulain --- v2: use zero-copy skb chaining instead of skb_copy_expand. drivers/net/mhi_net.c | 79 --- 1 file changed, 69 insertions(+), 10 deletions(-) diff --git a/drivers/net/mhi_net.c b

[PATCH net-next v2 2/3] net: mhi: Add dedicated folder

2021-02-01 Thread Loic Poulain
Create a dedicated mhi directory for mhi-net, mhi-net is going to be split into differente files (for additional protocol support). Signed-off-by: Loic Poulain --- v2: no change drivers/net/Makefile | 2 +- drivers/net/mhi/Makefile | 3 + drivers/net/mhi/net.c| 376

[PATCH net-next v2 3/3] net: mhi: Add mbim proto

2021-02-01 Thread Loic Poulain
no support for DSS. Moreover the multi-session (for multi-pdn) is not supported in this initial version, but will be added latter, and aligned with the cdc-mbim solution (VLAN tags). This code has been inspired from the mhi_mbim downstream implementation (Carl Yin ). Signed-off-by: Loic Poulain

[PATCH net-next v2 1/3] net: mhi: Add RX/TX fixup callbacks

2021-02-01 Thread Loic Poulain
. Signed-off-by: Loic Poulain --- v2: mhi_net_dev as rx/tx_fixup parameter drivers/net/mhi_net.c | 70 ++- 1 file changed, 58 insertions(+), 12 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index 4f512531..34d4bcf 100644

Re: [PATCH net-next 3/3] net: mhi: Add mbim proto

2021-02-01 Thread Loic Poulain
On Mon, 1 Feb 2021 at 19:53, Dan Williams wrote: > > On Mon, 2021-02-01 at 19:27 +0100, Loic Poulain wrote: > > On Mon, 1 Feb 2021 at 19:17, Dan Williams wrote: > > > On Fri, 2021-01-29 at 18:21 -0800, Jakub Kicinski wrote: > > > > On Wed, 27 Jan 2021

Re: [PATCH net-next 3/3] net: mhi: Add mbim proto

2021-02-01 Thread Loic Poulain
On Mon, 1 Feb 2021 at 19:17, Dan Williams wrote: > > On Fri, 2021-01-29 at 18:21 -0800, Jakub Kicinski wrote: > > On Wed, 27 Jan 2021 18:01:17 +0100 Loic Poulain wrote: > > > MBIM has initially been specified by USB-IF for transporting data > > > (IP) > > &

Re: [PATCH net-next] net: mhi-net: Add de-aggeration support

2021-02-01 Thread Loic Poulain
On Mon, 1 Feb 2021 at 15:24, Willem de Bruijn wrote: > > On Mon, Feb 1, 2021 at 3:08 AM Loic Poulain wrote: > > > > Hi Jakub, Willem, > > > > On Sat, 30 Jan 2021 at 02:01, Jakub Kicinski wrote: > > > > > > On Mon, 25 Jan 2021 16:45:57 +0100 Loi

Re: [PATCH net-next 3/3] net: mhi: Add mbim proto

2021-02-01 Thread Loic Poulain
On Sat, 30 Jan 2021 at 15:42, Bjørn Mork wrote: > > Loic Poulain writes: > > > MBIM has initially been specified by USB-IF for transporting data (IP) > > between a modem and a host over USB. However some modern modems also > > support MBIM over PCIe (via MHI). In the

Re: [PATCH net-next] net: mhi-net: Add de-aggeration support

2021-02-01 Thread Loic Poulain
Hi Jakub, Willem, On Sat, 30 Jan 2021 at 02:01, Jakub Kicinski wrote: > > On Mon, 25 Jan 2021 16:45:57 +0100 Loic Poulain wrote: > > When device side MTU is larger than host side MRU, the packets > > (typically rmnet packets) are split over multiple MHI transfers. > >

pull-request: mhi-net changes for net-next

2021-01-28 Thread Loic Poulain
) Hemant Kumar (1): bus: mhi: core: Add helper API to return number of free TREs Loic Poulain (3): Merge branch 'mhi-net-immutable' of https://git.kernel.org/.../mani/mhi into HEAD net: mhi: Get RX queue size from MHI core net: mhi: Get rid of local rx queue count d

[PATCH net-next 3/3] net: mhi: Add mbim proto

2021-01-27 Thread Loic Poulain
or dedicated MBIM netlink virtual interface support. This code has been highly inspired from the mhi_mbim downstream driver (Carl Yin ). Signed-off-by: Loic Poulain --- drivers/net/mhi/Makefile | 2 +- drivers/net/mhi/mhi.h| 39 drivers/net/mhi/net.c| 41

[PATCH net-next 2/3] net: mhi: Add dedicated folder

2021-01-27 Thread Loic Poulain
Create a dedicated mhi directory for mhi-net, mhi-net is going to be split into differente files (for additional protocol support). Signed-off-by: Loic Poulain --- drivers/net/Makefile | 2 +- drivers/net/mhi/Makefile | 3 + drivers/net/mhi/net.c| 379

[PATCH net-next 1/3] net: mhi: Add RX/TX fixup callbacks

2021-01-27 Thread Loic Poulain
. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 70 ++- 1 file changed, 58 insertions(+), 12 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index a5a214d..aa3a5e0 100644 --- a/drivers/net/mhi_net.c +++ b/drivers/net

[PATCH net-next] net: mhi-net: Add de-aggeration support

2021-01-26 Thread Loic Poulain
misconfiguration of the device (modem). Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 74 --- 1 file changed, 64 insertions(+), 10 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index a5a214d..780086f 100644 --- a/drivers

[PATCH v2 net-next] net: mhi: Set wwan device type

2021-01-22 Thread Loic Poulain
The 'wwan' devtype is meant for devices that require additional configuration to be used, like WWAN specific APN setup over AT/QMI commands, rmnet link creation, etc. This is the case for MHI (Modem host Interface) netdev which targets modem/WWAN endpoints. Signed-off-by: Loic Poulai

[PATCH] wcn36xx: del BA session on TX stop

2021-01-22 Thread Loic Poulain
Deleting BA session was not correcly performed, causing communication issues with APs that dynamically stop/start new BA sessions. Signed-off-by: Loic Poulain --- drivers/net/wireless/ath/wcn36xx/main.c | 3 ++- drivers/net/wireless/ath/wcn36xx/smd.c | 4 ++-- drivers/net/wireless/ath/wcn36xx

[PATCH net-next] net: mhi: Set wwan device type

2021-01-20 Thread Loic Poulain
The 'wwan' devtype is meant for devices that require additional configuration to be used, like WWAN specific APN setup over AT/QMI commands, rmnet link creation, etc. This is the case for MHI (Modem host Interface) netdev which targets modem/WWAN endpoints. Signed-off-by: Lo

[PATCH net-next 3/3] net: mhi: Get rid of local rx queue count

2021-01-11 Thread Loic Poulain
Use the new mhi_get_free_desc_count helper to track queue usage instead of relying on the locally maintained rx_queued count. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers

[PATCH net-next 2/3] net: mhi: Get RX queue size from MHI core

2021-01-11 Thread Loic Poulain
The RX queue size can be determined at runtime by retrieving the number of available transfer descriptors. Signed-off-by: Loic Poulain --- drivers/net/mhi_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/mhi_net.c b/drivers/net/mhi_net.c index b7f7f2e

[PATCH net-next 1/3] bus: mhi: core: Add helper API to return number of free TREs

2021-01-11 Thread Loic Poulain
From: Hemant Kumar Introduce mhi_get_free_desc_count() API to return number of TREs available to queue buffer. MHI clients can use this API to know before hand if ring is full without calling queue API. Signed-off-by: Hemant Kumar Reviewed-by: Jeffrey Hugo Reviewed-by: Manivannan Sadhasivam -

[PATCH] bus: mhi: Add inbound buffers allocation flag

2021-01-06 Thread Loic Poulain
allowing to specify if buffers have to be allocated and queued by the MHI stack. Keep auto_queue flag for now, but should be removed at some point. Signed-off-by: Loic Poulain --- drivers/bus/mhi/core/internal.h | 2 +- drivers/bus/mhi/core/main.c | 11 --- drivers/net/mhi_net.c

[PATCH net-next v3] net: mhi: Add raw IP mode support

2020-12-29 Thread Loic Poulain
MHI net is protocol agnostic, the payload protocol depends on the modem configuration, which can be either RMNET (IP muxing and aggregation) or raw IP. This patch adds support for incomming IPv4/IPv6 packets, that was previously unconditionnaly reported as RMNET packets. Signed-off-by: Loic

Re: [PATCH] net: mhi: Add raw IP mode support

2020-12-17 Thread Loic Poulain
On Wed, 16 Dec 2020 at 20:20, Jakub Kicinski wrote: > > On Mon, 14 Dec 2020 17:12:24 +0100 Loic Poulain wrote: > > MHI net is protocol agnostic, the payload protocol depends on the modem > > configuration, which can be either RMNET (IP muxing and aggregation) or > >

Re: [PATCH v18 0/3] userspace MHI client interface driver

2020-12-16 Thread Loic Poulain
Hi Folks, On Fri, 11 Dec 2020 at 20:45, Hemant Kumar wrote: > > This patch series adds support for UCI driver. UCI driver enables userspace > clients to communicate to external MHI devices like modem. UCI driver probe > creates standard character device file nodes for userspace clients to > perfo

Re: [PATCH v2 3/3] net: mhi: Add dedicated alloc thread

2020-12-15 Thread Loic Poulain
Hi Jakub, On Mon, 14 Dec 2020 at 20:47, Jakub Kicinski wrote: > > On Mon, 14 Dec 2020 10:19:07 +0100 Loic Poulain wrote: > > On Sat, 12 Dec 2020 at 21:55, Jakub Kicinski wrote: > > > On Thu, 10 Dec 2020 12:15:51 +0100 Loic Poulain wrote: > > > > The buffer al

[PATCH] net: mhi: Add raw IP mode support

2020-12-14 Thread Loic Poulain
MHI net is protocol agnostic, the payload protocol depends on the modem configuration, which can be either RMNET (IP muxing and aggregation) or raw IP. This patch adds support for incomming IPv4/IPv6 packets, that was previously unconditionnaly reported as RMNET packets. Signed-off-by: Loic

Re: [PATCH v2 3/3] net: mhi: Add dedicated alloc thread

2020-12-14 Thread Loic Poulain
Hi Jakub, On Sat, 12 Dec 2020 at 21:55, Jakub Kicinski wrote: > > On Thu, 10 Dec 2020 12:15:51 +0100 Loic Poulain wrote: > > The buffer allocation for RX path is currently done by a work executed > > in the system workqueue. The work to do is quite simple and consists > &

Re: [PATCH v2 2/3] net: mhi: Get RX queue size from MHI core

2020-12-11 Thread Loic Poulain
On Fri, 11 Dec 2020 at 11:15, Manivannan Sadhasivam wrote: > > On Fri, Dec 11, 2020 at 10:40:13AM +0100, Loic Poulain wrote: > > Hi Mani, > > > > On Fri, 11 Dec 2020 at 06:38, Manivannan Sadhasivam > > wrote: > > > > > > On Thu, Dec 10, 2020 at 1

Re: [PATCH v2 2/3] net: mhi: Get RX queue size from MHI core

2020-12-11 Thread Loic Poulain
Hi Mani, On Fri, 11 Dec 2020 at 06:38, Manivannan Sadhasivam wrote: > > On Thu, Dec 10, 2020 at 12:15:50PM +0100, Loic Poulain wrote: > > The RX queue size can be determined at runtime by retrieving the > > number of available transfer descriptors. > > > &g

  1   2   >