// SPDX-License-Identifier: GPL-2.0-only
/*
* NXP Wireless LAN device driver: WMM
*
* Copyright 2011-2020 NXP
*/
#include "decl.h"
#include "ioctl.h"
#include "util.h"
#include "fw.h"
#include "main.h"
#include "wmm.h"
#include "11n.h"
/* Maximum value FW can accept for driver delay in packet transmission */
#define DRV_PKT_DELAY_TO_FW_MAX 512
#define WMM_QUEUED_PACKET_LOWER_LIMIT 180
#define WMM_QUEUED_PACKET_UPPER_LIMIT 200
/* Offset for TOS field in the IP header */
#define IPTOS_OFFSET 5
static bool disable_tx_amsdu;
module_param(disable_tx_amsdu, bool, 0644);
/* This table inverses the tos_to_tid operation to get a priority
* which is in sequential order, and can be compared.
* Use this to compare the priority of two different TIDs.
*/
const u8 tos_to_tid_inv[] = {
0x02, /* from tos_to_tid[2] = 0 */
0x00, /* from tos_to_tid[0] = 1 */
0x01, /* from tos_to_tid[1] = 2 */
0x03,
0x04,
0x05,