From: Aditya Shankar <aditya.shankar@microchip.com>
To: <gregkh@linuxfoundation.org>, <linux-wireless@vger.kernel.org>
Cc: <devel@driverdev.osuosl.org>, <Ganesh.Krishna@microchip.com>,
Aditya Shankar <aditya.shankar@microchip.com>
Subject: [PATCH v2 6/8] staging: wilc1000: Get packet count from firmware
Date: Mon, 26 Jun 2017 17:13:28 +0530 [thread overview]
Message-ID: <1498477410-19518-7-git-send-email-aditya.shankar@microchip.com> (raw)
In-Reply-To: <1498477410-19518-1-git-send-email-aditya.shankar@microchip.com>
Add a new function to get packet count from the firmware.
31:25 24 23:17 16 15:9 8 7:2 1 0
VO CNT VO ACM VI CNT VI ACM BE CNT BE ACM BK CNT BK ACM VMM ready
Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com>
---
drivers/staging/wilc1000/wilc_wlan.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c
index 655f229..b3e1136 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -443,6 +443,14 @@ static inline int ac_balance(u8 *count, u8 *ratio)
return 0;
}
+static inline void ac_pkt_count(u32 reg, u8 *pkt_count)
+{
+ pkt_count[AC_BK_Q] = (reg & 0x000000fa) >> BK_AC_COUNT_POS;
+ pkt_count[AC_BE_Q] = (reg & 0x0000fe00) >> BE_AC_COUNT_POS;
+ pkt_count[AC_VI_Q] = (reg & 0x00fe0000) >> VI_AC_COUNT_POS;
+ pkt_count[AC_VO_Q] = (reg & 0xfe000000) >> VO_AC_COUNT_POS;
+}
+
int wilc_wlan_txq_add_net_pkt(struct net_device *dev, void *priv, u8 *buffer,
u32 buffer_size, wilc_tx_complete_func_t func)
{
--
2.7.4
next prev parent reply other threads:[~2017-06-26 11:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-26 11:43 [PATCH v2 0/8] Enable access category classification on Tx path Aditya Shankar
2017-06-26 11:43 ` [PATCH v2 1/8] staging: wilc1000: Add support for AC classification Aditya Shankar
2017-06-26 11:43 ` [PATCH v2 2/8] staging: wilc1000: Add function to calculate ac queue limit Aditya Shankar
2017-06-26 11:43 ` [PATCH v2 3/8] staging: wilc1000: WMM classification of data Aditya Shankar
2017-06-26 11:43 ` [PATCH v2 4/8] staging: wilc1000: Add function to balance packet count Aditya Shankar
2017-06-26 11:43 ` [PATCH v2 5/8] staging: wilc1000: Add new variable for ac queue management Aditya Shankar
2017-06-29 14:38 ` Greg KH
2017-06-26 11:43 ` Aditya Shankar [this message]
2017-06-26 11:43 ` [PATCH v2 7/8] staging: wilc1000: Change ac based on acm status Aditya Shankar
2017-06-26 11:43 ` [PATCH v2 8/8] staging: wilc1000: Update ACM bit status Aditya Shankar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1498477410-19518-7-git-send-email-aditya.shankar@microchip.com \
--to=aditya.shankar@microchip.com \
--cc=Ganesh.Krishna@microchip.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.