Commit 81710951 authored by Punit Vara's avatar Punit Vara Committed by Greg Kroah-Hartman

Staging: ks7010: Use preffered kernel types

Replace uint8_t, uint16_t and uint32_t with preferred kernel types
u8, u16 and u32 respectively suggested by checkpatch.pl
Signed-off-by: default avatarPunit Vara <punitvara@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ef50db63
...@@ -42,36 +42,36 @@ ...@@ -42,36 +42,36 @@
#endif #endif
struct ks_wlan_parameter { struct ks_wlan_parameter {
uint8_t operation_mode; /* Operation Mode */ u8 operation_mode; /* Operation Mode */
uint8_t channel; /* Channel */ u8 channel; /* Channel */
uint8_t tx_rate; /* Transmit Rate */ u8 tx_rate; /* Transmit Rate */
struct { struct {
uint8_t size; u8 size;
uint8_t body[16]; u8 body[16];
} rate_set; } rate_set;
uint8_t bssid[ETH_ALEN]; /* BSSID */ u8 bssid[ETH_ALEN]; /* BSSID */
struct { struct {
uint8_t size; u8 size;
uint8_t body[32 + 1]; u8 body[32 + 1];
} ssid; /* SSID */ } ssid; /* SSID */
uint8_t preamble; /* Preamble */ u8 preamble; /* Preamble */
uint8_t powermgt; /* PowerManagementMode */ u8 powermgt; /* PowerManagementMode */
uint32_t scan_type; /* AP List Scan Type */ u32 scan_type; /* AP List Scan Type */
#define BEACON_LOST_COUNT_MIN 0 #define BEACON_LOST_COUNT_MIN 0
#define BEACON_LOST_COUNT_MAX 65535 #define BEACON_LOST_COUNT_MAX 65535
uint32_t beacon_lost_count; /* Beacon Lost Count */ u32 beacon_lost_count; /* Beacon Lost Count */
uint32_t rts; /* RTS Threashold */ u32 rts; /* RTS Threashold */
uint32_t fragment; /* Fragmentation Threashold */ u32 fragment; /* Fragmentation Threashold */
uint32_t privacy_invoked; u32 privacy_invoked;
uint32_t wep_index; u32 wep_index;
struct { struct {
uint8_t size; u8 size;
uint8_t val[13 * 2 + 1]; u8 val[13 * 2 + 1];
} wep_key[4]; } wep_key[4];
uint16_t authenticate_type; u16 authenticate_type;
uint16_t phy_type; /* 11b/11g/11bg mode type */ u16 phy_type; /* 11b/11g/11bg mode type */
uint16_t cts_mode; /* for 11g/11bg mode cts mode */ u16 cts_mode; /* for 11g/11bg mode cts mode */
uint16_t phy_info_timer; /* phy information timer */ u16 phy_info_timer; /* phy information timer */
}; };
enum { enum {
...@@ -215,37 +215,37 @@ struct hostt_t { ...@@ -215,37 +215,37 @@ struct hostt_t {
#define RSN_IE_BODY_MAX 64 #define RSN_IE_BODY_MAX 64
struct rsn_ie_t { struct rsn_ie_t {
uint8_t id; /* 0xdd = WPA or 0x30 = RSN */ u8 id; /* 0xdd = WPA or 0x30 = RSN */
uint8_t size; /* max ? 255 ? */ u8 size; /* max ? 255 ? */
uint8_t body[RSN_IE_BODY_MAX]; u8 body[RSN_IE_BODY_MAX];
} __packed; } __packed;
#ifdef WPS #ifdef WPS
#define WPS_IE_BODY_MAX 255 #define WPS_IE_BODY_MAX 255
struct wps_ie_t { struct wps_ie_t {
uint8_t id; /* 221 'dd <len> 00 50 F2 04' */ u8 id; /* 221 'dd <len> 00 50 F2 04' */
uint8_t size; /* max ? 255 ? */ u8 size; /* max ? 255 ? */
uint8_t body[WPS_IE_BODY_MAX]; u8 body[WPS_IE_BODY_MAX];
} __packed; } __packed;
#endif /* WPS */ #endif /* WPS */
struct local_ap_t { struct local_ap_t {
uint8_t bssid[6]; u8 bssid[6];
uint8_t rssi; u8 rssi;
uint8_t sq; u8 sq;
struct { struct {
uint8_t size; u8 size;
uint8_t body[32]; u8 body[32];
uint8_t ssid_pad; u8 ssid_pad;
} ssid; } ssid;
struct { struct {
uint8_t size; u8 size;
uint8_t body[16]; u8 body[16];
uint8_t rate_pad; u8 rate_pad;
} rate_set; } rate_set;
uint16_t capability; u16 capability;
uint8_t channel; u8 channel;
uint8_t noise; u8 noise;
struct rsn_ie_t wpa_ie; struct rsn_ie_t wpa_ie;
struct rsn_ie_t rsn_ie; struct rsn_ie_t rsn_ie;
#ifdef WPS #ifdef WPS
...@@ -261,15 +261,15 @@ struct local_aplist_t { ...@@ -261,15 +261,15 @@ struct local_aplist_t {
}; };
struct local_gain_t { struct local_gain_t {
uint8_t TxMode; u8 TxMode;
uint8_t RxMode; u8 RxMode;
uint8_t TxGain; u8 TxGain;
uint8_t RxGain; u8 RxGain;
}; };
struct local_eeprom_sum_t { struct local_eeprom_sum_t {
uint8_t type; u8 type;
uint8_t result; u8 result;
}; };
enum { enum {
...@@ -351,25 +351,25 @@ enum { ...@@ -351,25 +351,25 @@ enum {
#define MIC_KEY_SIZE 8 #define MIC_KEY_SIZE 8
struct wpa_key_t { struct wpa_key_t {
uint32_t ext_flags; /* IW_ENCODE_EXT_xxx */ u32 ext_flags; /* IW_ENCODE_EXT_xxx */
uint8_t tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
uint8_t rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */
struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast
* (group) keys or unicast address for * (group) keys or unicast address for
* individual keys */ * individual keys */
uint16_t alg; u16 alg;
uint16_t key_len; /* WEP: 5 or 13, TKIP: 32, CCMP: 16 */ u16 key_len; /* WEP: 5 or 13, TKIP: 32, CCMP: 16 */
uint8_t key_val[IW_ENCODING_TOKEN_MAX]; u8 key_val[IW_ENCODING_TOKEN_MAX];
uint8_t tx_mic_key[MIC_KEY_SIZE]; u8 tx_mic_key[MIC_KEY_SIZE];
uint8_t rx_mic_key[MIC_KEY_SIZE]; u8 rx_mic_key[MIC_KEY_SIZE];
}; };
#define WPA_KEY_INDEX_MAX 4 #define WPA_KEY_INDEX_MAX 4
#define WPA_RX_SEQ_LEN 6 #define WPA_RX_SEQ_LEN 6
struct mic_failure_t { struct mic_failure_t {
uint16_t failure; /* MIC Failure counter 0 or 1 or 2 */ u16 failure; /* MIC Failure counter 0 or 1 or 2 */
uint16_t counter; /* 1sec counter 0-60 */ u16 counter; /* 1sec counter 0-60 */
uint32_t last_failure_time; u32 last_failure_time;
int stop; /* stop flag */ int stop; /* stop flag */
}; };
...@@ -390,12 +390,12 @@ struct wpa_status_t { ...@@ -390,12 +390,12 @@ struct wpa_status_t {
#include <linux/list.h> #include <linux/list.h>
#define PMK_LIST_MAX 8 #define PMK_LIST_MAX 8
struct pmk_list_t { struct pmk_list_t {
uint16_t size; u16 size;
struct list_head head; struct list_head head;
struct pmk_t { struct pmk_t {
struct list_head list; struct list_head list;
uint8_t bssid[ETH_ALEN]; u8 bssid[ETH_ALEN];
uint8_t pmkid[IW_PMKID_LEN]; u8 pmkid[IW_PMKID_LEN];
} pmk[PMK_LIST_MAX]; } pmk[PMK_LIST_MAX];
}; };
...@@ -403,7 +403,7 @@ struct pmk_list_t { ...@@ -403,7 +403,7 @@ struct pmk_list_t {
struct wps_status_t { struct wps_status_t {
int wps_enabled; int wps_enabled;
int ielen; int ielen;
uint8_t ie[255]; u8 ie[255];
}; };
#endif /* WPS */ #endif /* WPS */
...@@ -438,7 +438,7 @@ struct ks_wlan_private { ...@@ -438,7 +438,7 @@ struct ks_wlan_private {
struct pmk_list_t pmklist; struct pmk_list_t pmklist;
/* wireless parameter */ /* wireless parameter */
struct ks_wlan_parameter reg; struct ks_wlan_parameter reg;
uint8_t current_rate; u8 current_rate;
char nick[IW_ESSID_MAX_SIZE + 1]; char nick[IW_ESSID_MAX_SIZE + 1];
...@@ -471,24 +471,24 @@ struct ks_wlan_private { ...@@ -471,24 +471,24 @@ struct ks_wlan_private {
/* spinlock_t lock; */ /* spinlock_t lock; */
#define FORCE_DISCONNECT 0x80000000 #define FORCE_DISCONNECT 0x80000000
#define CONNECT_STATUS_MASK 0x7FFFFFFF #define CONNECT_STATUS_MASK 0x7FFFFFFF
uint32_t connect_status; /* connect status */ u32 connect_status; /* connect status */
int infra_status; /* Infractructure status */ int infra_status; /* Infractructure status */
uint8_t data_buff[0x1000]; u8 data_buff[0x1000];
uint8_t scan_ssid_len; u8 scan_ssid_len;
uint8_t scan_ssid[IW_ESSID_MAX_SIZE + 1]; u8 scan_ssid[IW_ESSID_MAX_SIZE + 1];
struct local_gain_t gain; struct local_gain_t gain;
#ifdef WPS #ifdef WPS
struct net_device *l2_dev; struct net_device *l2_dev;
int l2_fd; int l2_fd;
struct wps_status_t wps; struct wps_status_t wps;
#endif /* WPS */ #endif /* WPS */
uint8_t sleep_mode; u8 sleep_mode;
uint8_t region; u8 region;
struct local_eeprom_sum_t eeprom_sum; struct local_eeprom_sum_t eeprom_sum;
uint8_t eeprom_checksum; u8 eeprom_checksum;
struct hostt_t hostt; struct hostt_t hostt;
......
...@@ -98,7 +98,7 @@ void MichaelAppend(struct michel_mic_t *Mic, uint8_t *src, int nBytes) ...@@ -98,7 +98,7 @@ void MichaelAppend(struct michel_mic_t *Mic, uint8_t *src, int nBytes)
static static
void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst) void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst)
{ {
uint8_t *data = Mic->M; u8 *data = Mic->M;
switch (Mic->nBytesInM) { switch (Mic->nBytesInM) {
case 0: case 0:
...@@ -125,11 +125,11 @@ void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst) ...@@ -125,11 +125,11 @@ void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst)
MichaelClear(Mic); MichaelClear(Mic);
} }
void MichaelMICFunction(struct michel_mic_t *Mic, uint8_t *Key, void MichaelMICFunction(struct michel_mic_t *Mic, u8 *Key,
uint8_t *Data, int Len, uint8_t priority, u8 *Data, int Len, u8 priority,
uint8_t *Result) u8 *Result)
{ {
uint8_t pad_data[4] = { priority, 0, 0, 0 }; u8 pad_data[4] = { priority, 0, 0, 0 };
// Compute the MIC value // Compute the MIC value
/* /*
* IEEE802.11i page 47 * IEEE802.11i page 47
......
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
/* MichelMIC routine define */ /* MichelMIC routine define */
struct michel_mic_t { struct michel_mic_t {
uint32_t K0; // Key u32 K0; // Key
uint32_t K1; // Key u32 K1; // Key
uint32_t L; // Current state u32 L; // Current state
uint32_t R; // Current state u32 R; // Current state
uint8_t M[4]; // Message accumulator (single word) u8 M[4]; // Message accumulator (single word)
int nBytesInM; // # bytes in M int nBytesInM; // # bytes in M
uint8_t Result[8]; u8 Result[8];
}; };
void MichaelMICFunction(struct michel_mic_t *Mic, uint8_t *Key, void MichaelMICFunction(struct michel_mic_t *Mic, u8 *Key,
uint8_t *Data, int Len, uint8_t priority, u8 *Data, int Len, u8 priority,
uint8_t *Result); u8 *Result);
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