Skip to content

Commit

Permalink
mac80211: allow setting queue_len for drivers not using wake_tx_queue
Browse files Browse the repository at this point in the history
Currently a mac80211 driver can only set the txq_limit when using
wake_tx_queue. Not all drivers use wake_tx_queue. This patch adds a new
element to wiphy allowing a driver to set a custom tx_queue_len and the
code that will apply it in case it is set. The current default is
1000 which is too low for ath11k when doing HE rates.

Signed-off-by: John Crispin <john@phrozen.org>
Link: https://lore.kernel.org/r/20200211122605.13002-1-john@phrozen.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
John Crispin authored and Johannes Berg committed Feb 14, 2020
1 parent 256db74 commit 1f6e0ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/net/cfg80211.h
Original file line number Diff line number Diff line change
Expand Up @@ -4739,6 +4739,8 @@ struct wiphy {
u32 txq_memory_limit;
u32 txq_quantum;

unsigned long tx_queue_len;

u8 support_mbssid:1,
support_only_he_mbssid:1;

Expand Down
4 changes: 4 additions & 0 deletions net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -1834,6 +1834,10 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
if_setup, txqs, 1);
if (!ndev)
return -ENOMEM;

if (!local->ops->wake_tx_queue && local->hw.wiphy->tx_queue_len)
ndev->tx_queue_len = local->hw.wiphy->tx_queue_len;

dev_net_set(ndev, wiphy_net(local->hw.wiphy));

ndev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats);
Expand Down

0 comments on commit 1f6e0ba

Please sign in to comment.