Main Page | Data Structures | Directories | File List | Data Fields | Globals

hostap_ap.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define STA_MAX_TX_BUFFER   32
#define AP_SKB_CB_MAGIC   "hostap"
#define AP_SKB_CB_MAGIC_LEN   6
#define AP_SKB_CB_BUFFERED_FRAME   BIT(0)
#define AP_SKB_CB_ADD_MOREDATA   BIT(1)
#define WLAN_STA_AUTH   BIT(0)
#define WLAN_STA_ASSOC   BIT(1)
#define WLAN_STA_PS   BIT(2)
#define WLAN_STA_TIM   BIT(3)
#define WLAN_STA_PERM   BIT(4)
#define WLAN_STA_AUTHORIZED   BIT(5)
#define WLAN_STA_PENDING_POLL   BIT(6)
#define WLAN_RATE_1M   BIT(0)
#define WLAN_RATE_2M   BIT(1)
#define WLAN_RATE_5M5   BIT(2)
#define WLAN_RATE_11M   BIT(3)
#define WLAN_RATE_COUNT   4
#define WLAN_SUPP_RATES_MAX   32
#define WLAN_RATE_UPDATE_COUNT   50
#define WLAN_RATE_DECREASE_THRESHOLD   2
#define MAX_STA_COUNT   1024
#define MAX_AID_TABLE_SIZE   128
#define STA_HASH_SIZE   256
#define STA_HASH(sta)   (sta[5])
#define AP_MAX_INACTIVITY_SEC   (5 * 60)
#define AP_DISASSOC_DELAY   (HZ)
#define AP_DEAUTH_DELAY   (HZ)
#define PRISM2_AUTH_OPEN   BIT(0)
#define PRISM2_AUTH_SHARED_KEY   BIT(1)

Enumerations

enum  ap_policy_enum { AP_OTHER_AP_SKIP_ALL = 0, AP_OTHER_AP_SAME_SSID = 1, AP_OTHER_AP_ALL = 2, AP_OTHER_AP_EVEN_IBSS = 3 }
enum  wds_oper_type { WDS_ADD, WDS_DEL }
enum  ap_tx_ret {
  AP_TX_CONTINUE, AP_TX_DROP, AP_TX_RETRY, AP_TX_BUFFERED,
  AP_TX_CONTINUE_NOT_AUTHORIZED
}
enum  ap_rx_ret { AP_RX_CONTINUE, AP_RX_DROP, AP_RX_EXIT, AP_RX_CONTINUE_NOT_AUTHORIZED }

Functions

void hostap_rx (struct net_device *dev, struct sk_buff *skb, struct hostap_80211_rx_status *rx_stats)
void hostap_init_data (local_info_t *local)
void hostap_free_data (struct ap_data *ap)
void hostap_check_sta_fw_version (struct ap_data *ap, int sta_fw_ver)
ap_tx_ret hostap_handle_sta_tx (local_info_t *local, struct sk_buff *skb, struct hfa384x_tx_frame *txdesc, int wds, int host_encrypt, struct prism2_crypt_data **crypt, void **sta_ptr)
void hostap_handle_sta_release (void *ptr)
void hostap_handle_sta_tx_exc (local_info_t *local, struct hfa384x_tx_frame *txdesc)
int hostap_update_sta_ps (local_info_t *local, struct hostap_ieee80211_hdr *hdr)
ap_rx_ret hostap_handle_sta_rx (local_info_t *local, struct net_device *dev, struct sk_buff *skb, struct hostap_80211_rx_status *rx_stats, int wds)
int hostap_handle_sta_crypto (local_info_t *local, struct hostap_ieee80211_hdr *hdr, struct prism2_crypt_data **crypt, void **sta_ptr)
int hostap_is_sta_assoc (struct ap_data *ap, u8 *sta_addr)
int hostap_add_sta (struct ap_data *ap, u8 *sta_addr)
int hostap_update_rx_stats (struct ap_data *ap, struct hostap_ieee80211_hdr *hdr, struct hostap_80211_rx_status *rx_stats)
void hostap_update_rates (local_info_t *local)
void hostap_add_wds_links (local_info_t *local)
void hostap_wds_link_oper (local_info_t *local, u8 *addr, wds_oper_type type)
void hostap_ap_update_sq (struct sta_info *sta, struct hostap_80211_rx_status *rx_stats)
void hostap_deauth_all_stas (struct net_device *dev, struct ap_data *ap, int resend)


Define Documentation

#define AP_DEAUTH_DELAY   (HZ)
 

Definition at line 129 of file hostap_ap.h.

Referenced by ap_handle_timer().

#define AP_DISASSOC_DELAY   (HZ)
 

Definition at line 128 of file hostap_ap.h.

Referenced by ap_handle_timer().

#define AP_MAX_INACTIVITY_SEC   (5 * 60)
 

Definition at line 127 of file hostap_ap.h.

#define AP_SKB_CB_ADD_MOREDATA   BIT(1)
 

Definition at line 15 of file hostap_ap.h.

Referenced by hostap_handle_sta_tx(), and pspoll_send_buffered().

#define AP_SKB_CB_BUFFERED_FRAME   BIT(0)
 

Definition at line 14 of file hostap_ap.h.

Referenced by hostap_handle_sta_tx(), and pspoll_send_buffered().

#define AP_SKB_CB_MAGIC   "hostap"
 

Definition at line 12 of file hostap_ap.h.

Referenced by hostap_handle_sta_tx(), and pspoll_send_buffered().

#define AP_SKB_CB_MAGIC_LEN   6
 

Definition at line 13 of file hostap_ap.h.

Referenced by hostap_handle_sta_tx(), and pspoll_send_buffered().

#define MAX_AID_TABLE_SIZE   128
 

Definition at line 114 of file hostap_ap.h.

Referenced by handle_assoc(), and handle_pspoll().

#define MAX_STA_COUNT   1024
 

Definition at line 110 of file hostap_ap.h.

Referenced by handle_authen().

#define PRISM2_AUTH_OPEN   BIT(0)
 

Definition at line 139 of file hostap_ap.h.

Referenced by handle_authen(), hostap_set_auth_algs(), and prism2_init_local_data().

#define PRISM2_AUTH_SHARED_KEY   BIT(1)
 

Definition at line 140 of file hostap_ap.h.

Referenced by handle_authen(), hostap_set_auth_algs(), and prism2_init_local_data().

#define STA_HASH sta  )    (sta[5])
 

Definition at line 117 of file hostap_ap.h.

Referenced by ap_get_sta(), ap_sta_hash_add(), and ap_sta_hash_del().

#define STA_HASH_SIZE   256
 

Definition at line 116 of file hostap_ap.h.

#define STA_MAX_TX_BUFFER   32
 

Definition at line 7 of file hostap_ap.h.

Referenced by hostap_handle_sta_tx().

#define WLAN_RATE_11M   BIT(3)
 

Definition at line 33 of file hostap_ap.h.

Referenced by handle_assoc(), hostap_add_sta(), prism2_check_tx_rates(), and prism2_hostapd_add_sta().

#define WLAN_RATE_1M   BIT(0)
 

Definition at line 30 of file hostap_ap.h.

Referenced by handle_assoc(), hostap_add_sta(), prism2_check_tx_rates(), and prism2_hostapd_add_sta().

#define WLAN_RATE_2M   BIT(1)
 

Definition at line 31 of file hostap_ap.h.

Referenced by handle_assoc(), hostap_add_sta(), prism2_check_tx_rates(), and prism2_hostapd_add_sta().

#define WLAN_RATE_5M5   BIT(2)
 

Definition at line 32 of file hostap_ap.h.

Referenced by handle_assoc(), hostap_add_sta(), prism2_check_tx_rates(), and prism2_hostapd_add_sta().

#define WLAN_RATE_COUNT   4
 

Definition at line 34 of file hostap_ap.h.

#define WLAN_RATE_DECREASE_THRESHOLD   2
 

Definition at line 44 of file hostap_ap.h.

Referenced by hostap_handle_sta_tx_exc().

#define WLAN_RATE_UPDATE_COUNT   50
 

Definition at line 41 of file hostap_ap.h.

Referenced by ap_update_sta_tx_rate().

#define WLAN_STA_ASSOC   BIT(1)
 

Definition at line 20 of file hostap_ap.h.

Referenced by ap_control_kick_mac(), ap_control_kickall(), ap_handle_dropped_data(), ap_handle_timer(), handle_beacon(), handle_deauth(), handle_disassoc(), hostap_add_sta(), hostap_ap_tx_cb_assoc(), hostap_free_data(), hostap_handle_sta_rx(), hostap_is_sta_assoc(), prism2_hostapd_add_sta(), prism2_hostapd_remove_sta(), and prism2_sta_proc_read().

#define WLAN_STA_AUTH   BIT(0)
 

Definition at line 19 of file hostap_ap.h.

Referenced by ap_handle_timer(), handle_assoc(), handle_authen(), handle_beacon(), handle_deauth(), hostap_add_sta(), hostap_ap_tx_cb_auth(), prism2_hostapd_add_sta(), and prism2_sta_proc_read().

#define WLAN_STA_AUTHORIZED   BIT(5)
 

Definition at line 24 of file hostap_ap.h.

Referenced by hostap_handle_sta_rx(), hostap_handle_sta_tx(), and prism2_sta_proc_read().

#define WLAN_STA_PENDING_POLL   BIT(6)
 

Definition at line 28 of file hostap_ap.h.

Referenced by ap_handle_timer(), hostap_ap_tx_cb_poll(), and prism2_sta_proc_read().

#define WLAN_STA_PERM   BIT(4)
 

Definition at line 23 of file hostap_ap.h.

Referenced by ap_crypt_get_ptrs(), ap_handle_timer(), and prism2_sta_proc_read().

#define WLAN_STA_PS   BIT(2)
 

Definition at line 21 of file hostap_ap.h.

Referenced by handle_pspoll(), hostap_handle_sta_tx(), hostap_update_sta_ps2(), prism2_sta_proc_read(), and pspoll_send_buffered().

#define WLAN_STA_TIM   BIT(3)
 

Definition at line 22 of file hostap_ap.h.

Referenced by ap_handle_timer(), handle_pspoll(), hostap_handle_sta_tx(), and prism2_sta_proc_read().

#define WLAN_SUPP_RATES_MAX   32
 

Definition at line 38 of file hostap_ap.h.

Referenced by handle_assoc().


Enumeration Type Documentation

enum ap_policy_enum
 

Enumeration values:
AP_OTHER_AP_SKIP_ALL 
AP_OTHER_AP_SAME_SSID 
AP_OTHER_AP_ALL 
AP_OTHER_AP_EVEN_IBSS 

Definition at line 132 of file hostap_ap.h.

enum ap_rx_ret
 

Enumeration values:
AP_RX_CONTINUE 
AP_RX_DROP 
AP_RX_EXIT 
AP_RX_CONTINUE_NOT_AUTHORIZED 

Definition at line 246 of file hostap_ap.h.

enum ap_tx_ret
 

Enumeration values:
AP_TX_CONTINUE 
AP_TX_DROP 
AP_TX_RETRY 
AP_TX_BUFFERED 
AP_TX_CONTINUE_NOT_AUTHORIZED 

Definition at line 232 of file hostap_ap.h.

enum wds_oper_type
 

Enumeration values:
WDS_ADD 
WDS_DEL 

Definition at line 163 of file hostap_ap.h.


Function Documentation

int hostap_add_sta struct ap_dataap,
u8 * sta_addr
 

Definition at line 3187 of file hostap_ap.c.

References sta_info::ap, ap_add_sta(), ap_get_sta(), sta_info::flags, sta_info::supported_rates, sta_info::tx_max_rate, sta_info::tx_rate, sta_info::tx_rate_idx, sta_info::tx_supp_rates, WLAN_RATE_11M, WLAN_RATE_1M, WLAN_RATE_2M, WLAN_RATE_5M5, WLAN_STA_ASSOC, and WLAN_STA_AUTH.

Referenced by handle_info_queue_linkstatus(), and prism2_wds_add().

Here is the call graph for this function:

void hostap_add_wds_links local_info_t * local  ) 
 

Definition at line 3288 of file hostap_ap.c.

References sta_info::addr, sta_info::ap, hostap_wds_link_oper(), PRISM2_SCHEDULE_TASK, spin_lock_bh, spin_unlock_bh, ap_data::sta_list, ap_data::sta_table_lock, and WDS_ADD.

Here is the call graph for this function:

void hostap_ap_update_sq struct sta_infosta,
struct hostap_80211_rx_statusrx_stats
 

Definition at line 2053 of file hostap_ap.c.

References sta_info::last_rx_rate, sta_info::last_rx_signal, sta_info::last_rx_silence, sta_info::last_rx_updated, and sta_info::rx_count.

Referenced by handle_assoc(), handle_authen(), handle_beacon(), handle_deauth(), handle_disassoc(), handle_pspoll(), hostap_handle_sta_rx(), and hostap_update_rx_stats().

void hostap_check_sta_fw_version struct ap_dataap,
int sta_fw_ver
 

Definition at line 652 of file hostap_ap.c.

Referenced by prism2_check_sta_fw_version().

void hostap_deauth_all_stas struct net_device * dev,
struct ap_dataap,
int resend
 

Definition at line 370 of file hostap_ap.c.

References __constant_cpu_to_le16, prism2_send_mgmt(), WLAN_FC_STYPE_DEAUTH, WLAN_FC_TYPE_MGMT, and WLAN_REASON_PREV_AUTH_NOT_VALID.

Referenced by prism2_close().

Here is the call graph for this function:

void hostap_free_data struct ap_dataap  ) 
 

Definition at line 932 of file hostap_ap.c.

References sta_info::ap, ap_control_flush_macs(), ap_free_sta(), ap_sta_hash_del(), ap_data::crypt, hostap_crypto_ops::deinit, sta_info::flags, hostap_event_expired_sta(), set_tim_data::list, sta_info::list, sta_info::local, and WLAN_STA_ASSOC.

Referenced by prism2_free_local_data().

Here is the call graph for this function:

int hostap_handle_sta_crypto local_info_t * local,
struct hostap_ieee80211_hdrhdr,
struct prism2_crypt_data ** crypt,
void ** sta_ptr
 

Definition at line 3143 of file hostap_ap.c.

References ap_get_sta(), sta_info::crypt, and sta_info::users.

Referenced by hostap_rx_frame_decrypt().

Here is the call graph for this function:

void hostap_handle_sta_release void * ptr  ) 
 

Definition at line 2898 of file hostap_ap.c.

References sta_info::users.

Referenced by hostap_rx_frame_decrypt(), and prism2_tx().

ap_rx_ret hostap_handle_sta_rx local_info_t * local,
struct net_device * dev,
struct sk_buff * skb,
struct hostap_80211_rx_statusrx_stats,
int wds
 

Definition at line 3001 of file hostap_ap.c.

References hostap_ieee80211_hdr::addr1, hostap_ieee80211_hdr::addr2, hostap_ieee80211_hdr::addr3, ap_get_sta(), AP_RX_CONTINUE, AP_RX_CONTINUE_NOT_AUTHORIZED, AP_RX_DROP, AP_RX_EXIT, sta_info::flags, hostap_ieee80211_hdr::frame_control, hostap_ap_update_sq(), hostap_dump_rx_80211(), hostap_rx(), hostap_update_sta_ps2(), sta_info::last_rx, MAC2STR, MACSTR, prism2_rx_80211(), PRISM2_RX_NON_ASSOC, PRISM2_RX_NULLFUNC_ACK, sta_info::rx_bytes, sta_info::rx_packets, sta_info::users, WLAN_FC_FROMDS, WLAN_FC_GET_STYPE, WLAN_FC_GET_TYPE, WLAN_FC_PWRMGT, WLAN_FC_STYPE_NULLFUNC, WLAN_FC_TODS, WLAN_STA_ASSOC, and WLAN_STA_AUTHORIZED.

Referenced by hostap_80211_rx().

Here is the call graph for this function:

ap_tx_ret hostap_handle_sta_tx local_info_t * local,
struct sk_buff * skb,
struct hfa384x_tx_frametxdesc,
int wds,
int host_encrypt,
struct prism2_crypt_data ** crypt,
void ** sta_ptr
 

Definition at line 2778 of file hostap_ap.c.

References __constant_cpu_to_le16, sta_info::addr, sta_info::aid, sta_info::ap, ap_get_sta(), AP_SKB_CB_ADD_MOREDATA, AP_SKB_CB_BUFFERED_FRAME, AP_SKB_CB_MAGIC, AP_SKB_CB_MAGIC_LEN, AP_TX_BUFFERED, AP_TX_CONTINUE, AP_TX_CONTINUE_NOT_AUTHORIZED, AP_TX_DROP, ap_update_sta_tx_rate(), sta_info::crypt, ETH_P_HOSTAP, sta_info::flags, hostap_set_tim(), IW_MODE_MASTER, sta_info::last_tx, MAC2STR, MACSTR, STA_MAX_TX_BUFFER, sta_info::tx_buf, sta_info::tx_bytes, sta_info::tx_packets, sta_info::tx_rate, sta_info::users, WLAN_FC_MOREDATA, WLAN_STA_AUTHORIZED, WLAN_STA_PS, and WLAN_STA_TIM.

Referenced by prism2_tx_80211().

Here is the call graph for this function:

void hostap_handle_sta_tx_exc local_info_t * local,
struct hfa384x_tx_frametxdesc
 

Definition at line 2906 of file hostap_ap.c.

References sta_info::addr, ap_get_sta(), ap_tx_rate_ok(), MAC2STR, MACSTR, sta_info::tx_consecutive_exc, sta_info::tx_rate, sta_info::tx_rate_idx, sta_info::tx_since_last_failure, and WLAN_RATE_DECREASE_THRESHOLD.

Referenced by hostap_sta_tx_exc_tasklet().

Here is the call graph for this function:

void hostap_init_data local_info_t * local  ) 
 

Definition at line 864 of file hostap_ap.c.

References sta_info::ap, ap_bridge_packets, ap_control_proc_read(), ap_debug_proc_read(), ap_max_inactivity, ap_data::ap_policy, autom_ap_wds, ap_data::autom_ap_wds, ap_data::bridge_packets, GET_INT_PARM, handle_add_proc_queue(), handle_set_tim_queue(), handle_wds_oper_queue(), hostap_ap_tx_cb(), hostap_ap_tx_cb_assoc(), hostap_ap_tx_cb_auth(), hostap_ap_tx_cb_poll(), hostap_tx_callback_register(), INIT_WORK(), ap_data::initialized, ap_data::local, mac_restrictions::lock, mac_restrictions::mac_list, ap_data::mac_restrictions, ap_data::max_inactivity, other_ap_policy, prism2_ap_proc_read(), ap_data::proc, ap_data::set_tim_list, ap_data::set_tim_lock, ap_data::sta_list, ap_data::sta_table_lock, ap_data::tx_callback_assoc, ap_data::tx_callback_auth, ap_data::tx_callback_idx, and ap_data::tx_callback_poll.

Referenced by prism2_init_dev().

Here is the call graph for this function:

int hostap_is_sta_assoc struct ap_dataap,
u8 * sta_addr
 

Definition at line 3171 of file hostap_ap.c.

References sta_info::ap, ap_get_sta(), sta_info::flags, and WLAN_STA_ASSOC.

Referenced by hostap_80211_rx(), and hostap_rx_frame_wds().

Here is the call graph for this function:

void hostap_rx struct net_device * dev,
struct sk_buff * skb,
struct hostap_80211_rx_statusrx_stats
 

Definition at line 2381 of file hostap_ap.c.

References AP_OTHER_AP_SKIP_ALL, ETH_P_HOSTAP, hostap_ieee80211_hdr::frame_control, handle_ap_item(), WLAN_FC_GET_STYPE, WLAN_FC_GET_TYPE, WLAN_FC_STYPE_BEACON, and WLAN_FC_TYPE_MGMT.

Referenced by hostap_handle_sta_rx(), hostap_rx_frame_mgmt(), and schedule_packet_send().

Here is the call graph for this function:

void hostap_update_rates local_info_t * local  ) 
 

Definition at line 3245 of file hostap_ap.c.

References sta_info::ap, prism2_check_tx_rates(), spin_lock_bh, spin_unlock_bh, ap_data::sta_list, and ap_data::sta_table_lock.

Here is the call graph for this function:

int hostap_update_rx_stats struct ap_dataap,
struct hostap_ieee80211_hdrhdr,
struct hostap_80211_rx_statusrx_stats
 

Definition at line 3226 of file hostap_ap.c.

References ap_get_sta(), and hostap_ap_update_sq().

Referenced by hostap_80211_rx().

Here is the call graph for this function:

int hostap_update_sta_ps local_info_t * local,
struct hostap_ieee80211_hdrhdr
 

Definition at line 2976 of file hostap_ap.c.

References ap_get_sta(), hostap_update_sta_ps2(), sta_info::users, WLAN_FC_GET_STYPE, WLAN_FC_GET_TYPE, and WLAN_FC_PWRMGT.

Referenced by hostap_rx_frame_mgmt().

Here is the call graph for this function:

void hostap_wds_link_oper local_info_t * local,
u8 * addr,
wds_oper_type type
 

Definition at line 3305 of file hostap_ap.c.

References wds_oper_data::addr, wds_oper_data::next, PRISM2_SCHEDULE_TASK, spin_lock_bh, spin_unlock_bh, and wds_oper_data::type.

Referenced by ap_handle_timer(), handle_beacon(), hostap_add_wds_links(), and hostap_rx_frame_wds().


Generated on Mon Nov 21 15:59:55 2005 for openwifi by  doxygen 1.4.1