linux/drivers/staging/rtl8192e/rtllib_softmac.c

// SPDX-License-Identifier: GPL-2.0
/* IEEE 802.11 SoftMAC layer
 * Copyright (c) 2005 Andrea Merello <[email protected]>
 *
 * Mostly extracted from the rtl8180-sa2400 driver for the
 * in-kernel generic ieee802.11 stack.
 *
 * Few lines might be stolen from other part of the rtllib
 * stack. Copyright who own it's copyright
 *
 * WPA code stolen from the ipw2200 driver.
 * Copyright who own it's copyright.
 */
#include "rtllib.h"

#include <linux/random.h>
#include <linux/delay.h>
#include <linux/uaccess.h>
#include <linux/etherdevice.h>
#include <linux/ieee80211.h>

static void rtllib_sta_wakeup(struct rtllib_device *ieee, short nl);

static short rtllib_is_54g(struct rtllib_network *net)
{}

/* returns the total length needed for placing the RATE MFIE
 * tag and the EXTENDED RATE MFIE tag if needed.
 * It encludes two bytes per tag for the tag itself and its len
 */
static unsigned int rtllib_MFIE_rate_len(struct rtllib_device *ieee)
{}

/* place the MFIE rate, tag to the memory (double) pointed.
 * Then it updates the pointer so that
 * it points after the new MFIE tag added.
 */
static void rtllib_mfie_brate(struct rtllib_device *ieee, u8 **tag_p)
{}

static void rtllib_mfie_grate(struct rtllib_device *ieee, u8 **tag_p)
{}

static void rtllib_wmm_info(struct rtllib_device *ieee, u8 **tag_p)
{}

static void rtllib_turbo_info(struct rtllib_device *ieee, u8 **tag_p)
{}

static void enqueue_mgmt(struct rtllib_device *ieee, struct sk_buff *skb)
{}

static void init_mgmt_queue(struct rtllib_device *ieee)
{}

u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee)
{}

static u8 mgnt_query_mgnt_frame_tx_rate(struct rtllib_device *ieee)
{}

inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee)
{}

static inline void
softmac_ps_mgmt_xmit(struct sk_buff *skb,
		     struct rtllib_device *ieee)
{}

static inline struct sk_buff *rtllib_probe_req(struct rtllib_device *ieee)
{}

/* Enables network monitor mode, all rx packets will be received. */
void rtllib_enable_net_monitor_mode(struct net_device *dev,
		bool init_state)
{}

/* Disables network monitor mode. Only packets destinated to
 * us will be received.
 */
void rtllib_disable_net_monitor_mode(struct net_device *dev, bool init_state)
{}

static void rtllib_send_probe(struct rtllib_device *ieee)
{}

static void rtllib_send_probe_requests(struct rtllib_device *ieee)
{}

/* this performs syncro scan blocking the caller until all channels
 * in the allowed channel map has been checked.
 */
static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee)
{}

static void rtllib_softmac_scan_wq(void *data)
{}

static void rtllib_softmac_stop_scan(struct rtllib_device *ieee)
{}

void rtllib_stop_scan(struct rtllib_device *ieee)
{}
EXPORT_SYMBOL();

void rtllib_stop_scan_syncro(struct rtllib_device *ieee)
{}
EXPORT_SYMBOL();

bool rtllib_act_scanning(struct rtllib_device *ieee, bool sync_scan)
{}
EXPORT_SYMBOL();

/* called with ieee->lock held */
static void rtllib_start_scan(struct rtllib_device *ieee)
{}

/* called with wx_mutex held */
void rtllib_start_scan_syncro(struct rtllib_device *ieee)
{}
EXPORT_SYMBOL();

static inline struct sk_buff *
rtllib_authentication_req(struct rtllib_network *beacon,
			  struct rtllib_device *ieee,
			  int challengelen, u8 *daddr)
{}

static struct sk_buff *rtllib_null_func(struct rtllib_device *ieee, short pwr)
{}

static struct sk_buff *rtllib_pspoll_func(struct rtllib_device *ieee)
{}

static inline int sec_is_in_pmkid_list(struct rtllib_device *ieee, u8 *bssid)
{}

static inline struct sk_buff *
rtllib_association_req(struct rtllib_network *beacon,
		       struct rtllib_device *ieee)
{}

static void rtllib_associate_abort(struct rtllib_device *ieee)
{}

static void rtllib_associate_abort_cb(struct timer_list *t)
{}

static void rtllib_associate_step1(struct rtllib_device *ieee, u8 *daddr)
{}

static void rtllib_auth_challenge(struct rtllib_device *ieee, u8 *challenge,
				  int chlen)
{}

static void rtllib_associate_step2(struct rtllib_device *ieee)
{}

static void rtllib_associate_complete_wq(void *data)
{}

static void rtllib_sta_send_associnfo(struct rtllib_device *ieee)
{}

static void rtllib_associate_complete(struct rtllib_device *ieee)
{}

static void rtllib_associate_procedure_wq(void *data)
{}

inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
				   struct rtllib_network *net)
{}

static void rtllib_softmac_check_all_nets(struct rtllib_device *ieee)
{}

static inline int auth_parse(struct net_device *dev, struct sk_buff *skb,
			     u8 **challenge, int *chlen)
{}

static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb,
			      int *aid)
{}

void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr)
{}
EXPORT_SYMBOL();

void rtllib_sta_ps_send_pspoll_frame(struct rtllib_device *ieee)
{}

static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
{}

static inline void rtllib_sta_ps(struct work_struct *work)
{}

static void rtllib_sta_wakeup(struct rtllib_device *ieee, short nl)
{}

void rtllib_ps_tx_ack(struct rtllib_device *ieee, short success)
{}
EXPORT_SYMBOL();

static void rtllib_process_action(struct rtllib_device *ieee,
				  struct sk_buff *skb)
{}

static inline int
rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
		     struct rtllib_rx_stats *rx_stats)
{}

static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb)
{}

static inline int
rtllib_rx_auth(struct rtllib_device *ieee, struct sk_buff *skb,
	       struct rtllib_rx_stats *rx_stats)
{}

static inline int
rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb)
{}

inline int rtllib_rx_frame_softmac(struct rtllib_device *ieee,
				   struct sk_buff *skb,
				   struct rtllib_rx_stats *rx_stats, u16 type,
				   u16 stype)
{}

/* following are for a simpler TX queue management.
 * Instead of using netif_[stop/wake]_queue the driver
 * will use these two functions (plus a reset one), that
 * will internally use the kernel netif_* and takes
 * care of the ieee802.11 fragmentation.
 * So the driver receives a fragment per time and might
 * call the stop function when it wants to not
 * have enough room to TX an entire packet.
 * This might be useful if each fragment needs it's own
 * descriptor, thus just keep a total free memory > than
 * the max fragmentation threshold is not enough.. If the
 * ieee802.11 stack passed a TXB struct then you need
 * to keep N free descriptors where
 * N = MAX_PACKET_SIZE / MIN_FRAG_TRESHOLD
 * In this way you need just one and the 802.11 stack
 * will take care of buffering fragments and pass them to
 * the driver later, when it wakes the queue.
 */
void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee)
{}

void rtllib_reset_queue(struct rtllib_device *ieee)
{}
EXPORT_SYMBOL();

void rtllib_stop_all_queues(struct rtllib_device *ieee)
{}

void rtllib_wake_all_queues(struct rtllib_device *ieee)
{}

/* this is called only in user context, with wx_mutex held */
static void rtllib_start_bss(struct rtllib_device *ieee)
{}

static void rtllib_link_change_wq(void *data)
{}

/* called only in userspace context */
void rtllib_disassociate(struct rtllib_device *ieee)
{}

static void rtllib_associate_retry_wq(void *data)
{}

void rtllib_softmac_stop_protocol(struct rtllib_device *ieee)
{}
EXPORT_SYMBOL();

void rtllib_stop_protocol(struct rtllib_device *ieee)
{}

void rtllib_softmac_start_protocol(struct rtllib_device *ieee)
{}
EXPORT_SYMBOL();

void rtllib_start_protocol(struct rtllib_device *ieee)
{}

int rtllib_softmac_init(struct rtllib_device *ieee)
{}

void rtllib_softmac_free(struct rtllib_device *ieee)
{}

static inline struct sk_buff *
rtllib_disauth_skb(struct rtllib_network *beacon,
		   struct rtllib_device *ieee, u16 rsn)
{}

static inline struct sk_buff *
rtllib_disassociate_skb(struct rtllib_network *beacon,
			struct rtllib_device *ieee, u16 rsn)
{}

void send_disassociation(struct rtllib_device *ieee, bool deauth, u16 rsn)
{}

u8 rtllib_ap_sec_type(struct rtllib_device *ieee)
{}

static void rtllib_mlme_disassociate_request(struct rtllib_device *rtllib,
					     u8 *addr, u8 rsn)
{}

static void rtllib_mgnt_disconnect_ap(struct rtllib_device *rtllib, u8 rsn)
{}

bool rtllib_mgnt_disconnect(struct rtllib_device *rtllib, u8 rsn)
{}
EXPORT_SYMBOL();

void notify_wx_assoc_event(struct rtllib_device *ieee)
{}
EXPORT_SYMBOL();