diff mbox series

[v2,40/43] wifi: nxpwifi: add wmm.h

Message ID 20240809094533.1660-41-yu-hao.lin@nxp.com
State New
Headers show
Series wifi: nxpwifi: create nxpwifi to support iw61x | expand

Commit Message

David Lin Aug. 9, 2024, 9:45 a.m. UTC
---
 drivers/net/wireless/nxp/nxpwifi/wmm.h | 78 ++++++++++++++++++++++++++
 1 file changed, 78 insertions(+)
 create mode 100644 drivers/net/wireless/nxp/nxpwifi/wmm.h

Comments

Greg KH Aug. 14, 2024, 6:48 p.m. UTC | #1
On Fri, Aug 09, 2024 at 05:45:30PM +0800, David Lin wrote:
> ---
>  drivers/net/wireless/nxp/nxpwifi/wmm.h | 78 ++++++++++++++++++++++++++
>  1 file changed, 78 insertions(+)
>  create mode 100644 drivers/net/wireless/nxp/nxpwifi/wmm.h


Hi,

This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him
a patch that has triggered this response.  He used to manually respond
to these common problems, but in order to save his sanity (he kept
writing the same thing over and over, yet to different people), I was
created.  Hopefully you will not take offence and will fix the problem
in your patch and resubmit it so that it can be accepted into the Linux
kernel tree.

You are receiving this message because of the following common error(s)
as indicated below:

- Your patch does not have a Signed-off-by: line.  Please read the
  kernel file, Documentation/process/submitting-patches.rst and resend
  it after adding that line.  Note, the line needs to be in the body of
  the email, before the patch, not at the bottom of the patch or in the
  email signature.

- You did not specify a description of why the patch is needed, or
  possibly, any description at all, in the email body.  Please read the
  section entitled "The canonical patch format" in the kernel file,
  Documentation/process/submitting-patches.rst for what is needed in
  order to properly describe the change.

- You did not write a descriptive Subject: for the patch, allowing Greg,
  and everyone else, to know what this patch is all about.  Please read
  the section entitled "The canonical patch format" in the kernel file,
  Documentation/process/submitting-patches.rst for what a proper
  Subject: line should look like.

If you wish to discuss this problem further, or you have questions about
how to resolve this issue, please feel free to respond to this email and
Greg will reply once he has dug out from the pending patches received
from other developers.

thanks,

greg k-h's patch email bot
David Lin Aug. 15, 2024, 1:52 a.m. UTC | #2
Hi Greg,

	Following the guideline for new driver, it should let every file as a single patch for review and generate a final
	single patch after reviewing. I think stuffs mentioned by you can be got from cover letter.

	If I misunderstood anything, please let me know.

Thanks,
David

> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Thursday, August 15, 2024 2:48 AM
> To: David Lin <yu-hao.lin@nxp.com>
> Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> kvalo@kernel.org; johannes@sipsolutions.net; briannorris@chromium.org;
> francesco@dolcini.it; Pete Hsieh <tsung-hsien.hsieh@nxp.com>
> Subject: [EXT] Re: [PATCH v2 40/43] wifi: nxpwifi: add wmm.h
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report
> this email' button
> 
> 
> On Fri, Aug 09, 2024 at 05:45:30PM +0800, David Lin wrote:
> > ---
> >  drivers/net/wireless/nxp/nxpwifi/wmm.h | 78
> > ++++++++++++++++++++++++++
> >  1 file changed, 78 insertions(+)
> >  create mode 100644 drivers/net/wireless/nxp/nxpwifi/wmm.h
> 
> 
> Hi,
> 
> This is the friendly patch-bot of Greg Kroah-Hartman.  You have sent him a
> patch that has triggered this response.  He used to manually respond to these
> common problems, but in order to save his sanity (he kept writing the same
> thing over and over, yet to different people), I was created.  Hopefully you will
> not take offence and will fix the problem in your patch and resubmit it so that
> it can be accepted into the Linux kernel tree.
> 
> You are receiving this message because of the following common error(s) as
> indicated below:
> 
> - Your patch does not have a Signed-off-by: line.  Please read the
>   kernel file, Documentation/process/submitting-patches.rst and resend
>   it after adding that line.  Note, the line needs to be in the body of
>   the email, before the patch, not at the bottom of the patch or in the
>   email signature.
> 
> - You did not specify a description of why the patch is needed, or
>   possibly, any description at all, in the email body.  Please read the
>   section entitled "The canonical patch format" in the kernel file,
>   Documentation/process/submitting-patches.rst for what is needed in
>   order to properly describe the change.
> 
> - You did not write a descriptive Subject: for the patch, allowing Greg,
>   and everyone else, to know what this patch is all about.  Please read
>   the section entitled "The canonical patch format" in the kernel file,
>   Documentation/process/submitting-patches.rst for what a proper
>   Subject: line should look like.
> 
> If you wish to discuss this problem further, or you have questions about how to
> resolve this issue, please feel free to respond to this email and Greg will reply
> once he has dug out from the pending patches received from other developers.
> 
> thanks,
> 
> greg k-h's patch email bot
Greg KH Aug. 15, 2024, 5:08 a.m. UTC | #3
On Thu, Aug 15, 2024 at 01:52:18AM +0000, David Lin wrote:
> Hi Greg,
> 
> 	Following the guideline for new driver, it should let every file as a single patch for review and generate a final
> 	single patch after reviewing. I think stuffs mentioned by you can be got from cover letter.
> 
> 	If I misunderstood anything, please let me know.

Please read the kernel documentation for how to submit kernel changes in
a way that we can properly review, and accept them.  As-is, there is
nothing we can do with this series at all, sorry.

greg k-h
David Lin Aug. 15, 2024, 6:20 a.m. UTC | #4
Hi Greg,

	So that mean I still need to add description for every file, right?

	Once if confirmed, I will prepare patch v3.

Thanks,
David

> -----Original Message-----
> From: Greg KH <gregkh@linuxfoundation.org>
> Sent: Thursday, August 15, 2024 1:08 PM
> To: David Lin <yu-hao.lin@nxp.com>
> Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> kvalo@kernel.org; johannes@sipsolutions.net; briannorris@chromium.org;
> francesco@dolcini.it; Pete Hsieh <tsung-hsien.hsieh@nxp.com>
> Subject: Re: [EXT] Re: [PATCH v2 40/43] wifi: nxpwifi: add wmm.h
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report
> this email' button
> 
> 
> On Thu, Aug 15, 2024 at 01:52:18AM +0000, David Lin wrote:
> > Hi Greg,
> >
> >       Following the guideline for new driver, it should let every file as a
> single patch for review and generate a final
> >       single patch after reviewing. I think stuffs mentioned by you can be
> got from cover letter.
> >
> >       If I misunderstood anything, please let me know.
> 
> Please read the kernel documentation for how to submit kernel changes in a
> way that we can properly review, and accept them.  As-is, there is nothing we
> can do with this series at all, sorry.
> 
> greg k-h
David Lin Aug. 15, 2024, 6:23 a.m. UTC | #5
Hi Greg,

	BTW, this is new driver. This patch series are not changes for any existed driver.

Thanks,
David

> 
> Hi Greg,
> 
>         So that mean I still need to add description for every file, right?
> 
>         Once if confirmed, I will prepare patch v3.
> 
> Thanks,
> David
> 
> > -----Original Message-----
> > From: Greg KH <gregkh@linuxfoundation.org>
> > Sent: Thursday, August 15, 2024 1:08 PM
> > To: David Lin <yu-hao.lin@nxp.com>
> > Cc: linux-wireless@vger.kernel.org; linux-kernel@vger.kernel.org;
> > kvalo@kernel.org; johannes@sipsolutions.net; briannorris@chromium.org;
> > francesco@dolcini.it; Pete Hsieh <tsung-hsien.hsieh@nxp.com>
> > Subject: Re: [EXT] Re: [PATCH v2 40/43] wifi: nxpwifi: add wmm.h
> >
> > Caution: This is an external email. Please take care when clicking
> > links or opening attachments. When in doubt, report the message using
> > the 'Report this email' button
> >
> >
> > On Thu, Aug 15, 2024 at 01:52:18AM +0000, David Lin wrote:
> > > Hi Greg,
> > >
> > >       Following the guideline for new driver, it should let every
> > > file as a
> > single patch for review and generate a final
> > >       single patch after reviewing. I think stuffs mentioned by you
> > > can be
> > got from cover letter.
> > >
> > >       If I misunderstood anything, please let me know.
> >
> > Please read the kernel documentation for how to submit kernel changes
> > in a way that we can properly review, and accept them.  As-is, there
> > is nothing we can do with this series at all, sorry.
> >
> > greg k-h
Greg KH Aug. 15, 2024, 6:57 a.m. UTC | #6
A: http://en.wikipedia.org/wiki/Top_post
Q: Were do I find info about this thing called top-posting?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

A: No.
Q: Should I include quotations after my reply?


http://daringfireball.net/2007/07/on_top

On Thu, Aug 15, 2024 at 06:20:48AM +0000, David Lin wrote:
> Hi Greg,
> 
> 	So that mean I still need to add description for every file, right?

Of course, how else would you want to review such a change?

Think about being on the recieving end of a patch set.  What would you
need and want in order to be able to properly review it (hint, it is NOT
one patch per file).

thanks,

greg k-h
Kalle Valo Aug. 15, 2024, 9:43 a.m. UTC | #7
Greg KH <gregkh@linuxfoundation.org> writes:

> On Thu, Aug 15, 2024 at 01:52:18AM +0000, David Lin wrote:
>> Hi Greg,
>> 
>> 	Following the guideline for new driver, it should let every
>> file as a single patch for review and generate a final
>> 	single patch after reviewing. I think stuffs mentioned by you can be got from cover letter.
>> 
>> 	If I misunderstood anything, please let me know.
>
> Please read the kernel documentation for how to submit kernel changes in
> a way that we can properly review, and accept them.  As-is, there is
> nothing we can do with this series at all, sorry.

Greg, just a bit background for this:

Because wireless drivers can be huge in our documentation we have
actually requested to split the driver one patch per file for easier
review and avoid mailing list limits:

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#new_driver

The final patch to be commited will be just one big patch with a proper
commit message.
Kalle Valo Aug. 15, 2024, 9:51 a.m. UTC | #8
David Lin <yu-hao.lin@nxp.com> writes:

> So that mean I still need to add description for every file, right?
>
> Once if confirmed, I will prepare patch v3.

Please don't send a new version yet, patchbombing doesn't solve
anything. I would say wait for review comments at least a month before
sending a new version. But maybe send the patches only to
linux-wireless, that way people outside wireless don't get confused.

And PLEASE do stop top posting, that's the most trivial detail when
working with the community. If you continue top posting then I will
automatically drop any patches from you.

Carefully read our wiki page IN FULL about submitting patches, link
below.
Greg KH Aug. 15, 2024, 9:58 a.m. UTC | #9
On Thu, Aug 15, 2024 at 12:43:07PM +0300, Kalle Valo wrote:
> Greg KH <gregkh@linuxfoundation.org> writes:
> 
> > On Thu, Aug 15, 2024 at 01:52:18AM +0000, David Lin wrote:
> >> Hi Greg,
> >> 
> >> 	Following the guideline for new driver, it should let every
> >> file as a single patch for review and generate a final
> >> 	single patch after reviewing. I think stuffs mentioned by you can be got from cover letter.
> >> 
> >> 	If I misunderstood anything, please let me know.
> >
> > Please read the kernel documentation for how to submit kernel changes in
> > a way that we can properly review, and accept them.  As-is, there is
> > nothing we can do with this series at all, sorry.
> 
> Greg, just a bit background for this:
> 
> Because wireless drivers can be huge in our documentation we have
> actually requested to split the driver one patch per file for easier
> review and avoid mailing list limits:
> 
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#new_driver
> 
> The final patch to be commited will be just one big patch with a proper
> commit message.

Ick, wow, good luck!

That being said, you still can't take patches without any changelog text
and most importantly, no signed-off-by lines, right?

thanks,

greg k-h
Kalle Valo Aug. 15, 2024, 11:44 a.m. UTC | #10
Greg KH <gregkh@linuxfoundation.org> writes:

> On Thu, Aug 15, 2024 at 12:43:07PM +0300, Kalle Valo wrote:
>
>> Greg KH <gregkh@linuxfoundation.org> writes:
>> 
>> > On Thu, Aug 15, 2024 at 01:52:18AM +0000, David Lin wrote:
>> >> Hi Greg,
>> >> 
>> >> 	Following the guideline for new driver, it should let every
>> >> file as a single patch for review and generate a final
>> >> 	single patch after reviewing. I think stuffs mentioned by you can be got from cover letter.
>> >> 
>> >> 	If I misunderstood anything, please let me know.
>> >
>> > Please read the kernel documentation for how to submit kernel changes in
>> > a way that we can properly review, and accept them.  As-is, there is
>> > nothing we can do with this series at all, sorry.
>> 
>> Greg, just a bit background for this:
>> 
>> Because wireless drivers can be huge in our documentation we have
>> actually requested to split the driver one patch per file for easier
>> review and avoid mailing list limits:
>> 
>> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#new_driver
>> 
>> The final patch to be commited will be just one big patch with a proper
>> commit message.
>
> Ick, wow, good luck!

Wireless drivers can be 40 kLOC and even if you can review a monster
patch like that, us mere mortals cannot :)

> That being said, you still can't take patches without any changelog text
> and most importantly, no signed-off-by lines, right?

I will not accept empty commit messages. I think you misunderstood what
we do so I'll give a concrete example with rtw89 driver. Here's how the
driver was split for review one file per patch:

https://lore.kernel.org/linux-wireless/20201230044223.14085-1-pkshih@realtek.com/

And here's the one big commit the driver was applied to the tree:

https://git.kernel.org/linus/e3ec7017f6a2

Actually initial rtw89 version was a whopping 92 kLOC.
David Lin Aug. 16, 2024, 1:39 a.m. UTC | #11
> From: Kalle Valo <kvalo@kernel.org>
> Sent: Thursday, August 15, 2024 5:52 PM
> To: David Lin <yu-hao.lin@nxp.com>
> Cc: Greg KH <gregkh@linuxfoundation.org>; linux-wireless@vger.kernel.org;
> linux-kernel@vger.kernel.org; johannes@sipsolutions.net;
> briannorris@chromium.org; francesco@dolcini.it; Pete Hsieh
> <tsung-hsien.hsieh@nxp.com>
> Subject: Re: [EXT] Re: [PATCH v2 40/43] wifi: nxpwifi: add wmm.h
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report
> this email' button
> 
> 
> David Lin <yu-hao.lin@nxp.com> writes:
> 
> > So that mean I still need to add description for every file, right?
> >
> > Once if confirmed, I will prepare patch v3.
> 
> Please don't send a new version yet, patchbombing doesn't solve anything. I
> would say wait for review comments at least a month before sending a new
> version. But maybe send the patches only to linux-wireless, that way people
> outside wireless don't get confused.
> 
> And PLEASE do stop top posting, that's the most trivial detail when working
> with the community. If you continue top posting then I will automatically
> drop any patches from you.
> 
> Carefully read our wiki page IN FULL about submitting patches, link below.
> 
> --
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchw
> ork.kernel.org%2Fproject%2Flinux-wireless%2Flist%2F&data=05%7C02%7Cyu-
> hao.lin%40nxp.com%7C523f4e00330b4e2d3e6708dcbd0fdbb8%7C686ea1d3
> bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638593123020514086%7CUnknow
> n%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1ha
> WwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ZQ9oeetOx6bnIYOpUTOxdl5f
> 1U7Bh6EK9WbIbWb0RNM%3D&reserved=0
> 
> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwireles
> s.wiki.kernel.org%2Fen%2Fdevelopers%2Fdocumentation%2Fsubmittingpatch
> es&data=05%7C02%7Cyu-hao.lin%40nxp.com%7C523f4e00330b4e2d3e6708d
> cbd0fdbb8%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C63859312
> 3020529099%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIj
> oiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=CKp
> %2BPfqW3gKcigV%2BezWbEYvFfIn0dYaTDgSiiwYKKow%3D&reserved=0

Thanks for your information.

David
diff mbox series

Patch

diff --git a/drivers/net/wireless/nxp/nxpwifi/wmm.h b/drivers/net/wireless/nxp/nxpwifi/wmm.h
new file mode 100644
index 000000000000..fc9bbb989144
--- /dev/null
+++ b/drivers/net/wireless/nxp/nxpwifi/wmm.h
@@ -0,0 +1,78 @@ 
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * NXP Wireless LAN device driver: WMM
+ *
+ * Copyright 2011-2024 NXP
+ */
+
+#ifndef _NXPWIFI_WMM_H_
+#define _NXPWIFI_WMM_H_
+
+enum ieee_types_wmm_aciaifsn_bitmasks {
+	NXPWIFI_AIFSN = (BIT(0) | BIT(1) | BIT(2) | BIT(3)),
+	NXPWIFI_ACM = BIT(4),
+	NXPWIFI_ACI = (BIT(5) | BIT(6)),
+};
+
+enum ieee_types_wmm_ecw_bitmasks {
+	NXPWIFI_ECW_MIN = (BIT(0) | BIT(1) | BIT(2) | BIT(3)),
+	NXPWIFI_ECW_MAX = (BIT(4) | BIT(5) | BIT(6) | BIT(7)),
+};
+
+extern const u16 nxpwifi_1d_to_wmm_queue[];
+extern const u8 tos_to_tid_inv[];
+
+/* This function retrieves the TID of the given RA list.
+ */
+static inline int
+nxpwifi_get_tid(struct nxpwifi_ra_list_tbl *ptr)
+{
+	struct sk_buff *skb;
+
+	if (skb_queue_empty(&ptr->skb_head))
+		return 0;
+
+	skb = skb_peek(&ptr->skb_head);
+
+	return skb->priority;
+}
+
+void nxpwifi_wmm_add_buf_txqueue(struct nxpwifi_private *priv,
+				 struct sk_buff *skb);
+void nxpwifi_wmm_add_buf_bypass_txqueue(struct nxpwifi_private *priv,
+					struct sk_buff *skb);
+void nxpwifi_ralist_add(struct nxpwifi_private *priv, const u8 *ra);
+void nxpwifi_rotate_priolists(struct nxpwifi_private *priv,
+			      struct nxpwifi_ra_list_tbl *ra, int tid);
+
+bool nxpwifi_wmm_lists_empty(struct nxpwifi_adapter *adapter);
+bool nxpwifi_bypass_txlist_empty(struct nxpwifi_adapter *adapter);
+void nxpwifi_wmm_process_tx(struct nxpwifi_adapter *adapter);
+void nxpwifi_process_bypass_tx(struct nxpwifi_adapter *adapter);
+bool nxpwifi_is_ralist_valid(struct nxpwifi_private *priv,
+			     struct nxpwifi_ra_list_tbl *ra_list, int tid);
+
+u8 nxpwifi_wmm_compute_drv_pkt_delay(struct nxpwifi_private *priv,
+				     const struct sk_buff *skb);
+void nxpwifi_wmm_init(struct nxpwifi_adapter *adapter);
+
+u32 nxpwifi_wmm_process_association_req(struct nxpwifi_private *priv,
+					u8 **assoc_buf,
+					struct ieee80211_wmm_param_ie *wmmie,
+					struct ieee80211_ht_cap *htcap);
+
+void nxpwifi_wmm_setup_queue_priorities(struct nxpwifi_private *priv,
+					struct ieee80211_wmm_param_ie *wmm_ie);
+void nxpwifi_wmm_setup_ac_downgrade(struct nxpwifi_private *priv);
+int nxpwifi_ret_wmm_get_status(struct nxpwifi_private *priv,
+			       const struct host_cmd_ds_command *resp);
+struct nxpwifi_ra_list_tbl *
+nxpwifi_wmm_get_queue_raptr(struct nxpwifi_private *priv, u8 tid,
+			    const u8 *ra_addr);
+u8 nxpwifi_wmm_downgrade_tid(struct nxpwifi_private *priv, u32 tid);
+void nxpwifi_update_ralist_tx_pause(struct nxpwifi_private *priv, u8 *mac,
+				    u8 tx_pause);
+
+struct nxpwifi_ra_list_tbl *nxpwifi_wmm_get_ralist_node(struct nxpwifi_private
+					*priv, u8 tid, const u8 *ra_addr);
+#endif /* !_NXPWIFI_WMM_H_ */