Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Punit Vara <punitvara@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Punit Vara and committed by
Greg Kroah-Hartman
81710951 ef50db63

+83 -83
+69 -69
drivers/staging/ks7010/ks_wlan.h
··· 42 42 #endif 43 43 44 44 struct ks_wlan_parameter { 45 - uint8_t operation_mode; /* Operation Mode */ 46 - uint8_t channel; /* Channel */ 47 - uint8_t tx_rate; /* Transmit Rate */ 45 + u8 operation_mode; /* Operation Mode */ 46 + u8 channel; /* Channel */ 47 + u8 tx_rate; /* Transmit Rate */ 48 48 struct { 49 - uint8_t size; 50 - uint8_t body[16]; 49 + u8 size; 50 + u8 body[16]; 51 51 } rate_set; 52 - uint8_t bssid[ETH_ALEN]; /* BSSID */ 52 + u8 bssid[ETH_ALEN]; /* BSSID */ 53 53 struct { 54 - uint8_t size; 55 - uint8_t body[32 + 1]; 54 + u8 size; 55 + u8 body[32 + 1]; 56 56 } ssid; /* SSID */ 57 - uint8_t preamble; /* Preamble */ 58 - uint8_t powermgt; /* PowerManagementMode */ 59 - uint32_t scan_type; /* AP List Scan Type */ 57 + u8 preamble; /* Preamble */ 58 + u8 powermgt; /* PowerManagementMode */ 59 + u32 scan_type; /* AP List Scan Type */ 60 60 #define BEACON_LOST_COUNT_MIN 0 61 61 #define BEACON_LOST_COUNT_MAX 65535 62 - uint32_t beacon_lost_count; /* Beacon Lost Count */ 63 - uint32_t rts; /* RTS Threashold */ 64 - uint32_t fragment; /* Fragmentation Threashold */ 65 - uint32_t privacy_invoked; 66 - uint32_t wep_index; 62 + u32 beacon_lost_count; /* Beacon Lost Count */ 63 + u32 rts; /* RTS Threashold */ 64 + u32 fragment; /* Fragmentation Threashold */ 65 + u32 privacy_invoked; 66 + u32 wep_index; 67 67 struct { 68 - uint8_t size; 69 - uint8_t val[13 * 2 + 1]; 68 + u8 size; 69 + u8 val[13 * 2 + 1]; 70 70 } wep_key[4]; 71 - uint16_t authenticate_type; 72 - uint16_t phy_type; /* 11b/11g/11bg mode type */ 73 - uint16_t cts_mode; /* for 11g/11bg mode cts mode */ 74 - uint16_t phy_info_timer; /* phy information timer */ 71 + u16 authenticate_type; 72 + u16 phy_type; /* 11b/11g/11bg mode type */ 73 + u16 cts_mode; /* for 11g/11bg mode cts mode */ 74 + u16 phy_info_timer; /* phy information timer */ 75 75 }; 76 76 77 77 enum { ··· 215 215 216 216 #define RSN_IE_BODY_MAX 64 217 217 struct rsn_ie_t { 218 - uint8_t id; /* 0xdd = WPA or 0x30 = RSN */ 219 - uint8_t size; /* max ? 255 ? */ 220 - uint8_t body[RSN_IE_BODY_MAX]; 218 + u8 id; /* 0xdd = WPA or 0x30 = RSN */ 219 + u8 size; /* max ? 255 ? */ 220 + u8 body[RSN_IE_BODY_MAX]; 221 221 } __packed; 222 222 223 223 #ifdef WPS 224 224 #define WPS_IE_BODY_MAX 255 225 225 struct wps_ie_t { 226 - uint8_t id; /* 221 'dd <len> 00 50 F2 04' */ 227 - uint8_t size; /* max ? 255 ? */ 228 - uint8_t body[WPS_IE_BODY_MAX]; 226 + u8 id; /* 221 'dd <len> 00 50 F2 04' */ 227 + u8 size; /* max ? 255 ? */ 228 + u8 body[WPS_IE_BODY_MAX]; 229 229 } __packed; 230 230 #endif /* WPS */ 231 231 232 232 struct local_ap_t { 233 - uint8_t bssid[6]; 234 - uint8_t rssi; 235 - uint8_t sq; 233 + u8 bssid[6]; 234 + u8 rssi; 235 + u8 sq; 236 236 struct { 237 - uint8_t size; 238 - uint8_t body[32]; 239 - uint8_t ssid_pad; 237 + u8 size; 238 + u8 body[32]; 239 + u8 ssid_pad; 240 240 } ssid; 241 241 struct { 242 - uint8_t size; 243 - uint8_t body[16]; 244 - uint8_t rate_pad; 242 + u8 size; 243 + u8 body[16]; 244 + u8 rate_pad; 245 245 } rate_set; 246 - uint16_t capability; 247 - uint8_t channel; 248 - uint8_t noise; 246 + u16 capability; 247 + u8 channel; 248 + u8 noise; 249 249 struct rsn_ie_t wpa_ie; 250 250 struct rsn_ie_t rsn_ie; 251 251 #ifdef WPS ··· 261 261 }; 262 262 263 263 struct local_gain_t { 264 - uint8_t TxMode; 265 - uint8_t RxMode; 266 - uint8_t TxGain; 267 - uint8_t RxGain; 264 + u8 TxMode; 265 + u8 RxMode; 266 + u8 TxGain; 267 + u8 RxGain; 268 268 }; 269 269 270 270 struct local_eeprom_sum_t { 271 - uint8_t type; 272 - uint8_t result; 271 + u8 type; 272 + u8 result; 273 273 }; 274 274 275 275 enum { ··· 351 351 #define MIC_KEY_SIZE 8 352 352 353 353 struct wpa_key_t { 354 - uint32_t ext_flags; /* IW_ENCODE_EXT_xxx */ 355 - uint8_t tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ 356 - uint8_t rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ 354 + u32 ext_flags; /* IW_ENCODE_EXT_xxx */ 355 + u8 tx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ 356 + u8 rx_seq[IW_ENCODE_SEQ_MAX_SIZE]; /* LSB first */ 357 357 struct sockaddr addr; /* ff:ff:ff:ff:ff:ff for broadcast/multicast 358 358 * (group) keys or unicast address for 359 359 * individual keys */ 360 - uint16_t alg; 361 - uint16_t key_len; /* WEP: 5 or 13, TKIP: 32, CCMP: 16 */ 362 - uint8_t key_val[IW_ENCODING_TOKEN_MAX]; 363 - uint8_t tx_mic_key[MIC_KEY_SIZE]; 364 - uint8_t rx_mic_key[MIC_KEY_SIZE]; 360 + u16 alg; 361 + u16 key_len; /* WEP: 5 or 13, TKIP: 32, CCMP: 16 */ 362 + u8 key_val[IW_ENCODING_TOKEN_MAX]; 363 + u8 tx_mic_key[MIC_KEY_SIZE]; 364 + u8 rx_mic_key[MIC_KEY_SIZE]; 365 365 }; 366 366 #define WPA_KEY_INDEX_MAX 4 367 367 #define WPA_RX_SEQ_LEN 6 368 368 369 369 struct mic_failure_t { 370 - uint16_t failure; /* MIC Failure counter 0 or 1 or 2 */ 371 - uint16_t counter; /* 1sec counter 0-60 */ 372 - uint32_t last_failure_time; 370 + u16 failure; /* MIC Failure counter 0 or 1 or 2 */ 371 + u16 counter; /* 1sec counter 0-60 */ 372 + u32 last_failure_time; 373 373 int stop; /* stop flag */ 374 374 }; 375 375 ··· 390 390 #include <linux/list.h> 391 391 #define PMK_LIST_MAX 8 392 392 struct pmk_list_t { 393 - uint16_t size; 393 + u16 size; 394 394 struct list_head head; 395 395 struct pmk_t { 396 396 struct list_head list; 397 - uint8_t bssid[ETH_ALEN]; 398 - uint8_t pmkid[IW_PMKID_LEN]; 397 + u8 bssid[ETH_ALEN]; 398 + u8 pmkid[IW_PMKID_LEN]; 399 399 } pmk[PMK_LIST_MAX]; 400 400 }; 401 401 ··· 403 403 struct wps_status_t { 404 404 int wps_enabled; 405 405 int ielen; 406 - uint8_t ie[255]; 406 + u8 ie[255]; 407 407 }; 408 408 #endif /* WPS */ 409 409 ··· 438 438 struct pmk_list_t pmklist; 439 439 /* wireless parameter */ 440 440 struct ks_wlan_parameter reg; 441 - uint8_t current_rate; 441 + u8 current_rate; 442 442 443 443 char nick[IW_ESSID_MAX_SIZE + 1]; 444 444 ··· 471 471 /* spinlock_t lock; */ 472 472 #define FORCE_DISCONNECT 0x80000000 473 473 #define CONNECT_STATUS_MASK 0x7FFFFFFF 474 - uint32_t connect_status; /* connect status */ 474 + u32 connect_status; /* connect status */ 475 475 int infra_status; /* Infractructure status */ 476 476 477 - uint8_t data_buff[0x1000]; 477 + u8 data_buff[0x1000]; 478 478 479 - uint8_t scan_ssid_len; 480 - uint8_t scan_ssid[IW_ESSID_MAX_SIZE + 1]; 479 + u8 scan_ssid_len; 480 + u8 scan_ssid[IW_ESSID_MAX_SIZE + 1]; 481 481 struct local_gain_t gain; 482 482 #ifdef WPS 483 483 struct net_device *l2_dev; 484 484 int l2_fd; 485 485 struct wps_status_t wps; 486 486 #endif /* WPS */ 487 - uint8_t sleep_mode; 487 + u8 sleep_mode; 488 488 489 - uint8_t region; 489 + u8 region; 490 490 struct local_eeprom_sum_t eeprom_sum; 491 - uint8_t eeprom_checksum; 491 + u8 eeprom_checksum; 492 492 493 493 struct hostt_t hostt; 494 494
+5 -5
drivers/staging/ks7010/michael_mic.c
··· 98 98 static 99 99 void MichaelGetMIC(struct michel_mic_t *Mic, uint8_t *dst) 100 100 { 101 - uint8_t *data = Mic->M; 101 + u8 *data = Mic->M; 102 102 103 103 switch (Mic->nBytesInM) { 104 104 case 0: ··· 125 125 MichaelClear(Mic); 126 126 } 127 127 128 - void MichaelMICFunction(struct michel_mic_t *Mic, uint8_t *Key, 129 - uint8_t *Data, int Len, uint8_t priority, 130 - uint8_t *Result) 128 + void MichaelMICFunction(struct michel_mic_t *Mic, u8 *Key, 129 + u8 *Data, int Len, u8 priority, 130 + u8 *Result) 131 131 { 132 - uint8_t pad_data[4] = { priority, 0, 0, 0 }; 132 + u8 pad_data[4] = { priority, 0, 0, 0 }; 133 133 // Compute the MIC value 134 134 /* 135 135 * IEEE802.11i page 47
+9 -9
drivers/staging/ks7010/michael_mic.h
··· 11 11 12 12 /* MichelMIC routine define */ 13 13 struct michel_mic_t { 14 - uint32_t K0; // Key 15 - uint32_t K1; // Key 16 - uint32_t L; // Current state 17 - uint32_t R; // Current state 18 - uint8_t M[4]; // Message accumulator (single word) 14 + u32 K0; // Key 15 + u32 K1; // Key 16 + u32 L; // Current state 17 + u32 R; // Current state 18 + u8 M[4]; // Message accumulator (single word) 19 19 int nBytesInM; // # bytes in M 20 - uint8_t Result[8]; 20 + u8 Result[8]; 21 21 }; 22 22 23 - void MichaelMICFunction(struct michel_mic_t *Mic, uint8_t *Key, 24 - uint8_t *Data, int Len, uint8_t priority, 25 - uint8_t *Result); 23 + void MichaelMICFunction(struct michel_mic_t *Mic, u8 *Key, 24 + u8 *Data, int Len, u8 priority, 25 + u8 *Result);