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@xxxxxxxxxxxxx> --- 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 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel