|
@@ -135,7 +135,7 @@
|
|
|
#define WLAN_WAIT_TIME_LINK_STATUS 800
|
|
|
#define WLAN_WAIT_TIME_POWER_STATS 800
|
|
|
/* Amount of time to wait for sme close session callback.
|
|
|
- * This value should be larger than the timeout used by WDI to wait for
|
|
|
+ * This value should be larger than the timeout used by WDI to wait for
|
|
|
* a response from WCNSS
|
|
|
*/
|
|
|
#define WLAN_WAIT_TIME_SESSIONOPENCLOSE 15000
|
|
@@ -223,7 +223,8 @@
|
|
|
#define WLAN_HDD_PUBLIC_ACTION_FRAME_SUB_TYPE_OFFSET 6
|
|
|
|
|
|
#define WLAN_HDD_IS_SOCIAL_CHANNEL(center_freq) \
|
|
|
- (((center_freq) == 2412) || ((center_freq) == 2437) || ((center_freq) == 2462))
|
|
|
+ (((center_freq) == 2412) || ((center_freq) == 2437) || \
|
|
|
+ ((center_freq) == 2462))
|
|
|
|
|
|
#define WLAN_HDD_CHANNEL_IN_UNII_1_BAND(center_freq) \
|
|
|
(((center_freq) == 5180) || ((center_freq) == 5200) \
|
|
@@ -393,20 +394,21 @@ typedef struct hdd_stats_s {
|
|
|
#endif
|
|
|
} hdd_stats_t;
|
|
|
|
|
|
-typedef enum {
|
|
|
+enum hdd_roam_state {
|
|
|
HDD_ROAM_STATE_NONE,
|
|
|
|
|
|
- /* Issuing a disconnect due to transition into low power states. */
|
|
|
+ /* Issuing a disconnect due to transition into low power states */
|
|
|
HDD_ROAM_STATE_DISCONNECTING_POWER,
|
|
|
|
|
|
- /* move to this state when HDD sets a key with SME/CSR. Note this is */
|
|
|
- /* an important state to get right because we will get calls into our SME */
|
|
|
- /* callback routine for SetKey activity that we did not initiate! */
|
|
|
+ /* Move to this state when HDD sets a key with SME/CSR. Note this is
|
|
|
+ * an important state to get right because we will get calls into our
|
|
|
+ * SME callback routine for SetKey activity that we did not initiate!
|
|
|
+ */
|
|
|
HDD_ROAM_STATE_SETTING_KEY,
|
|
|
-} HDD_ROAM_STATE;
|
|
|
+};
|
|
|
|
|
|
typedef struct roaming_info_s {
|
|
|
- HDD_ROAM_STATE roamingState;
|
|
|
+ enum hdd_roam_state roamingState;
|
|
|
qdf_event_t roamingEvent;
|
|
|
|
|
|
tSirMacAddr bssid;
|
|
@@ -428,23 +430,20 @@ typedef struct roaming_info_s {
|
|
|
#define MAX_NUM_BKIDS 16
|
|
|
|
|
|
/** WAPI AUTH mode definition */
|
|
|
-enum _WAPIAuthMode {
|
|
|
+enum wapi_auth_mode {
|
|
|
WAPI_AUTH_MODE_OPEN = 0,
|
|
|
WAPI_AUTH_MODE_PSK = 1,
|
|
|
WAPI_AUTH_MODE_CERT
|
|
|
} __packed;
|
|
|
-typedef enum _WAPIAuthMode WAPIAuthMode;
|
|
|
|
|
|
/** WAPI Work mode structure definition */
|
|
|
#define WZC_ORIGINAL 0
|
|
|
#define WAPI_EXTENTION 1
|
|
|
|
|
|
-struct _WAPI_FUNCTION_MODE {
|
|
|
+struct wapi_function_mode {
|
|
|
unsigned char wapiMode;
|
|
|
} __packed;
|
|
|
|
|
|
-typedef struct _WAPI_FUNCTION_MODE WAPI_FUNCTION_MODE;
|
|
|
-
|
|
|
typedef struct _WAPI_BKID {
|
|
|
uint8_t bkid[16];
|
|
|
} WAPI_BKID, *pWAPI_BKID;
|
|
@@ -472,22 +471,19 @@ enum _WAPIKeyType {
|
|
|
PAIRWISE_KEY, /* 0 */
|
|
|
GROUP_KEY /* 1 */
|
|
|
} __packed;
|
|
|
-typedef enum _WAPIKeyType WAPIKeyType;
|
|
|
|
|
|
/** WAPI KEY Direction definition */
|
|
|
-enum _KEY_DIRECTION {
|
|
|
+enum key_direction {
|
|
|
None,
|
|
|
Rx,
|
|
|
Tx,
|
|
|
Rx_Tx
|
|
|
} __packed;
|
|
|
|
|
|
-typedef enum _KEY_DIRECTION WAPI_KEY_DIRECTION;
|
|
|
-
|
|
|
/* WAPI KEY structure definition */
|
|
|
struct WLAN_WAPI_KEY {
|
|
|
- WAPIKeyType keyType;
|
|
|
- WAPI_KEY_DIRECTION keyDirection; /*reserved for future use */
|
|
|
+ enum _WAPIKeyType keyType;
|
|
|
+ enum key_direction keyDirection; /*reserved for future use */
|
|
|
uint8_t keyId;
|
|
|
uint8_t addrIndex[MAX_ADDR_INDEX]; /*reserved for future use */
|
|
|
int wpiekLen;
|
|
@@ -538,10 +534,10 @@ typedef struct beacon_data_s {
|
|
|
int dtim_period;
|
|
|
} beacon_data_t;
|
|
|
|
|
|
-typedef enum rem_on_channel_request_type {
|
|
|
+enum rem_on_channel_request_type {
|
|
|
REMAIN_ON_CHANNEL_REQUEST,
|
|
|
OFF_CHANNEL_ACTION_TX,
|
|
|
-} rem_on_channel_request_type_t;
|
|
|
+};
|
|
|
|
|
|
typedef struct action_pkt_buffer {
|
|
|
uint8_t *frame_ptr;
|
|
@@ -555,7 +551,7 @@ typedef struct hdd_remain_on_chan_ctx {
|
|
|
enum nl80211_channel_type chan_type;
|
|
|
unsigned int duration;
|
|
|
u64 cookie;
|
|
|
- rem_on_channel_request_type_t rem_on_chan_request;
|
|
|
+ enum rem_on_channel_request_type rem_on_chan_request;
|
|
|
qdf_mc_timer_t hdd_remain_on_chan_timer;
|
|
|
action_pkt_buffer_t action_pkt_buff;
|
|
|
bool hdd_remain_on_chan_cancel_in_progress;
|
|
@@ -590,14 +586,14 @@ struct hdd_scan_req {
|
|
|
uint32_t timestamp;
|
|
|
};
|
|
|
|
|
|
-typedef enum {
|
|
|
+enum p2p_action_frame_state {
|
|
|
HDD_IDLE,
|
|
|
HDD_PD_REQ_ACK_PENDING,
|
|
|
HDD_GO_NEG_REQ_ACK_PENDING,
|
|
|
HDD_INVALID_STATE,
|
|
|
-} eP2PActionFrameState;
|
|
|
+};
|
|
|
|
|
|
-typedef enum {
|
|
|
+enum action_frm_type {
|
|
|
WLAN_HDD_GO_NEG_REQ,
|
|
|
WLAN_HDD_GO_NEG_RESP,
|
|
|
WLAN_HDD_GO_NEG_CNF,
|
|
@@ -607,7 +603,7 @@ typedef enum {
|
|
|
WLAN_HDD_DEV_DIS_RESP,
|
|
|
WLAN_HDD_PROV_DIS_REQ,
|
|
|
WLAN_HDD_PROV_DIS_RESP,
|
|
|
-} tActionFrmType;
|
|
|
+};
|
|
|
|
|
|
typedef struct hdd_cfg80211_state_s {
|
|
|
uint16_t current_freq;
|
|
@@ -616,7 +612,7 @@ typedef struct hdd_cfg80211_state_s {
|
|
|
size_t len;
|
|
|
hdd_remain_on_chan_ctx_t *remain_on_chan_ctx;
|
|
|
struct mutex remain_on_chan_ctx_lock;
|
|
|
- eP2PActionFrameState actionFrmState;
|
|
|
+ enum p2p_action_frame_state actionFrmState;
|
|
|
/* is_go_neg_ack_received flag is set to 1 when
|
|
|
* the pending ack for GO negotiation req is
|
|
|
* received.
|
|
@@ -639,27 +635,27 @@ struct hdd_mon_set_ch_info {
|
|
|
};
|
|
|
|
|
|
struct hdd_station_ctx {
|
|
|
- /** Handle to the Wireless Extension State */
|
|
|
+ /* Handle to the Wireless Extension State */
|
|
|
hdd_wext_state_t WextState;
|
|
|
|
|
|
#ifdef FEATURE_WLAN_TDLS
|
|
|
tdlsCtx_t *pHddTdlsCtx;
|
|
|
#endif
|
|
|
|
|
|
- /**Connection information*/
|
|
|
+ /* Connection information*/
|
|
|
connection_info_t conn_info;
|
|
|
|
|
|
roaming_info_t roam_info;
|
|
|
|
|
|
int ft_carrier_on;
|
|
|
|
|
|
- /*Increment whenever ibss New peer joins and departs the network */
|
|
|
+ /* Increment whenever ibss New peer joins and departs the network */
|
|
|
int ibss_sta_generation;
|
|
|
|
|
|
/* Indication of wep/wpa-none keys installation */
|
|
|
bool ibss_enc_key_installed;
|
|
|
|
|
|
- /*Save the wep/wpa-none keys */
|
|
|
+ /* Save the wep/wpa-none keys */
|
|
|
tCsrRoamSetKey ibss_enc_key;
|
|
|
tSirPeerInfoRspParams ibss_peer_info;
|
|
|
|
|
@@ -709,8 +705,8 @@ typedef struct {
|
|
|
/** The station entry is used or not */
|
|
|
bool isUsed;
|
|
|
|
|
|
- /** Station ID reported back from HAL (through SAP). Broadcast
|
|
|
- * uses station ID zero by default in both libra and volans.
|
|
|
+ /* Station ID reported back from HAL (through SAP).
|
|
|
+ * Broadcast uses station ID zero by default
|
|
|
*/
|
|
|
uint8_t ucSTAId;
|
|
|
|
|
@@ -767,7 +763,9 @@ struct hdd_ap_ctx_s {
|
|
|
|
|
|
eCsrEncryptionType ucEncryptType;
|
|
|
|
|
|
- /* This will point to group key data, if it is received before start bss. */
|
|
|
+ /* This will point to group key data,
|
|
|
+ * if it is received before start bss
|
|
|
+ */
|
|
|
tCsrRoamSetKey groupKey;
|
|
|
/* This will have WEP key data, if it is received before start bss */
|
|
|
tCsrRoamSetKey wepKey[CSR_MAX_NUM_KEY];
|
|
@@ -1338,8 +1336,10 @@ struct hdd_context_s {
|
|
|
qdf_spinlock_t hdd_adapter_lock;
|
|
|
qdf_list_t hddAdapters; /* List of adapters */
|
|
|
|
|
|
- /* One per STA: 1 for BCMC_STA_ID, 1 for each SAP_SELF_STA_ID, 1 for WDS_STAID */
|
|
|
- hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + QDF_MAX_NO_OF_SAP_MODE + 2]; /* One per sta. For quick reference. */
|
|
|
+ /* One per STA: 1 for BCMC_STA_ID, 1 for each SAP_SELF_STA_ID,
|
|
|
+ * 1 for WDS_STAID
|
|
|
+ */
|
|
|
+ hdd_adapter_t *sta_to_adapter[WLAN_MAX_STA_COUNT + QDF_MAX_NO_OF_SAP_MODE + 2];
|
|
|
|
|
|
/** Pointer for firmware image data */
|
|
|
const struct firmware *fw;
|
|
@@ -2246,6 +2246,7 @@ int wlan_hdd_sap_get_valid_channellist(hdd_adapter_t *adapter,
|
|
|
* Return: None
|
|
|
*/
|
|
|
void wlan_hdd_init_chan_info(hdd_context_t *hdd_ctx);
|
|
|
+
|
|
|
/**
|
|
|
* wlan_hdd_deinit_chan_info() - deinitialize channel info variables
|
|
|
* @hdd_ctx: hdd ctx
|