---help---
This option tells whether enhanced packet stats collection
is enabled or not.
+
+config SCSC_WLAN_PRIORITISE_IMP_FRAMES
+ bool "Change priority of important frames such as DNS, MDNS, TCP SYN"
+ default y
+ ---help---
+ The option enables the driver to prioritise important frames
+ (such as DNS, MDNS, TCP SYN) so that they are sent ahead of others.
+
config SCSC_WIFI_NAN_ENABLE
bool "Enable WiFi NAN"
default n
return ret;
}
+#ifdef CONFIG_SCSC_WLAN_PRIORITISE_IMP_FRAMES
+int slsi_is_tcp_sync_packet(struct net_device *dev, struct sk_buff *skb)
+{
+ struct netdev_vif *ndev_vif = netdev_priv(dev);
+
+ /* for AP type (AP or P2P Go) check if the packet is local or intra BSS. If intra BSS then
+ * the IP header and TCP header are not set; so return 0
+ */
+ if ((ndev_vif->vif_type == FAPI_VIFTYPE_AP) && (compare_ether_addr(eth_hdr(skb)->h_source, dev->dev_addr) != 0))
+ return 0;
+ if (be16_to_cpu(eth_hdr(skb)->h_proto) != ETH_P_IP)
+ return 0;
+ if (ip_hdr(skb)->protocol != IPPROTO_TCP)
+ return 0;
+ if (!skb_transport_header_was_set(skb))
+ return 0;
+ if (tcp_hdr(skb)->syn)
+ return 1;
+
+ return 0;
+}
+
int slsi_is_dns_packet(u8 *data)
{
u8 *p;
return 0;
}
+int slsi_is_mdns_packet(u8 *data)
+{
+ u8 *p;
+
+ p = data + SLSI_IP_TYPE_OFFSET;
+
+ if (*p == SLSI_IP_TYPE_UDP) {
+ u16 dest_port;
+
+ p = data + SLSI_IP_DEST_PORT_OFFSET;
+ dest_port = p[0] << 8 | p[1];
+ if (dest_port == SLSI_MDNS_DEST_PORT)
+ return 1;
+ }
+ return 0;
+}
+#endif
+
int slsi_ap_prepare_add_info_ies(struct netdev_vif *ndev_vif, const u8 *ies, size_t ies_len)
{
const u8 *wps_p2p_ies = NULL;
#define SLSI_DHCP_SERVER_PORT 67
#define SLSI_DHCP_CLIENT_PORT 68
#define SLSI_DNS_DEST_PORT 53
+#define SLSI_MDNS_DEST_PORT 5353
#define SLSI_DHCP_MSG_MAGIC_OFFSET 278
#define SLSI_DHCP_OPTION 53
int slsi_send_txq_params(struct slsi_dev *sdev, struct net_device *ndev);
void slsi_abort_sta_scan(struct slsi_dev *sdev);
int slsi_is_dhcp_packet(u8 *data);
+
+#ifdef CONFIG_SCSC_WLAN_PRIORITISE_IMP_FRAMES
int slsi_is_dns_packet(u8 *data);
+int slsi_is_mdns_packet(u8 *data);
+int slsi_is_tcp_sync_packet(struct net_device *dev, struct sk_buff *skb);
+#endif
+
void slsi_set_packet_filters(struct slsi_dev *sdev, struct net_device *dev);
int slsi_update_packet_filters(struct slsi_dev *sdev, struct net_device *dev);
int slsi_clear_packet_filters(struct slsi_dev *sdev, struct net_device *dev);
} else
#endif
{
- if (proto == ETH_P_IP && slsi_is_dns_packet(skb->data)) {
+#ifdef CONFIG_SCSC_WLAN_PRIORITISE_IMP_FRAMES
+ if ((proto == ETH_P_IP && slsi_is_dns_packet(skb->data)) ||
+ (proto == ETH_P_IP && slsi_is_mdns_packet(skb->data)) ||
+ (proto == ETH_P_IP && slsi_is_tcp_sync_packet(dev, skb))) {
skb->priority = FAPI_PRIORITY_QOS_UP7;
- } else {
+ } else
+#endif
+ {
#ifdef CONFIG_SCSC_USE_WMM_TOS
skb->priority = slsi_get_priority_from_tos(skb->data + ETH_HLEN, proto);
#else
#else
seq_puts(m, "CONFIG_SCSC_WLAN_KEY_MGMT_OFFLOAD : n\n");
#endif
-
+#ifdef CONFIG_SCSC_WLAN_PRIORITISE_IMP_FRAMES
+ seq_puts(m, "CONFIG_SCSC_WLAN_PRIORITISE_IMP_FRAMES : y\n");
+#else
+ seq_puts(m, "CONFIG_SCSC_WLAN_PRIORITISE_IMP_FRAMES : n\n");
+#endif
seq_puts(m, "-------------------------------------------------\n");
#ifdef CONFIG_SCSC_WLAN_DEBUG
seq_puts(m, "CONFIG_SCSC_WLAN_DEBUG : y\n");