162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-or-later */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci	Copyright (C) 2004 - 2009 Ivo van Doorn <IvDoorn@gmail.com>
462306a36Sopenharmony_ci	Copyright (C) 2004 - 2009 Gertjan van Wingerde <gwingerde@gmail.com>
562306a36Sopenharmony_ci	<http://rt2x00.serialmonkey.com>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci/*
1062306a36Sopenharmony_ci	Module: rt2x00lib
1162306a36Sopenharmony_ci	Abstract: Data structures and definitions for the rt2x00lib module.
1262306a36Sopenharmony_ci */
1362306a36Sopenharmony_ci
1462306a36Sopenharmony_ci#ifndef RT2X00LIB_H
1562306a36Sopenharmony_ci#define RT2X00LIB_H
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci/*
1862306a36Sopenharmony_ci * Interval defines
1962306a36Sopenharmony_ci */
2062306a36Sopenharmony_ci#define WATCHDOG_INTERVAL	round_jiffies_relative(HZ)
2162306a36Sopenharmony_ci#define LINK_TUNE_SECONDS	1
2262306a36Sopenharmony_ci#define LINK_TUNE_INTERVAL	round_jiffies_relative(LINK_TUNE_SECONDS * HZ)
2362306a36Sopenharmony_ci#define AGC_SECONDS		4
2462306a36Sopenharmony_ci#define VCO_SECONDS		10
2562306a36Sopenharmony_ci
2662306a36Sopenharmony_ci/*
2762306a36Sopenharmony_ci * rt2x00_rate: Per rate device information
2862306a36Sopenharmony_ci */
2962306a36Sopenharmony_cistruct rt2x00_rate {
3062306a36Sopenharmony_ci	unsigned short flags;
3162306a36Sopenharmony_ci#define DEV_RATE_CCK			0x0001
3262306a36Sopenharmony_ci#define DEV_RATE_OFDM			0x0002
3362306a36Sopenharmony_ci#define DEV_RATE_SHORT_PREAMBLE		0x0004
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci	unsigned short bitrate; /* In 100kbit/s */
3662306a36Sopenharmony_ci	unsigned short ratemask;
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci	unsigned short plcp;
3962306a36Sopenharmony_ci	unsigned short mcs;
4062306a36Sopenharmony_ci};
4162306a36Sopenharmony_ci
4262306a36Sopenharmony_ciextern const struct rt2x00_rate rt2x00_supported_rates[12];
4362306a36Sopenharmony_ci
4462306a36Sopenharmony_cistatic inline const struct rt2x00_rate *rt2x00_get_rate(const u16 hw_value)
4562306a36Sopenharmony_ci{
4662306a36Sopenharmony_ci	return &rt2x00_supported_rates[hw_value & 0xff];
4762306a36Sopenharmony_ci}
4862306a36Sopenharmony_ci
4962306a36Sopenharmony_ci#define RATE_MCS(__mode, __mcs) \
5062306a36Sopenharmony_ci	((((__mode) & 0x00ff) << 8) | ((__mcs) & 0x00ff))
5162306a36Sopenharmony_ci
5262306a36Sopenharmony_cistatic inline int rt2x00_get_rate_mcs(const u16 mcs_value)
5362306a36Sopenharmony_ci{
5462306a36Sopenharmony_ci	return (mcs_value & 0x00ff);
5562306a36Sopenharmony_ci}
5662306a36Sopenharmony_ci
5762306a36Sopenharmony_ci/*
5862306a36Sopenharmony_ci * Radio control handlers.
5962306a36Sopenharmony_ci */
6062306a36Sopenharmony_ciint rt2x00lib_enable_radio(struct rt2x00_dev *rt2x00dev);
6162306a36Sopenharmony_civoid rt2x00lib_disable_radio(struct rt2x00_dev *rt2x00dev);
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ci/*
6462306a36Sopenharmony_ci * Initialization handlers.
6562306a36Sopenharmony_ci */
6662306a36Sopenharmony_ciint rt2x00lib_start(struct rt2x00_dev *rt2x00dev);
6762306a36Sopenharmony_civoid rt2x00lib_stop(struct rt2x00_dev *rt2x00dev);
6862306a36Sopenharmony_ci
6962306a36Sopenharmony_ci/*
7062306a36Sopenharmony_ci * Configuration handlers.
7162306a36Sopenharmony_ci */
7262306a36Sopenharmony_civoid rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
7362306a36Sopenharmony_ci			   struct rt2x00_intf *intf,
7462306a36Sopenharmony_ci			   enum nl80211_iftype type,
7562306a36Sopenharmony_ci			   const u8 *mac, const u8 *bssid);
7662306a36Sopenharmony_civoid rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
7762306a36Sopenharmony_ci			  struct rt2x00_intf *intf,
7862306a36Sopenharmony_ci			  struct ieee80211_bss_conf *conf,
7962306a36Sopenharmony_ci			  u32 changed);
8062306a36Sopenharmony_civoid rt2x00lib_config_antenna(struct rt2x00_dev *rt2x00dev,
8162306a36Sopenharmony_ci			      struct antenna_setup ant);
8262306a36Sopenharmony_civoid rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
8362306a36Sopenharmony_ci		      struct ieee80211_conf *conf,
8462306a36Sopenharmony_ci		      const unsigned int changed_flags);
8562306a36Sopenharmony_ci
8662306a36Sopenharmony_ci/**
8762306a36Sopenharmony_ci * DOC: Queue handlers
8862306a36Sopenharmony_ci */
8962306a36Sopenharmony_ci
9062306a36Sopenharmony_ci/**
9162306a36Sopenharmony_ci * rt2x00queue_alloc_rxskb - allocate a skb for RX purposes.
9262306a36Sopenharmony_ci * @entry: The entry for which the skb will be applicable.
9362306a36Sopenharmony_ci */
9462306a36Sopenharmony_cistruct sk_buff *rt2x00queue_alloc_rxskb(struct queue_entry *entry, gfp_t gfp);
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ci/**
9762306a36Sopenharmony_ci * rt2x00queue_free_skb - free a skb
9862306a36Sopenharmony_ci * @entry: The entry for which the skb will be applicable.
9962306a36Sopenharmony_ci */
10062306a36Sopenharmony_civoid rt2x00queue_free_skb(struct queue_entry *entry);
10162306a36Sopenharmony_ci
10262306a36Sopenharmony_ci/**
10362306a36Sopenharmony_ci * rt2x00queue_align_frame - Align 802.11 frame to 4-byte boundary
10462306a36Sopenharmony_ci * @skb: The skb to align
10562306a36Sopenharmony_ci *
10662306a36Sopenharmony_ci * Align the start of the 802.11 frame to a 4-byte boundary, this could
10762306a36Sopenharmony_ci * mean the payload is not aligned properly though.
10862306a36Sopenharmony_ci */
10962306a36Sopenharmony_civoid rt2x00queue_align_frame(struct sk_buff *skb);
11062306a36Sopenharmony_ci
11162306a36Sopenharmony_ci/**
11262306a36Sopenharmony_ci * rt2x00queue_insert_l2pad - Align 802.11 header & payload to 4-byte boundary
11362306a36Sopenharmony_ci * @skb: The skb to align
11462306a36Sopenharmony_ci * @header_length: Length of 802.11 header
11562306a36Sopenharmony_ci *
11662306a36Sopenharmony_ci * Apply L2 padding to align both header and payload to 4-byte boundary
11762306a36Sopenharmony_ci */
11862306a36Sopenharmony_civoid rt2x00queue_insert_l2pad(struct sk_buff *skb, unsigned int header_length);
11962306a36Sopenharmony_ci
12062306a36Sopenharmony_ci/**
12162306a36Sopenharmony_ci * rt2x00queue_insert_l2pad - Remove L2 padding from 802.11 frame
12262306a36Sopenharmony_ci * @skb: The skb to align
12362306a36Sopenharmony_ci * @header_length: Length of 802.11 header
12462306a36Sopenharmony_ci *
12562306a36Sopenharmony_ci * Remove L2 padding used to align both header and payload to 4-byte boundary,
12662306a36Sopenharmony_ci * by removing the L2 padding the header will no longer be 4-byte aligned.
12762306a36Sopenharmony_ci */
12862306a36Sopenharmony_civoid rt2x00queue_remove_l2pad(struct sk_buff *skb, unsigned int header_length);
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ci/**
13162306a36Sopenharmony_ci * rt2x00queue_write_tx_frame - Write TX frame to hardware
13262306a36Sopenharmony_ci * @queue: Queue over which the frame should be send
13362306a36Sopenharmony_ci * @skb: The skb to send
13462306a36Sopenharmony_ci * @local: frame is not from mac80211
13562306a36Sopenharmony_ci */
13662306a36Sopenharmony_ciint rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
13762306a36Sopenharmony_ci			       struct ieee80211_sta *sta, bool local);
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci/**
14062306a36Sopenharmony_ci * rt2x00queue_update_beacon - Send new beacon from mac80211
14162306a36Sopenharmony_ci *	to hardware. Handles locking by itself (mutex).
14262306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
14362306a36Sopenharmony_ci * @vif: Interface for which the beacon should be updated.
14462306a36Sopenharmony_ci */
14562306a36Sopenharmony_ciint rt2x00queue_update_beacon(struct rt2x00_dev *rt2x00dev,
14662306a36Sopenharmony_ci			      struct ieee80211_vif *vif);
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ci/**
14962306a36Sopenharmony_ci * rt2x00queue_update_beacon_locked - Send new beacon from mac80211
15062306a36Sopenharmony_ci *	to hardware. Caller needs to ensure locking.
15162306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
15262306a36Sopenharmony_ci * @vif: Interface for which the beacon should be updated.
15362306a36Sopenharmony_ci */
15462306a36Sopenharmony_ciint rt2x00queue_update_beacon_locked(struct rt2x00_dev *rt2x00dev,
15562306a36Sopenharmony_ci				     struct ieee80211_vif *vif);
15662306a36Sopenharmony_ci
15762306a36Sopenharmony_ci/**
15862306a36Sopenharmony_ci * rt2x00queue_clear_beacon - Clear beacon in hardware
15962306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
16062306a36Sopenharmony_ci * @vif: Interface for which the beacon should be updated.
16162306a36Sopenharmony_ci */
16262306a36Sopenharmony_ciint rt2x00queue_clear_beacon(struct rt2x00_dev *rt2x00dev,
16362306a36Sopenharmony_ci			     struct ieee80211_vif *vif);
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ci/**
16662306a36Sopenharmony_ci * rt2x00queue_index_inc - Index incrementation function
16762306a36Sopenharmony_ci * @entry: Queue entry (&struct queue_entry) to perform the action on.
16862306a36Sopenharmony_ci * @index: Index type (&enum queue_index) to perform the action on.
16962306a36Sopenharmony_ci *
17062306a36Sopenharmony_ci * This function will increase the requested index on the entry's queue,
17162306a36Sopenharmony_ci * it will grab the appropriate locks and handle queue overflow events by
17262306a36Sopenharmony_ci * resetting the index to the start of the queue.
17362306a36Sopenharmony_ci */
17462306a36Sopenharmony_civoid rt2x00queue_index_inc(struct queue_entry *entry, enum queue_index index);
17562306a36Sopenharmony_ci
17662306a36Sopenharmony_ci/**
17762306a36Sopenharmony_ci * rt2x00queue_init_queues - Initialize all data queues
17862306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
17962306a36Sopenharmony_ci *
18062306a36Sopenharmony_ci * This function will loop through all available queues to clear all
18162306a36Sopenharmony_ci * index numbers and set the queue entry to the correct initialization
18262306a36Sopenharmony_ci * state.
18362306a36Sopenharmony_ci */
18462306a36Sopenharmony_civoid rt2x00queue_init_queues(struct rt2x00_dev *rt2x00dev);
18562306a36Sopenharmony_ci
18662306a36Sopenharmony_ciint rt2x00queue_initialize(struct rt2x00_dev *rt2x00dev);
18762306a36Sopenharmony_civoid rt2x00queue_uninitialize(struct rt2x00_dev *rt2x00dev);
18862306a36Sopenharmony_ciint rt2x00queue_allocate(struct rt2x00_dev *rt2x00dev);
18962306a36Sopenharmony_civoid rt2x00queue_free(struct rt2x00_dev *rt2x00dev);
19062306a36Sopenharmony_ci
19162306a36Sopenharmony_ci/**
19262306a36Sopenharmony_ci * rt2x00link_update_stats - Update link statistics from RX frame
19362306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
19462306a36Sopenharmony_ci * @skb: Received frame
19562306a36Sopenharmony_ci * @rxdesc: Received frame descriptor
19662306a36Sopenharmony_ci *
19762306a36Sopenharmony_ci * Update link statistics based on the information from the
19862306a36Sopenharmony_ci * received frame descriptor.
19962306a36Sopenharmony_ci */
20062306a36Sopenharmony_civoid rt2x00link_update_stats(struct rt2x00_dev *rt2x00dev,
20162306a36Sopenharmony_ci			     struct sk_buff *skb,
20262306a36Sopenharmony_ci			     struct rxdone_entry_desc *rxdesc);
20362306a36Sopenharmony_ci
20462306a36Sopenharmony_ci/**
20562306a36Sopenharmony_ci * rt2x00link_start_tuner - Start periodic link tuner work
20662306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
20762306a36Sopenharmony_ci *
20862306a36Sopenharmony_ci * This start the link tuner periodic work, this work will
20962306a36Sopenharmony_ci * be executed periodically until &rt2x00link_stop_tuner has
21062306a36Sopenharmony_ci * been called.
21162306a36Sopenharmony_ci */
21262306a36Sopenharmony_civoid rt2x00link_start_tuner(struct rt2x00_dev *rt2x00dev);
21362306a36Sopenharmony_ci
21462306a36Sopenharmony_ci/**
21562306a36Sopenharmony_ci * rt2x00link_stop_tuner - Stop periodic link tuner work
21662306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
21762306a36Sopenharmony_ci *
21862306a36Sopenharmony_ci * After this function completed the link tuner will not
21962306a36Sopenharmony_ci * be running until &rt2x00link_start_tuner is called.
22062306a36Sopenharmony_ci */
22162306a36Sopenharmony_civoid rt2x00link_stop_tuner(struct rt2x00_dev *rt2x00dev);
22262306a36Sopenharmony_ci
22362306a36Sopenharmony_ci/**
22462306a36Sopenharmony_ci * rt2x00link_reset_tuner - Reset periodic link tuner work
22562306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
22662306a36Sopenharmony_ci * @antenna: Should the antenna tuning also be reset
22762306a36Sopenharmony_ci *
22862306a36Sopenharmony_ci * The VGC limit configured in the hardware will be reset to 0
22962306a36Sopenharmony_ci * which forces the driver to rediscover the correct value for
23062306a36Sopenharmony_ci * the current association. This is needed when configuration
23162306a36Sopenharmony_ci * options have changed which could drastically change the
23262306a36Sopenharmony_ci * SNR level or link quality (i.e. changing the antenna setting).
23362306a36Sopenharmony_ci *
23462306a36Sopenharmony_ci * Resetting the link tuner will also cause the periodic work counter
23562306a36Sopenharmony_ci * to be reset. Any driver which has a fixed limit on the number
23662306a36Sopenharmony_ci * of rounds the link tuner is supposed to work will accept the
23762306a36Sopenharmony_ci * tuner actions again if this limit was previously reached.
23862306a36Sopenharmony_ci *
23962306a36Sopenharmony_ci * If @antenna is set to true a the software antenna diversity
24062306a36Sopenharmony_ci * tuning will also be reset.
24162306a36Sopenharmony_ci */
24262306a36Sopenharmony_civoid rt2x00link_reset_tuner(struct rt2x00_dev *rt2x00dev, bool antenna);
24362306a36Sopenharmony_ci
24462306a36Sopenharmony_ci/**
24562306a36Sopenharmony_ci * rt2x00link_start_watchdog - Start periodic watchdog monitoring
24662306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
24762306a36Sopenharmony_ci *
24862306a36Sopenharmony_ci * This start the watchdog periodic work, this work will
24962306a36Sopenharmony_ci *be executed periodically until &rt2x00link_stop_watchdog has
25062306a36Sopenharmony_ci * been called.
25162306a36Sopenharmony_ci */
25262306a36Sopenharmony_civoid rt2x00link_start_watchdog(struct rt2x00_dev *rt2x00dev);
25362306a36Sopenharmony_ci
25462306a36Sopenharmony_ci/**
25562306a36Sopenharmony_ci * rt2x00link_stop_watchdog - Stop periodic watchdog monitoring
25662306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
25762306a36Sopenharmony_ci *
25862306a36Sopenharmony_ci * After this function completed the watchdog monitoring will not
25962306a36Sopenharmony_ci * be running until &rt2x00link_start_watchdog is called.
26062306a36Sopenharmony_ci */
26162306a36Sopenharmony_civoid rt2x00link_stop_watchdog(struct rt2x00_dev *rt2x00dev);
26262306a36Sopenharmony_ci
26362306a36Sopenharmony_ci/**
26462306a36Sopenharmony_ci * rt2x00link_register - Initialize link tuning & watchdog functionality
26562306a36Sopenharmony_ci * @rt2x00dev: Pointer to &struct rt2x00_dev.
26662306a36Sopenharmony_ci *
26762306a36Sopenharmony_ci * Initialize work structure and all link tuning and watchdog related
26862306a36Sopenharmony_ci * parameters. This will not start the periodic work itself.
26962306a36Sopenharmony_ci */
27062306a36Sopenharmony_civoid rt2x00link_register(struct rt2x00_dev *rt2x00dev);
27162306a36Sopenharmony_ci
27262306a36Sopenharmony_ci/*
27362306a36Sopenharmony_ci * Firmware handlers.
27462306a36Sopenharmony_ci */
27562306a36Sopenharmony_ci#ifdef CONFIG_RT2X00_LIB_FIRMWARE
27662306a36Sopenharmony_ciint rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev);
27762306a36Sopenharmony_civoid rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev);
27862306a36Sopenharmony_ci#else
27962306a36Sopenharmony_cistatic inline int rt2x00lib_load_firmware(struct rt2x00_dev *rt2x00dev)
28062306a36Sopenharmony_ci{
28162306a36Sopenharmony_ci	return 0;
28262306a36Sopenharmony_ci}
28362306a36Sopenharmony_cistatic inline void rt2x00lib_free_firmware(struct rt2x00_dev *rt2x00dev)
28462306a36Sopenharmony_ci{
28562306a36Sopenharmony_ci}
28662306a36Sopenharmony_ci#endif /* CONFIG_RT2X00_LIB_FIRMWARE */
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ci/*
28962306a36Sopenharmony_ci * Debugfs handlers.
29062306a36Sopenharmony_ci */
29162306a36Sopenharmony_ci#ifdef CONFIG_RT2X00_LIB_DEBUGFS
29262306a36Sopenharmony_civoid rt2x00debug_register(struct rt2x00_dev *rt2x00dev);
29362306a36Sopenharmony_civoid rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev);
29462306a36Sopenharmony_civoid rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
29562306a36Sopenharmony_ci			       struct rxdone_entry_desc *rxdesc);
29662306a36Sopenharmony_ci#else
29762306a36Sopenharmony_cistatic inline void rt2x00debug_register(struct rt2x00_dev *rt2x00dev)
29862306a36Sopenharmony_ci{
29962306a36Sopenharmony_ci}
30062306a36Sopenharmony_ci
30162306a36Sopenharmony_cistatic inline void rt2x00debug_deregister(struct rt2x00_dev *rt2x00dev)
30262306a36Sopenharmony_ci{
30362306a36Sopenharmony_ci}
30462306a36Sopenharmony_ci
30562306a36Sopenharmony_cistatic inline void rt2x00debug_update_crypto(struct rt2x00_dev *rt2x00dev,
30662306a36Sopenharmony_ci					     struct rxdone_entry_desc *rxdesc)
30762306a36Sopenharmony_ci{
30862306a36Sopenharmony_ci}
30962306a36Sopenharmony_ci#endif /* CONFIG_RT2X00_LIB_DEBUGFS */
31062306a36Sopenharmony_ci
31162306a36Sopenharmony_ci/*
31262306a36Sopenharmony_ci * Crypto handlers.
31362306a36Sopenharmony_ci */
31462306a36Sopenharmony_ci#ifdef CONFIG_RT2X00_LIB_CRYPTO
31562306a36Sopenharmony_cienum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf *key);
31662306a36Sopenharmony_civoid rt2x00crypto_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
31762306a36Sopenharmony_ci				       struct sk_buff *skb,
31862306a36Sopenharmony_ci				       struct txentry_desc *txdesc);
31962306a36Sopenharmony_ciunsigned int rt2x00crypto_tx_overhead(struct rt2x00_dev *rt2x00dev,
32062306a36Sopenharmony_ci				      struct sk_buff *skb);
32162306a36Sopenharmony_civoid rt2x00crypto_tx_copy_iv(struct sk_buff *skb,
32262306a36Sopenharmony_ci			     struct txentry_desc *txdesc);
32362306a36Sopenharmony_civoid rt2x00crypto_tx_remove_iv(struct sk_buff *skb,
32462306a36Sopenharmony_ci			       struct txentry_desc *txdesc);
32562306a36Sopenharmony_civoid rt2x00crypto_tx_insert_iv(struct sk_buff *skb, unsigned int header_length);
32662306a36Sopenharmony_civoid rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
32762306a36Sopenharmony_ci			       unsigned int header_length,
32862306a36Sopenharmony_ci			       struct rxdone_entry_desc *rxdesc);
32962306a36Sopenharmony_ci#else
33062306a36Sopenharmony_cistatic inline enum cipher rt2x00crypto_key_to_cipher(struct ieee80211_key_conf *key)
33162306a36Sopenharmony_ci{
33262306a36Sopenharmony_ci	return CIPHER_NONE;
33362306a36Sopenharmony_ci}
33462306a36Sopenharmony_ci
33562306a36Sopenharmony_cistatic inline void rt2x00crypto_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
33662306a36Sopenharmony_ci						     struct sk_buff *skb,
33762306a36Sopenharmony_ci						     struct txentry_desc *txdesc)
33862306a36Sopenharmony_ci{
33962306a36Sopenharmony_ci}
34062306a36Sopenharmony_ci
34162306a36Sopenharmony_cistatic inline unsigned int rt2x00crypto_tx_overhead(struct rt2x00_dev *rt2x00dev,
34262306a36Sopenharmony_ci						    struct sk_buff *skb)
34362306a36Sopenharmony_ci{
34462306a36Sopenharmony_ci	return 0;
34562306a36Sopenharmony_ci}
34662306a36Sopenharmony_ci
34762306a36Sopenharmony_cistatic inline void rt2x00crypto_tx_copy_iv(struct sk_buff *skb,
34862306a36Sopenharmony_ci					   struct txentry_desc *txdesc)
34962306a36Sopenharmony_ci{
35062306a36Sopenharmony_ci}
35162306a36Sopenharmony_ci
35262306a36Sopenharmony_cistatic inline void rt2x00crypto_tx_remove_iv(struct sk_buff *skb,
35362306a36Sopenharmony_ci					     struct txentry_desc *txdesc)
35462306a36Sopenharmony_ci{
35562306a36Sopenharmony_ci}
35662306a36Sopenharmony_ci
35762306a36Sopenharmony_cistatic inline void rt2x00crypto_tx_insert_iv(struct sk_buff *skb,
35862306a36Sopenharmony_ci					     unsigned int header_length)
35962306a36Sopenharmony_ci{
36062306a36Sopenharmony_ci}
36162306a36Sopenharmony_ci
36262306a36Sopenharmony_cistatic inline void rt2x00crypto_rx_insert_iv(struct sk_buff *skb,
36362306a36Sopenharmony_ci					     unsigned int header_length,
36462306a36Sopenharmony_ci					     struct rxdone_entry_desc *rxdesc)
36562306a36Sopenharmony_ci{
36662306a36Sopenharmony_ci}
36762306a36Sopenharmony_ci#endif /* CONFIG_RT2X00_LIB_CRYPTO */
36862306a36Sopenharmony_ci
36962306a36Sopenharmony_ci/*
37062306a36Sopenharmony_ci * RFkill handlers.
37162306a36Sopenharmony_ci */
37262306a36Sopenharmony_cistatic inline void rt2x00rfkill_register(struct rt2x00_dev *rt2x00dev)
37362306a36Sopenharmony_ci{
37462306a36Sopenharmony_ci	if (test_bit(CAPABILITY_HW_BUTTON, &rt2x00dev->cap_flags))
37562306a36Sopenharmony_ci		wiphy_rfkill_start_polling(rt2x00dev->hw->wiphy);
37662306a36Sopenharmony_ci}
37762306a36Sopenharmony_ci
37862306a36Sopenharmony_cistatic inline void rt2x00rfkill_unregister(struct rt2x00_dev *rt2x00dev)
37962306a36Sopenharmony_ci{
38062306a36Sopenharmony_ci	if (test_bit(CAPABILITY_HW_BUTTON, &rt2x00dev->cap_flags))
38162306a36Sopenharmony_ci		wiphy_rfkill_stop_polling(rt2x00dev->hw->wiphy);
38262306a36Sopenharmony_ci}
38362306a36Sopenharmony_ci
38462306a36Sopenharmony_ci/*
38562306a36Sopenharmony_ci * LED handlers
38662306a36Sopenharmony_ci */
38762306a36Sopenharmony_ci#ifdef CONFIG_RT2X00_LIB_LEDS
38862306a36Sopenharmony_civoid rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev, int rssi);
38962306a36Sopenharmony_civoid rt2x00led_led_activity(struct rt2x00_dev *rt2x00dev, bool enabled);
39062306a36Sopenharmony_civoid rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev, bool enabled);
39162306a36Sopenharmony_civoid rt2x00leds_led_radio(struct rt2x00_dev *rt2x00dev, bool enabled);
39262306a36Sopenharmony_civoid rt2x00leds_register(struct rt2x00_dev *rt2x00dev);
39362306a36Sopenharmony_civoid rt2x00leds_unregister(struct rt2x00_dev *rt2x00dev);
39462306a36Sopenharmony_civoid rt2x00leds_suspend(struct rt2x00_dev *rt2x00dev);
39562306a36Sopenharmony_civoid rt2x00leds_resume(struct rt2x00_dev *rt2x00dev);
39662306a36Sopenharmony_ci#else
39762306a36Sopenharmony_cistatic inline void rt2x00leds_led_quality(struct rt2x00_dev *rt2x00dev,
39862306a36Sopenharmony_ci					  int rssi)
39962306a36Sopenharmony_ci{
40062306a36Sopenharmony_ci}
40162306a36Sopenharmony_ci
40262306a36Sopenharmony_cistatic inline void rt2x00led_led_activity(struct rt2x00_dev *rt2x00dev,
40362306a36Sopenharmony_ci					  bool enabled)
40462306a36Sopenharmony_ci{
40562306a36Sopenharmony_ci}
40662306a36Sopenharmony_ci
40762306a36Sopenharmony_cistatic inline void rt2x00leds_led_assoc(struct rt2x00_dev *rt2x00dev,
40862306a36Sopenharmony_ci					bool enabled)
40962306a36Sopenharmony_ci{
41062306a36Sopenharmony_ci}
41162306a36Sopenharmony_ci
41262306a36Sopenharmony_cistatic inline void rt2x00leds_led_radio(struct rt2x00_dev *rt2x00dev,
41362306a36Sopenharmony_ci					bool enabled)
41462306a36Sopenharmony_ci{
41562306a36Sopenharmony_ci}
41662306a36Sopenharmony_ci
41762306a36Sopenharmony_cistatic inline void rt2x00leds_register(struct rt2x00_dev *rt2x00dev)
41862306a36Sopenharmony_ci{
41962306a36Sopenharmony_ci}
42062306a36Sopenharmony_ci
42162306a36Sopenharmony_cistatic inline void rt2x00leds_unregister(struct rt2x00_dev *rt2x00dev)
42262306a36Sopenharmony_ci{
42362306a36Sopenharmony_ci}
42462306a36Sopenharmony_ci
42562306a36Sopenharmony_cistatic inline void rt2x00leds_suspend(struct rt2x00_dev *rt2x00dev)
42662306a36Sopenharmony_ci{
42762306a36Sopenharmony_ci}
42862306a36Sopenharmony_ci
42962306a36Sopenharmony_cistatic inline void rt2x00leds_resume(struct rt2x00_dev *rt2x00dev)
43062306a36Sopenharmony_ci{
43162306a36Sopenharmony_ci}
43262306a36Sopenharmony_ci#endif /* CONFIG_RT2X00_LIB_LEDS */
43362306a36Sopenharmony_ci
43462306a36Sopenharmony_ci#endif /* RT2X00LIB_H */
435