Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c0a75a55 authored by Ahmad Masri's avatar Ahmad Masri
Browse files

wil6210: enable access category queues



Set ac_queues default to enabled.
Change wil_select_ac_queue to return higher priority queue for EAPOL,
ARP and ICMP packets. These special packets are critical to maintain
the link with the AP and guarantee healthy operations and diagnostics
in the network.

Special packets will get the higher priority to ensure early
transmission when access category is enabled.

Change-Id: Ic03a810c303f614174f9f10c72e339ee32a6f023
Signed-off-by: default avatarAhmad Masri <amasri@codeaurora.org>
parent 737b0396
Loading
Loading
Loading
Loading
+5 −3
Original line number Original line Diff line number Diff line
@@ -19,9 +19,9 @@ module_param(alt_ifname, bool, 0444);
MODULE_PARM_DESC(alt_ifname, " use an alternate interface name wigigN instead of wlanN");
MODULE_PARM_DESC(alt_ifname, " use an alternate interface name wigigN instead of wlanN");


/* enable access category for transmit packets, this parameter may be controlled
/* enable access category for transmit packets, this parameter may be controlled
 * via wigig.ini config file, default disabled
 * via wigig.ini config file, default enabled
 */
 */
bool ac_queues;
bool ac_queues = true;


bool wil_has_other_active_ifaces(struct wil6210_priv *wil,
bool wil_has_other_active_ifaces(struct wil6210_priv *wil,
				 struct net_device *ndev, bool up, bool ok)
				 struct net_device *ndev, bool up, bool ok)
@@ -122,7 +122,9 @@ static u16 wil_select_queue(struct net_device *ndev,
		return 0;
		return 0;


	/* determine the priority */
	/* determine the priority */
	if (skb->priority == 0 || skb->priority > 7)
	if (wil_is_special_packet(skb))
		return 7;
	else if (skb->priority == 0 || skb->priority > 7)
		skb->priority = cfg80211_classify8021d(skb, NULL);
		skb->priority = cfg80211_classify8021d(skb, NULL);


	qid = wil_1d_to_queue[skb->priority];
	qid = wil_1d_to_queue[skb->priority];
+2 −2
Original line number Original line Diff line number Diff line
@@ -1862,7 +1862,7 @@ static int __wil_tx_vring_tso(struct wil6210_priv *wil, struct wil6210_vif *vif,
	return rc;
	return rc;
}
}


static inline bool is_special_packet(const struct sk_buff *skb)
bool wil_is_special_packet(const struct sk_buff *skb)
{
{
	if (skb->protocol == cpu_to_be16(ETH_P_ARP) ||
	if (skb->protocol == cpu_to_be16(ETH_P_ARP) ||
	    skb->protocol == cpu_to_be16(ETH_P_RARP) ||
	    skb->protocol == cpu_to_be16(ETH_P_RARP) ||
@@ -1893,7 +1893,7 @@ static int __wil_tx_ring(struct wil6210_priv *wil, struct wil6210_vif *vif,
	bool mcast = (ring_index == vif->bcast_ring);
	bool mcast = (ring_index == vif->bcast_ring);
	uint len = skb_headlen(skb);
	uint len = skb_headlen(skb);
	bool special_packet = (wil->tx_reserved_entries != 0 &&
	bool special_packet = (wil->tx_reserved_entries != 0 &&
			       is_special_packet(skb));
			       wil_is_special_packet(skb));
	int avail = wil_ring_avail_tx(ring) -
	int avail = wil_ring_avail_tx(ring) -
		(special_packet ? 0 : txdata->tx_reserved_count);
		(special_packet ? 0 : txdata->tx_reserved_count);
	u8 ctx_flags = special_packet ? WIL_CTX_FLAG_RESERVED_USED : 0;
	u8 ctx_flags = special_packet ? WIL_CTX_FLAG_RESERVED_USED : 0;
+1 −0
Original line number Original line Diff line number Diff line
@@ -656,5 +656,6 @@ void wil_init_txrx_ops_legacy_dma(struct wil6210_priv *wil);
void wil_tx_latency_calc(struct wil6210_priv *wil, struct sk_buff *skb,
void wil_tx_latency_calc(struct wil6210_priv *wil, struct sk_buff *skb,
			 struct wil_sta_info *sta);
			 struct wil_sta_info *sta);
int wil_get_cid_by_ring(struct wil6210_priv *wil, struct wil_ring *ring);
int wil_get_cid_by_ring(struct wil6210_priv *wil, struct wil_ring *ring);
bool wil_is_special_packet(const struct sk_buff *skb);


#endif /* WIL6210_TXRX_H */
#endif /* WIL6210_TXRX_H */