[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230313160837.77f4ced0@kernel.org>
Date: Mon, 13 Mar 2023 16:08:37 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: <haozhe.chang@...iatek.com>
Cc: M Chetan Kumar <m.chetan.kumar@...el.com>,
Intel Corporation <linuxwwan@...el.com>,
Loic Poulain <loic.poulain@...aro.org>,
Sergey Ryazanov <ryazanov.s.a@...il.com>,
Johannes Berg <johannes@...solutions.net>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>,
Stephan Gerhold <stephan@...hold.net>,
Chandrashekar Devegowda <chandrashekar.devegowda@...el.com>,
Chiranjeevi Rapolu <chiranjeevi.rapolu@...ux.intel.com>,
Liu Haijun <haijun.liu@...iatek.com>,
Ricardo Martinez <ricardo.martinez@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Oliver Neukum <oneukum@...e.com>,
Shang XiaoJing <shangxiaojing@...wei.com>,
"open list:INTEL WWAN IOSM DRIVER" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>,
"open list:REMOTE PROCESSOR MESSAGING (RPMSG) WWAN CONTROL..."
<linux-remoteproc@...r.kernel.org>,
"open list:USB SUBSYSTEM" <linux-usb@...r.kernel.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-arm-kernel@...ts.infradead.org>,
"moderated list:ARM/Mediatek SoC support"
<linux-mediatek@...ts.infradead.org>, <lambert.wang@...iatek.com>,
<xiayu.zhang@...iatek.com>, <hua.yang@...iatek.com>
Subject: Re: [PATCH RESEND net-next v7] wwan: core: Support slicing in port
TX flow of WWAN subsystem
On Wed, 8 Mar 2023 16:19:35 +0800 haozhe.chang@...iatek.com wrote:
> /**
> * wwan_create_port - Add a new WWAN port
> * @parent: Device to use as parent and shared by all WWAN ports
> * @type: WWAN port type
> * @ops: WWAN port operations
> + * @frag_len: WWAN port TX fragments length, if WWAN_NO_FRAGMENT is set,
> + * the WWAN core don't fragment control packages.
> + * @headroom_len: WWAN port TX fragments reserved headroom length, if WWAN_NO_HEADROOM
> + * is set, the WWAN core don't reserve headroom in control packages.
> * @drvdata: Pointer to caller driver data
> *
> * Allocate and register a new WWAN port. The port will be automatically exposed
> @@ -86,6 +100,8 @@ struct wwan_port_ops {
> struct wwan_port *wwan_create_port(struct device *parent,
> enum wwan_port_type type,
> const struct wwan_port_ops *ops,
> + size_t frag_len,
> + unsigned int headroom_len,
> void *drvdata);
>
Too many arguments, and poor extensibility.
Please wrap the new params into a capability struct:
struct wwan_port_caps {
unsigned int frag_len;
unsigned int headroom_len;
};
pass a pointer to this kind of structure in.
Next time someone needs to add a quirk they can just add a field and
won't need to change all the drivers.
Powered by blists - more mailing lists