Commit e3d74826 authored by Wolfram Sang's avatar Wolfram Sang Committed by Greg Kroah-Hartman

staging: ks7010: indent ks_hostif.h

Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 20c4f9c5
......@@ -64,7 +64,7 @@
struct hostif_hdr {
uint16_t size;
uint16_t event;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_data_request_t {
struct hostif_hdr header;
......@@ -73,7 +73,7 @@ struct hostif_data_request_t {
#define TYPE_AUTH 0x0001
uint16_t reserved;
uint8_t data[0];
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_data_indication_t {
struct hostif_hdr header;
......@@ -84,18 +84,18 @@ struct hostif_data_indication_t {
#define TYPE_GMK2 0x0003
uint16_t reserved;
uint8_t data[0];
} __attribute__((packed));
} __attribute__ ((packed));
#define CHANNEL_LIST_MAX_SIZE 14
struct channel_list_t {
uint8_t size;
uint8_t body[CHANNEL_LIST_MAX_SIZE];
uint8_t pad;
} __attribute__((packed));
} __attribute__ ((packed));
/* MIB Attribute */
#define DOT11_MAC_ADDRESS 0x21010100 /* MAC Address (R) */
#define DOT11_PRODUCT_VERSION 0x31024100 /* FirmWare Version (R)*/
#define DOT11_PRODUCT_VERSION 0x31024100 /* FirmWare Version (R) */
#define DOT11_RTS_THRESHOLD 0x21020100 /* RTS Threshold (R/W) */
#define DOT11_FRAGMENTATION_THRESHOLD 0x21050100 /* Fragment Threshold (R/W) */
#define DOT11_PRIVACY_INVOKED 0x15010100 /* WEP ON/OFF (W) */
......@@ -144,8 +144,7 @@ struct channel_list_t {
struct hostif_mib_get_request_t {
struct hostif_hdr header;
uint32_t mib_attribute;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_mib_value_t {
uint16_t size;
......@@ -156,7 +155,7 @@ struct hostif_mib_value_t {
#define MIB_VALUE_TYPE_COUNT32 3
#define MIB_VALUE_TYPE_OSTRING 4
uint8_t body[0];
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_mib_get_confirm_t {
struct hostif_hdr header;
......@@ -167,19 +166,19 @@ struct hostif_mib_get_confirm_t {
#define MIB_WRITE_ONLY 3
uint32_t mib_attribute;
struct hostif_mib_value_t mib_value;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_mib_set_request_t {
struct hostif_hdr header;
uint32_t mib_attribute;
struct hostif_mib_value_t mib_value;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_mib_set_confirm_t {
struct hostif_hdr header;
uint32_t mib_status;
uint32_t mib_attribute;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_power_mngmt_request_t {
struct hostif_hdr header;
......@@ -192,11 +191,11 @@ struct hostif_power_mngmt_request_t {
uint32_t receiveDTIMs;
#define DTIM_FALSE 0
#define DTIM_TRUE 1
} __attribute__((packed));
} __attribute__ ((packed));
/* power management mode */
enum {
POWMGT_ACTIVE_MODE=0,
POWMGT_ACTIVE_MODE = 0,
POWMGT_SAVE1_MODE,
POWMGT_SAVE2_MODE
};
......@@ -210,7 +209,7 @@ enum {
struct hostif_power_mngmt_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_start_request_t {
struct hostif_hdr header;
......@@ -219,67 +218,66 @@ struct hostif_start_request_t {
#define MODE_INFRASTRUCTURE 1
#define MODE_AP 2 /* not used */
#define MODE_ADHOC 3
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_start_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
#define SSID_MAX_SIZE 32
struct ssid_t {
uint8_t size;
uint8_t body[SSID_MAX_SIZE];
uint8_t ssid_pad;
} __attribute__((packed));
} __attribute__ ((packed));
#define RATE_SET_MAX_SIZE 16
struct rate_set8_t {
uint8_t size;
uint8_t body[8];
uint8_t rate_pad;
} __attribute__((packed));
} __attribute__ ((packed));
struct FhParms_t {
uint16_t dwellTime;
uint8_t hopSet;
uint8_t hopPattern;
uint8_t hopIndex;
} __attribute__((packed));
} __attribute__ ((packed));
struct DsParms_t {
uint8_t channel;
} __attribute__((packed));
} __attribute__ ((packed));
struct CfParms_t {
uint8_t count;
uint8_t period;
uint16_t maxDuration;
uint16_t durRemaining;
} __attribute__((packed));
} __attribute__ ((packed));
struct IbssParms_t {
uint16_t atimWindow;
} __attribute__((packed));
} __attribute__ ((packed));
struct rsn_t {
uint8_t size;
#define RSN_BODY_SIZE 64
uint8_t body[RSN_BODY_SIZE];
} __attribute__((packed));
} __attribute__ ((packed));
struct ErpParams_t {
uint8_t erp_info;
} __attribute__((packed));
} __attribute__ ((packed));
struct rate_set16_t{
struct rate_set16_t {
uint8_t size;
uint8_t body[16];
uint8_t rate_pad;
} __attribute__((packed));
} __attribute__ ((packed));
struct ap_info_t{
struct ap_info_t {
uint8_t bssid[6]; /* +00 */
uint8_t rssi; /* +06 */
uint8_t sq; /* +07 */
......@@ -304,9 +302,9 @@ struct ap_info_t{
uint16_t body_size; /* +16 */
uint8_t body[1024]; /* +18 */
/* +1032 */
} __attribute__((packed));
} __attribute__ ((packed));
struct link_ap_info_t{
struct link_ap_info_t {
uint8_t bssid[6]; /* +00 */
uint8_t rssi; /* +06 */
uint8_t sq; /* +07 */
......@@ -330,8 +328,8 @@ struct link_ap_info_t{
struct {
uint8_t size; /* +52 */
uint8_t body[128]; /* +53 */
} __attribute__((packed)) rsn;
} __attribute__((packed));
} __attribute__ ((packed)) rsn;
} __attribute__ ((packed));
struct hostif_connect_indication_t {
struct hostif_hdr header;
......@@ -339,16 +337,16 @@ struct hostif_connect_indication_t {
#define RESULT_CONNECT 0
#define RESULT_DISCONNECT 1
struct link_ap_info_t link_ap_info;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_stop_request_t {
struct hostif_hdr header;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_stop_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_ps_adhoc_set_request_t {
struct hostif_hdr header;
......@@ -365,12 +363,12 @@ struct hostif_ps_adhoc_set_request_t {
uint16_t capability; /* bit5:preamble bit6:pbcc pbcc not supported always 0
* bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
uint16_t scan_type;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_ps_adhoc_set_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_infrastructure_set_request_t {
struct hostif_hdr header;
......@@ -386,7 +384,7 @@ struct hostif_infrastructure_set_request_t {
#define AUTH_TYPE_SHARED_KEY 1
struct channel_list_t channel_list;
uint16_t scan_type;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_infrastructure_set2_request_t {
struct hostif_hdr header;
......@@ -403,13 +401,12 @@ struct hostif_infrastructure_set2_request_t {
struct channel_list_t channel_list;
uint16_t scan_type;
uint8_t bssid[ETH_ALEN];
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_infrastructure_set_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_adhoc_set_request_t {
struct hostif_hdr header;
......@@ -421,7 +418,7 @@ struct hostif_adhoc_set_request_t {
uint16_t capability; /* bit5:preamble bit6:pbcc pbcc not supported always 0
* bit10:ShortSlotTime bit13:DSSS-OFDM DSSS-OFDM not supported always 0 */
uint16_t scan_type;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_adhoc_set2_request_t {
struct hostif_hdr header;
......@@ -435,18 +432,17 @@ struct hostif_adhoc_set2_request_t {
uint16_t scan_type;
struct channel_list_t channel_list;
uint8_t bssid[ETH_ALEN];
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_adhoc_set_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
struct last_associate_t {
uint8_t type;
uint8_t status;
} __attribute__((packed));
} __attribute__ ((packed));
struct association_request_t {
uint8_t type;
......@@ -457,7 +453,7 @@ struct association_request_t {
uint16_t listen_interval;
uint8_t ap_address[6];
uint16_t reqIEs_size;
} __attribute__((packed));
} __attribute__ ((packed));
struct association_response_t {
uint8_t type;
......@@ -468,7 +464,7 @@ struct association_response_t {
uint16_t status;
uint16_t association_id;
uint16_t respIEs_size;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_associate_indication_t {
struct hostif_hdr header;
......@@ -476,7 +472,7 @@ struct hostif_associate_indication_t {
struct association_response_t assoc_resp;
/* followed by (reqIEs_size + respIEs_size) octets of data */
/* reqIEs data *//* respIEs data */
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_bss_scan_request_t {
struct hostif_hdr header;
......@@ -488,13 +484,13 @@ struct hostif_bss_scan_request_t {
uint32_t ch_time_max;
struct channel_list_t channel_list;
struct ssid_t ssid;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_bss_scan_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
uint16_t reserved;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_phy_information_request_t {
struct hostif_hdr header;
......@@ -502,7 +498,7 @@ struct hostif_phy_information_request_t {
#define NORMAL_TYPE 0
#define TIME_TYPE 1
uint16_t time; /* unit 100ms */
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_phy_information_confirm_t {
struct hostif_hdr header;
......@@ -514,30 +510,30 @@ struct hostif_phy_information_confirm_t {
uint32_t rx_frame;
uint32_t tx_error;
uint32_t rx_error;
} __attribute__((packed));
} __attribute__ ((packed));
/* sleep mode */
#define SLP_ACTIVE 0
#define SLP_SLEEP 1
struct hostif_sleep_request_t {
struct hostif_hdr header;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_sleep_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_mic_failure_request_t {
struct hostif_hdr header;
uint16_t failure_count;
uint16_t timer;
} __attribute__((packed));
} __attribute__ ((packed));
struct hostif_mic_failure_confirm_t {
struct hostif_hdr header;
uint16_t result_code;
} __attribute__((packed));
} __attribute__ ((packed));
#define BASIC_RATE 0x80
#define RATE_MASK 0x7F
......@@ -587,13 +583,13 @@ struct hostif_mic_failure_confirm_t {
((A&RATE_MASK)==TX_RATE_54M))
enum {
CONNECT_STATUS=0,
CONNECT_STATUS = 0,
DISCONNECT_STATUS
};
/* preamble type */
enum {
LONG_PREAMBLE=0,
LONG_PREAMBLE = 0,
SHORT_PREAMBLE
};
......@@ -623,21 +619,24 @@ enum {
#include "ks_wlan.h"
/* function prototype */
extern int hostif_data_request( struct ks_wlan_private *priv, struct sk_buff *packet );
extern void hostif_receive( struct ks_wlan_private *priv, unsigned char *p, unsigned int size );
extern int hostif_data_request(struct ks_wlan_private *priv,
struct sk_buff *packet);
extern void hostif_receive(struct ks_wlan_private *priv, unsigned char *p,
unsigned int size);
extern void hostif_sme_enqueue(struct ks_wlan_private *priv, uint16_t event);
extern int hostif_init( struct ks_wlan_private *priv );
extern void hostif_exit( struct ks_wlan_private *priv );
extern int hostif_init(struct ks_wlan_private *priv);
extern void hostif_exit(struct ks_wlan_private *priv);
static
inline int hif_align_size(int size)
{
#ifdef KS_ATOM
if( size < 1024 )
if (size < 1024)
size = 1024;
#endif
#ifdef DEVICE_ALIGNMENT
return (size%DEVICE_ALIGNMENT) ? size + DEVICE_ALIGNMENT - (size % DEVICE_ALIGNMENT) : size;
return (size % DEVICE_ALIGNMENT) ? size + DEVICE_ALIGNMENT -
(size % DEVICE_ALIGNMENT) : size;
#else
return size;
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment