Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
htc.h File Reference
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/firmware.h>
#include <linux/skbuff.h>
#include <linux/netdevice.h>
#include <linux/leds.h>
#include <linux/slab.h>
#include <net/mac80211.h>
#include "common.h"
#include "htc_hst.h"
#include "hif_usb.h"
#include "wmi.h"

Go to the source code of this file.

Data Structures

struct  tx_frame_hdr
 
struct  tx_mgmt_hdr
 
struct  tx_beacon_header
 
struct  ath9k_htc_cap_target
 
struct  ath9k_htc_target_vif
 
struct  ath9k_htc_target_sta
 
struct  ath9k_htc_target_aggr
 
struct  ath9k_htc_rateset
 
struct  ath9k_htc_rate
 
struct  ath9k_htc_target_rate
 
struct  ath9k_htc_target_rate_mask
 
struct  ath9k_htc_target_int_stats
 
struct  ath9k_htc_target_tx_stats
 
struct  ath9k_htc_target_rx_stats
 
struct  ath9k_htc_vif
 
struct  ath9k_vif_iter_data
 
struct  ath9k_htc_sta
 
struct  ath9k_htc_rxbuf
 
struct  ath9k_htc_rx
 
struct  ath9k_htc_tx
 
struct  ath9k_htc_tx_ctl
 
struct  htc_beacon_config
 
struct  ath_btcoex
 
struct  ath9k_htc_priv
 

Macros

#define ATH_STA_SHORT_CALINTERVAL   1000 /* 1 second */
 
#define ATH_AP_SHORT_CALINTERVAL   100 /* 100 ms */
 
#define ATH_ANI_POLLINTERVAL   100 /* 100 ms */
 
#define ATH_LONG_CALINTERVAL   30000 /* 30 seconds */
 
#define ATH_RESTART_CALINTERVAL   1200000 /* 20 minutes */
 
#define ATH_DEFAULT_BMISS_LIMIT   10
 
#define IEEE80211_MS_TO_TU(x)   (((x) * 1000) / 1024)
 
#define TSF_TO_TU(_h, _l)   ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))
 
#define ATH9K_HTC_AMPDU   1
 
#define ATH9K_HTC_NORMAL   2
 
#define ATH9K_HTC_BEACON   3
 
#define ATH9K_HTC_MGMT   4
 
#define ATH9K_HTC_TX_CTSONLY   0x1
 
#define ATH9K_HTC_TX_RTSCTS   0x2
 
#define MAX_TX_AMPDU_SUBFRAMES_9271   17
 
#define MAX_TX_AMPDU_SUBFRAMES_7010   22
 
#define ATH_HTC_RATE_MAX   30
 
#define WLAN_RC_DS_FLAG   0x01
 
#define WLAN_RC_40_FLAG   0x02
 
#define WLAN_RC_SGI_FLAG   0x04
 
#define WLAN_RC_HT_FLAG   0x08
 
#define ATH9K_HTC_MAX_VIF   2
 
#define ATH9K_HTC_MAX_BCN_VIF   2
 
#define INC_VIF(_priv, _type)
 
#define DEC_VIF(_priv, _type)
 
#define ATH9K_HTC_MAX_STA   8
 
#define ATH9K_HTC_MAX_TID   8
 
#define ATH9K_HTC_RXBUF   256
 
#define HTC_RX_FRAME_HEADER_SIZE   40
 
#define ATH9K_HTC_TX_CLEANUP_INTERVAL   50 /* ms */
 
#define ATH9K_HTC_TX_TIMEOUT_INTERVAL   3000 /* ms */
 
#define ATH9K_HTC_TX_RESERVE   10
 
#define ATH9K_HTC_TX_TIMEOUT_COUNT   40
 
#define ATH9K_HTC_TX_THRESHOLD   (MAX_TX_BUF_NUM - ATH9K_HTC_TX_RESERVE)
 
#define ATH9K_HTC_OP_TX_QUEUES_STOP   BIT(0)
 
#define ATH9K_HTC_OP_TX_DRAIN   BIT(1)
 
#define TX_STAT_INC(c)   do { } while (0)
 
#define RX_STAT_INC(c)   do { } while (0)
 
#define CAB_STAT_INC   do { } while (0)
 
#define TX_QSTAT_INC(c)   do { } while (0)
 
#define ATH_LED_PIN_DEF   1
 
#define ATH_LED_PIN_9287   10
 
#define ATH_LED_PIN_9271   15
 
#define ATH_LED_PIN_7010   12
 
#define BSTUCK_THRESHOLD   10
 
#define DEFAULT_SWBA_RESPONSE   40 /* in TUs */
 
#define MIN_SWBA_RESPONSE   10 /* in TUs */
 
#define OP_INVALID   BIT(0)
 
#define OP_SCANNING   BIT(1)
 
#define OP_ENABLE_BEACON   BIT(2)
 
#define OP_BT_PRIORITY_DETECTED   BIT(3)
 
#define OP_BT_SCAN   BIT(4)
 
#define OP_ANI_RUNNING   BIT(5)
 
#define OP_TSF_RESET   BIT(6)
 

Enumerations

enum  htc_phymode { HTC_MODE_11NA = 0, HTC_MODE_11NG = 1 }
 
enum  htc_opmode {
  HTC_M_STA = 1, HTC_M_IBSS = 0, HTC_M_AHDEMO = 3, HTC_M_HOSTAP = 6,
  HTC_M_MONITOR = 8, HTC_M_WDS = 2
}
 
enum  tid_aggr_state { AGGR_STOP = 0, AGGR_PROGRESS, AGGR_START, AGGR_OPERATIONAL }
 

Functions

void ath9k_htc_reset (struct ath9k_htc_priv *priv)
 
void ath9k_htc_assign_bslot (struct ath9k_htc_priv *priv, struct ieee80211_vif *vif)
 
void ath9k_htc_remove_bslot (struct ath9k_htc_priv *priv, struct ieee80211_vif *vif)
 
void ath9k_htc_set_tsfadjust (struct ath9k_htc_priv *priv, struct ieee80211_vif *vif)
 
void ath9k_htc_beaconq_config (struct ath9k_htc_priv *priv)
 
void ath9k_htc_beacon_config (struct ath9k_htc_priv *priv, struct ieee80211_vif *vif)
 
void ath9k_htc_beacon_reconfig (struct ath9k_htc_priv *priv)
 
void ath9k_htc_swba (struct ath9k_htc_priv *priv, struct wmi_event_swba *swba)
 
void ath9k_htc_rxep (void *priv, struct sk_buff *skb, enum htc_endpoint_id ep_id)
 
void ath9k_htc_txep (void *priv, struct sk_buff *skb, enum htc_endpoint_id ep_id, bool txok)
 
void ath9k_htc_beaconep (void *drv_priv, struct sk_buff *skb, enum htc_endpoint_id ep_id, bool txok)
 
int ath9k_htc_update_cap_target (struct ath9k_htc_priv *priv, u8 enable_coex)
 
void ath9k_htc_ani_work (struct work_struct *work)
 
void ath9k_htc_start_ani (struct ath9k_htc_priv *priv)
 
void ath9k_htc_stop_ani (struct ath9k_htc_priv *priv)
 
int ath9k_tx_init (struct ath9k_htc_priv *priv)
 
int ath9k_htc_tx_start (struct ath9k_htc_priv *priv, struct ieee80211_sta *sta, struct sk_buff *skb, u8 slot, bool is_cab)
 
void ath9k_tx_cleanup (struct ath9k_htc_priv *priv)
 
bool ath9k_htc_txq_setup (struct ath9k_htc_priv *priv, int subtype)
 
int ath9k_htc_cabq_setup (struct ath9k_htc_priv *priv)
 
int get_hw_qnum (u16 queue, int *hwq_map)
 
int ath_htc_txq_update (struct ath9k_htc_priv *priv, int qnum, struct ath9k_tx_queue_info *qinfo)
 
void ath9k_htc_check_stop_queues (struct ath9k_htc_priv *priv)
 
void ath9k_htc_check_wake_queues (struct ath9k_htc_priv *priv)
 
int ath9k_htc_tx_get_slot (struct ath9k_htc_priv *priv)
 
void ath9k_htc_tx_clear_slot (struct ath9k_htc_priv *priv, int slot)
 
void ath9k_htc_tx_drain (struct ath9k_htc_priv *priv)
 
void ath9k_htc_txstatus (struct ath9k_htc_priv *priv, void *wmi_event)
 
void ath9k_tx_failed_tasklet (unsigned long data)
 
void ath9k_htc_tx_cleanup_timer (unsigned long data)
 
int ath9k_rx_init (struct ath9k_htc_priv *priv)
 
void ath9k_rx_cleanup (struct ath9k_htc_priv *priv)
 
void ath9k_host_rx_init (struct ath9k_htc_priv *priv)
 
void ath9k_rx_tasklet (unsigned long data)
 
u32 ath9k_htc_calcrxfilter (struct ath9k_htc_priv *priv)
 
void ath9k_htc_ps_wakeup (struct ath9k_htc_priv *priv)
 
void ath9k_htc_ps_restore (struct ath9k_htc_priv *priv)
 
void ath9k_ps_work (struct work_struct *work)
 
bool ath9k_htc_setpower (struct ath9k_htc_priv *priv, enum ath9k_power_mode mode)
 
void ath9k_start_rfkill_poll (struct ath9k_htc_priv *priv)
 
void ath9k_htc_rfkill_poll_state (struct ieee80211_hw *hw)
 
int ath9k_htc_probe_device (struct htc_target *htc_handle, struct device *dev, u16 devid, char *product, u32 drv_info)
 
void ath9k_htc_disconnect_device (struct htc_target *htc_handle, bool hotunplug)
 

Variables

struct ieee80211_ops ath9k_htc_ops
 
int htc_modparam_nohwcrypt
 
struct tx_frame_hdr __packed
 

Macro Definition Documentation

#define ATH9K_HTC_AMPDU   1

Definition at line 62 of file htc.h.

#define ATH9K_HTC_BEACON   3

Definition at line 64 of file htc.h.

#define ATH9K_HTC_MAX_BCN_VIF   2

Definition at line 197 of file htc.h.

#define ATH9K_HTC_MAX_STA   8

Definition at line 244 of file htc.h.

#define ATH9K_HTC_MAX_TID   8

Definition at line 245 of file htc.h.

#define ATH9K_HTC_MAX_VIF   2

Definition at line 196 of file htc.h.

#define ATH9K_HTC_MGMT   4

Definition at line 65 of file htc.h.

#define ATH9K_HTC_NORMAL   2

Definition at line 63 of file htc.h.

#define ATH9K_HTC_OP_TX_DRAIN   BIT(1)

Definition at line 282 of file htc.h.

#define ATH9K_HTC_OP_TX_QUEUES_STOP   BIT(0)

Definition at line 281 of file htc.h.

#define ATH9K_HTC_RXBUF   256

Definition at line 259 of file htc.h.

#define ATH9K_HTC_TX_CLEANUP_INTERVAL   50 /* ms */

Definition at line 275 of file htc.h.

#define ATH9K_HTC_TX_CTSONLY   0x1

Definition at line 67 of file htc.h.

#define ATH9K_HTC_TX_RESERVE   10

Definition at line 277 of file htc.h.

#define ATH9K_HTC_TX_RTSCTS   0x2

Definition at line 68 of file htc.h.

#define ATH9K_HTC_TX_THRESHOLD   (MAX_TX_BUF_NUM - ATH9K_HTC_TX_RESERVE)

Definition at line 279 of file htc.h.

#define ATH9K_HTC_TX_TIMEOUT_COUNT   40

Definition at line 278 of file htc.h.

#define ATH9K_HTC_TX_TIMEOUT_INTERVAL   3000 /* ms */

Definition at line 276 of file htc.h.

#define ATH_ANI_POLLINTERVAL   100 /* 100 ms */

Definition at line 36 of file htc.h.

#define ATH_AP_SHORT_CALINTERVAL   100 /* 100 ms */

Definition at line 35 of file htc.h.

#define ATH_DEFAULT_BMISS_LIMIT   10

Definition at line 40 of file htc.h.

#define ATH_HTC_RATE_MAX   30

Definition at line 138 of file htc.h.

#define ATH_LED_PIN_7010   12

Definition at line 375 of file htc.h.

#define ATH_LED_PIN_9271   15

Definition at line 374 of file htc.h.

#define ATH_LED_PIN_9287   10

Definition at line 373 of file htc.h.

#define ATH_LED_PIN_DEF   1

Definition at line 372 of file htc.h.

#define ATH_LONG_CALINTERVAL   30000 /* 30 seconds */

Definition at line 37 of file htc.h.

#define ATH_RESTART_CALINTERVAL   1200000 /* 20 minutes */

Definition at line 38 of file htc.h.

#define ATH_STA_SHORT_CALINTERVAL   1000 /* 1 second */

Definition at line 34 of file htc.h.

#define BSTUCK_THRESHOLD   10

Definition at line 377 of file htc.h.

#define CAB_STAT_INC   do { } while (0)

Definition at line 361 of file htc.h.

#define DEC_VIF (   _priv,
  _type 
)
Value:
do { \
switch (_type) { \
_priv->num_sta_vif--; \
break; \
_priv->num_ibss_vif--; \
break; \
_priv->num_ap_vif--; \
break; \
default: \
break; \
} \
} while (0)

Definition at line 215 of file htc.h.

#define DEFAULT_SWBA_RESPONSE   40 /* in TUs */

Definition at line 383 of file htc.h.

#define HTC_RX_FRAME_HEADER_SIZE   40

Definition at line 260 of file htc.h.

#define IEEE80211_MS_TO_TU (   x)    (((x) * 1000) / 1024)

Definition at line 41 of file htc.h.

#define INC_VIF (   _priv,
  _type 
)
Value:
do { \
switch (_type) { \
_priv->num_sta_vif++; \
break; \
_priv->num_ibss_vif++; \
break; \
_priv->num_ap_vif++; \
break; \
default: \
break; \
} \
} while (0)

Definition at line 199 of file htc.h.

#define MAX_TX_AMPDU_SUBFRAMES_7010   22

Definition at line 100 of file htc.h.

#define MAX_TX_AMPDU_SUBFRAMES_9271   17

Definition at line 99 of file htc.h.

#define MIN_SWBA_RESPONSE   10 /* in TUs */

Definition at line 384 of file htc.h.

#define OP_ANI_RUNNING   BIT(5)

Definition at line 424 of file htc.h.

#define OP_BT_PRIORITY_DETECTED   BIT(3)

Definition at line 422 of file htc.h.

#define OP_BT_SCAN   BIT(4)

Definition at line 423 of file htc.h.

#define OP_ENABLE_BEACON   BIT(2)

Definition at line 421 of file htc.h.

#define OP_INVALID   BIT(0)

Definition at line 419 of file htc.h.

#define OP_SCANNING   BIT(1)

Definition at line 420 of file htc.h.

#define OP_TSF_RESET   BIT(6)

Definition at line 425 of file htc.h.

#define RX_STAT_INC (   c)    do { } while (0)

Definition at line 360 of file htc.h.

#define TSF_TO_TU (   _h,
  _l 
)    ((((u32)(_h)) << 22) | (((u32)(_l)) >> 10))

Definition at line 42 of file htc.h.

#define TX_QSTAT_INC (   c)    do { } while (0)

Definition at line 363 of file htc.h.

#define TX_STAT_INC (   c)    do { } while (0)

Definition at line 359 of file htc.h.

#define WLAN_RC_40_FLAG   0x02

Definition at line 141 of file htc.h.

#define WLAN_RC_DS_FLAG   0x01

Definition at line 140 of file htc.h.

#define WLAN_RC_HT_FLAG   0x08

Definition at line 143 of file htc.h.

#define WLAN_RC_SGI_FLAG   0x04

Definition at line 142 of file htc.h.

Enumeration Type Documentation

enum htc_opmode
Enumerator:
HTC_M_STA 
HTC_M_IBSS 
HTC_M_AHDEMO 
HTC_M_HOSTAP 
HTC_M_MONITOR 
HTC_M_WDS 

Definition at line 53 of file htc.h.

Enumerator:
HTC_MODE_11NA 
HTC_MODE_11NG 

Definition at line 48 of file htc.h.

Enumerator:
AGGR_STOP 
AGGR_PROGRESS 
AGGR_START 
AGGR_OPERATIONAL 

Definition at line 247 of file htc.h.

Function Documentation

void ath9k_host_rx_init ( struct ath9k_htc_priv priv)

Definition at line 915 of file htc_drv_txrx.c.

void ath9k_htc_ani_work ( struct work_struct work)

Definition at line 766 of file htc_drv_main.c.

void ath9k_htc_assign_bslot ( struct ath9k_htc_priv priv,
struct ieee80211_vif vif 
)

Definition at line 476 of file htc_drv_beacon.c.

void ath9k_htc_beacon_config ( struct ath9k_htc_priv priv,
struct ieee80211_vif vif 
)

Definition at line 604 of file htc_drv_beacon.c.

void ath9k_htc_beacon_reconfig ( struct ath9k_htc_priv priv)

Definition at line 640 of file htc_drv_beacon.c.

void ath9k_htc_beaconep ( void drv_priv,
struct sk_buff skb,
enum htc_endpoint_id  ep_id,
bool  txok 
)

Definition at line 287 of file htc_drv_beacon.c.

void ath9k_htc_beaconq_config ( struct ath9k_htc_priv priv)

Definition at line 21 of file htc_drv_beacon.c.

int ath9k_htc_cabq_setup ( struct ath9k_htc_priv priv)

Definition at line 831 of file htc_drv_txrx.c.

u32 ath9k_htc_calcrxfilter ( struct ath9k_htc_priv priv)

Definition at line 848 of file htc_drv_txrx.c.

void ath9k_htc_check_stop_queues ( struct ath9k_htc_priv priv)

Definition at line 56 of file htc_drv_txrx.c.

void ath9k_htc_check_wake_queues ( struct ath9k_htc_priv priv)

Definition at line 68 of file htc_drv_txrx.c.

void ath9k_htc_disconnect_device ( struct htc_target htc_handle,
bool  hotunplug 
)

Definition at line 938 of file htc_drv_init.c.

int ath9k_htc_probe_device ( struct htc_target htc_handle,
struct device dev,
u16  devid,
char product,
u32  drv_info 
)

Definition at line 893 of file htc_drv_init.c.

void ath9k_htc_ps_restore ( struct ath9k_htc_priv priv)

Definition at line 76 of file htc_drv_main.c.

void ath9k_htc_ps_wakeup ( struct ath9k_htc_priv priv)

Definition at line 65 of file htc_drv_main.c.

void ath9k_htc_remove_bslot ( struct ath9k_htc_priv priv,
struct ieee80211_vif vif 
)

Definition at line 498 of file htc_drv_beacon.c.

void ath9k_htc_reset ( struct ath9k_htc_priv priv)

Definition at line 187 of file htc_drv_main.c.

void ath9k_htc_rfkill_poll_state ( struct ieee80211_hw hw)

Definition at line 309 of file htc_drv_gpio.c.

void ath9k_htc_rxep ( void priv,
struct sk_buff skb,
enum htc_endpoint_id  ep_id 
)

Definition at line 1150 of file htc_drv_txrx.c.

void ath9k_htc_set_tsfadjust ( struct ath9k_htc_priv priv,
struct ieee80211_vif vif 
)

Definition at line 516 of file htc_drv_beacon.c.

bool ath9k_htc_setpower ( struct ath9k_htc_priv priv,
enum ath9k_power_mode  mode 
)

Definition at line 53 of file htc_drv_main.c.

void ath9k_htc_start_ani ( struct ath9k_htc_priv priv)

Definition at line 745 of file htc_drv_main.c.

void ath9k_htc_stop_ani ( struct ath9k_htc_priv priv)

Definition at line 760 of file htc_drv_main.c.

void ath9k_htc_swba ( struct ath9k_htc_priv priv,
struct wmi_event_swba swba 
)

Definition at line 441 of file htc_drv_beacon.c.

void ath9k_htc_tx_cleanup_timer ( unsigned long  data)

Definition at line 742 of file htc_drv_txrx.c.

void ath9k_htc_tx_clear_slot ( struct ath9k_htc_priv priv,
int  slot 
)

Definition at line 95 of file htc_drv_txrx.c.

void ath9k_htc_tx_drain ( struct ath9k_htc_priv priv)

Definition at line 521 of file htc_drv_txrx.c.

int ath9k_htc_tx_get_slot ( struct ath9k_htc_priv priv)

Definition at line 79 of file htc_drv_txrx.c.

int ath9k_htc_tx_start ( struct ath9k_htc_priv priv,
struct ieee80211_sta sta,
struct sk_buff skb,
u8  slot,
bool  is_cab 
)

Definition at line 335 of file htc_drv_txrx.c.

void ath9k_htc_txep ( void priv,
struct sk_buff skb,
enum htc_endpoint_id  ep_id,
bool  txok 
)

Definition at line 671 of file htc_drv_txrx.c.

bool ath9k_htc_txq_setup ( struct ath9k_htc_priv priv,
int  subtype 
)

Definition at line 806 of file htc_drv_txrx.c.

void ath9k_htc_txstatus ( struct ath9k_htc_priv priv,
void wmi_event 
)

Definition at line 629 of file htc_drv_txrx.c.

int ath9k_htc_update_cap_target ( struct ath9k_htc_priv priv,
u8  enable_coex 
)

Definition at line 575 of file htc_drv_main.c.

void ath9k_ps_work ( struct work_struct work)

Definition at line 96 of file htc_drv_main.c.

void ath9k_rx_cleanup ( struct ath9k_htc_priv priv)

Definition at line 1185 of file htc_drv_txrx.c.

int ath9k_rx_init ( struct ath9k_htc_priv priv)

Definition at line 1197 of file htc_drv_txrx.c.

void ath9k_rx_tasklet ( unsigned long  data)

Definition at line 1096 of file htc_drv_txrx.c.

void ath9k_start_rfkill_poll ( struct ath9k_htc_priv priv)

Definition at line 317 of file htc_drv_gpio.c.

void ath9k_tx_cleanup ( struct ath9k_htc_priv priv)

Definition at line 801 of file htc_drv_txrx.c.

void ath9k_tx_failed_tasklet ( unsigned long  data)

Definition at line 560 of file htc_drv_txrx.c.

int ath9k_tx_init ( struct ath9k_htc_priv priv)

Definition at line 789 of file htc_drv_txrx.c.

int ath_htc_txq_update ( struct ath9k_htc_priv priv,
int  qnum,
struct ath9k_tx_queue_info qinfo 
)

Definition at line 188 of file htc_drv_txrx.c.

int get_hw_qnum ( u16  queue,
int hwq_map 
)

Definition at line 40 of file htc_drv_txrx.c.

Variable Documentation

struct ieee80211_ops ath9k_htc_ops

Definition at line 1776 of file htc_drv_main.c.

int htc_modparam_nohwcrypt

Definition at line 29 of file htc_drv_init.c.