162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * This file is part of wl1251
462306a36Sopenharmony_ci *
562306a36Sopenharmony_ci * Copyright (C) 2009 Nokia Corporation
662306a36Sopenharmony_ci */
762306a36Sopenharmony_ci
862306a36Sopenharmony_ci#ifndef __WL1251_INIT_H__
962306a36Sopenharmony_ci#define __WL1251_INIT_H__
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci#include "wl1251.h"
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_cienum {
1462306a36Sopenharmony_ci	/* best effort/legacy */
1562306a36Sopenharmony_ci	AC_BE = 0,
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci	/* background */
1862306a36Sopenharmony_ci	AC_BK = 1,
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ci	/* video */
2162306a36Sopenharmony_ci	AC_VI = 2,
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_ci	/* voice */
2462306a36Sopenharmony_ci	AC_VO = 3,
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci	/* broadcast dummy access category */
2762306a36Sopenharmony_ci	AC_BCAST = 4,
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci	NUM_ACCESS_CATEGORIES = 4
3062306a36Sopenharmony_ci};
3162306a36Sopenharmony_ci
3262306a36Sopenharmony_ci/* following are defult values for the IE fields*/
3362306a36Sopenharmony_ci#define CWMIN_BK  15
3462306a36Sopenharmony_ci#define CWMIN_BE  15
3562306a36Sopenharmony_ci#define CWMIN_VI  7
3662306a36Sopenharmony_ci#define CWMIN_VO  3
3762306a36Sopenharmony_ci#define CWMAX_BK  1023
3862306a36Sopenharmony_ci#define CWMAX_BE  63
3962306a36Sopenharmony_ci#define CWMAX_VI  15
4062306a36Sopenharmony_ci#define CWMAX_VO  7
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ci/* slot number setting to start transmission at PIFS interval */
4362306a36Sopenharmony_ci#define AIFS_PIFS 1
4462306a36Sopenharmony_ci
4562306a36Sopenharmony_ci/*
4662306a36Sopenharmony_ci * slot number setting to start transmission at DIFS interval - normal DCF
4762306a36Sopenharmony_ci * access
4862306a36Sopenharmony_ci */
4962306a36Sopenharmony_ci#define AIFS_DIFS 2
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci#define AIFSN_BK  7
5262306a36Sopenharmony_ci#define AIFSN_BE  3
5362306a36Sopenharmony_ci#define AIFSN_VI  AIFS_PIFS
5462306a36Sopenharmony_ci#define AIFSN_VO  AIFS_PIFS
5562306a36Sopenharmony_ci#define TXOP_BK   0
5662306a36Sopenharmony_ci#define TXOP_BE   0
5762306a36Sopenharmony_ci#define TXOP_VI   3008
5862306a36Sopenharmony_ci#define TXOP_VO   1504
5962306a36Sopenharmony_ci
6062306a36Sopenharmony_ciint wl1251_hw_init_hwenc_config(struct wl1251 *wl);
6162306a36Sopenharmony_ciint wl1251_hw_init_templates_config(struct wl1251 *wl);
6262306a36Sopenharmony_ciint wl1251_hw_init_rx_config(struct wl1251 *wl, u32 config, u32 filter);
6362306a36Sopenharmony_ciint wl1251_hw_init_phy_config(struct wl1251 *wl);
6462306a36Sopenharmony_ciint wl1251_hw_init_beacon_filter(struct wl1251 *wl);
6562306a36Sopenharmony_ciint wl1251_hw_init_pta(struct wl1251 *wl);
6662306a36Sopenharmony_ciint wl1251_hw_init_energy_detection(struct wl1251 *wl);
6762306a36Sopenharmony_ciint wl1251_hw_init_beacon_broadcast(struct wl1251 *wl);
6862306a36Sopenharmony_ciint wl1251_hw_init_power_auth(struct wl1251 *wl);
6962306a36Sopenharmony_ciint wl1251_hw_init_mem_config(struct wl1251 *wl);
7062306a36Sopenharmony_ciint wl1251_hw_init(struct wl1251 *wl);
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ci#endif
73