Skip to content

Commit

Permalink
wilc1000: added queue support for WMM
Browse files Browse the repository at this point in the history
Added multiple queues[BK,BE,VI,VO] to handle different priority data
packets. Before adding a packet to the queue, checked its priority from
the header, and then add to the suitable queue. The limit for each queue
is maintained separately. Also while passing the packets to the firmware
via VMM take care to select data packets based on priority and available
space.

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20201125114059.10006-6-ajay.kathat@microchip.com
  • Loading branch information
Ajay Singh authored and Kalle Valo committed Dec 2, 2020
1 parent 9c172f3 commit 339754f
Show file tree
Hide file tree
Showing 4 changed files with 302 additions and 61 deletions.
7 changes: 5 additions & 2 deletions drivers/net/wireless/microchip/wilc1000/cfg80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
{
struct wilc *wl;
struct wilc_vif *vif;
int ret;
int ret, i;

wl = wilc_create_wiphy(dev);
if (!wl)
Expand All @@ -1725,7 +1725,10 @@ int wilc_cfg80211_init(struct wilc **wilc, struct device *dev, int io_type,
wl->io_type = io_type;
wl->hif_func = ops;
wl->chip_ps_state = WILC_CHIP_WAKEDUP;
INIT_LIST_HEAD(&wl->txq_head.list);

for (i = 0; i < NQUEUES; i++)
INIT_LIST_HEAD(&wl->txq[i].txq_head.list);

INIT_LIST_HEAD(&wl->rxq_head.list);
INIT_LIST_HEAD(&wl->vif_list);

Expand Down
11 changes: 10 additions & 1 deletion drivers/net/wireless/microchip/wilc1000/netdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ struct wilc_vif {
struct cfg80211_bss *bss;
};

struct wilc_tx_queue_status {
u8 buffer[AC_BUFFER_SIZE];
u16 end_index;
u16 cnt[NQUEUES];
u16 sum;
bool initialized;
};

struct wilc {
struct wiphy *wiphy;
const struct wilc_hif_func *hif_func;
Expand Down Expand Up @@ -245,9 +253,10 @@ struct wilc {
u32 rx_buffer_offset;
u8 *tx_buffer;

struct txq_entry_t txq_head;
struct txq_handle txq[NQUEUES];
int txq_entries;

struct wilc_tx_queue_status tx_q_limit;
struct rxq_entry_t rxq_head;

const struct firmware *firmware;
Expand Down
Loading

0 comments on commit 339754f

Please sign in to comment.