diff options
Diffstat (limited to 'drivers/net/wireless/ipw2200.h')
| -rw-r--r-- | drivers/net/wireless/ipw2200.h | 406 |
1 files changed, 171 insertions, 235 deletions
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h index 66bb5903537f..5b00882133f9 100644 --- a/drivers/net/wireless/ipw2200.h +++ b/drivers/net/wireless/ipw2200.h | |||
| @@ -56,8 +56,7 @@ | |||
| 56 | #include <linux/workqueue.h> | 56 | #include <linux/workqueue.h> |
| 57 | 57 | ||
| 58 | /* Authentication and Association States */ | 58 | /* Authentication and Association States */ |
| 59 | enum connection_manager_assoc_states | 59 | enum connection_manager_assoc_states { |
| 60 | { | ||
| 61 | CMAS_INIT = 0, | 60 | CMAS_INIT = 0, |
| 62 | CMAS_TX_AUTH_SEQ_1, | 61 | CMAS_TX_AUTH_SEQ_1, |
| 63 | CMAS_RX_AUTH_SEQ_2, | 62 | CMAS_RX_AUTH_SEQ_2, |
| @@ -74,7 +73,6 @@ enum connection_manager_assoc_states | |||
| 74 | CMAS_LAST | 73 | CMAS_LAST |
| 75 | }; | 74 | }; |
| 76 | 75 | ||
| 77 | |||
| 78 | #define IPW_WAIT (1<<0) | 76 | #define IPW_WAIT (1<<0) |
| 79 | #define IPW_QUIET (1<<1) | 77 | #define IPW_QUIET (1<<1) |
| 80 | #define IPW_ROAMING (1<<2) | 78 | #define IPW_ROAMING (1<<2) |
| @@ -190,7 +188,6 @@ enum connection_manager_assoc_states | |||
| 190 | #define DCT_FLAG_EXT_MODE_CCK 0x01 | 188 | #define DCT_FLAG_EXT_MODE_CCK 0x01 |
| 191 | #define DCT_FLAG_EXT_MODE_OFDM 0x00 | 189 | #define DCT_FLAG_EXT_MODE_OFDM 0x00 |
| 192 | 190 | ||
| 193 | |||
| 194 | #define TX_RX_TYPE_MASK 0xFF | 191 | #define TX_RX_TYPE_MASK 0xFF |
| 195 | #define TX_FRAME_TYPE 0x00 | 192 | #define TX_FRAME_TYPE 0x00 |
| 196 | #define TX_HOST_COMMAND_TYPE 0x01 | 193 | #define TX_HOST_COMMAND_TYPE 0x01 |
| @@ -242,107 +239,97 @@ enum connection_manager_assoc_states | |||
| 242 | * Contains common data for Rx and Tx queues | 239 | * Contains common data for Rx and Tx queues |
| 243 | */ | 240 | */ |
| 244 | struct clx2_queue { | 241 | struct clx2_queue { |
| 245 | int n_bd; /**< number of BDs in this queue */ | 242 | int n_bd; /**< number of BDs in this queue */ |
| 246 | int first_empty; /**< 1-st empty entry (index) */ | 243 | int first_empty; /**< 1-st empty entry (index) */ |
| 247 | int last_used; /**< last used entry (index) */ | 244 | int last_used; /**< last used entry (index) */ |
| 248 | u32 reg_w; /**< 'write' reg (queue head), addr in domain 1 */ | 245 | u32 reg_w; /**< 'write' reg (queue head), addr in domain 1 */ |
| 249 | u32 reg_r; /**< 'read' reg (queue tail), addr in domain 1 */ | 246 | u32 reg_r; /**< 'read' reg (queue tail), addr in domain 1 */ |
| 250 | dma_addr_t dma_addr; /**< physical addr for BD's */ | 247 | dma_addr_t dma_addr; /**< physical addr for BD's */ |
| 251 | int low_mark; /**< low watermark, resume queue if free space more than this */ | 248 | int low_mark; /**< low watermark, resume queue if free space more than this */ |
| 252 | int high_mark; /**< high watermark, stop queue if free space less than this */ | 249 | int high_mark; /**< high watermark, stop queue if free space less than this */ |
| 253 | } __attribute__ ((packed)); | 250 | } __attribute__ ((packed)); |
| 254 | 251 | ||
| 255 | struct machdr32 | 252 | struct machdr32 { |
| 256 | { | ||
| 257 | u16 frame_ctl; | 253 | u16 frame_ctl; |
| 258 | u16 duration; // watch out for endians! | 254 | u16 duration; // watch out for endians! |
| 259 | u8 addr1[ MACADRR_BYTE_LEN ]; | 255 | u8 addr1[MACADRR_BYTE_LEN]; |
| 260 | u8 addr2[ MACADRR_BYTE_LEN ]; | 256 | u8 addr2[MACADRR_BYTE_LEN]; |
| 261 | u8 addr3[ MACADRR_BYTE_LEN ]; | 257 | u8 addr3[MACADRR_BYTE_LEN]; |
| 262 | u16 seq_ctrl; // more endians! | 258 | u16 seq_ctrl; // more endians! |
| 263 | u8 addr4[ MACADRR_BYTE_LEN ]; | 259 | u8 addr4[MACADRR_BYTE_LEN]; |
| 264 | u16 qos_ctrl; | 260 | u16 qos_ctrl; |
| 265 | } __attribute__ ((packed)) ; | 261 | } __attribute__ ((packed)); |
| 266 | 262 | ||
| 267 | struct machdr30 | 263 | struct machdr30 { |
| 268 | { | ||
| 269 | u16 frame_ctl; | 264 | u16 frame_ctl; |
| 270 | u16 duration; // watch out for endians! | 265 | u16 duration; // watch out for endians! |
| 271 | u8 addr1[ MACADRR_BYTE_LEN ]; | 266 | u8 addr1[MACADRR_BYTE_LEN]; |
| 272 | u8 addr2[ MACADRR_BYTE_LEN ]; | 267 | u8 addr2[MACADRR_BYTE_LEN]; |
| 273 | u8 addr3[ MACADRR_BYTE_LEN ]; | 268 | u8 addr3[MACADRR_BYTE_LEN]; |
| 274 | u16 seq_ctrl; // more endians! | 269 | u16 seq_ctrl; // more endians! |
| 275 | u8 addr4[ MACADRR_BYTE_LEN ]; | 270 | u8 addr4[MACADRR_BYTE_LEN]; |
| 276 | } __attribute__ ((packed)) ; | 271 | } __attribute__ ((packed)); |
| 277 | 272 | ||
| 278 | struct machdr26 | 273 | struct machdr26 { |
| 279 | { | ||
| 280 | u16 frame_ctl; | 274 | u16 frame_ctl; |
| 281 | u16 duration; // watch out for endians! | 275 | u16 duration; // watch out for endians! |
| 282 | u8 addr1[ MACADRR_BYTE_LEN ]; | 276 | u8 addr1[MACADRR_BYTE_LEN]; |
| 283 | u8 addr2[ MACADRR_BYTE_LEN ]; | 277 | u8 addr2[MACADRR_BYTE_LEN]; |
| 284 | u8 addr3[ MACADRR_BYTE_LEN ]; | 278 | u8 addr3[MACADRR_BYTE_LEN]; |
| 285 | u16 seq_ctrl; // more endians! | 279 | u16 seq_ctrl; // more endians! |
| 286 | u16 qos_ctrl; | 280 | u16 qos_ctrl; |
| 287 | } __attribute__ ((packed)) ; | 281 | } __attribute__ ((packed)); |
| 288 | 282 | ||
| 289 | struct machdr24 | 283 | struct machdr24 { |
| 290 | { | ||
| 291 | u16 frame_ctl; | 284 | u16 frame_ctl; |
| 292 | u16 duration; // watch out for endians! | 285 | u16 duration; // watch out for endians! |
| 293 | u8 addr1[ MACADRR_BYTE_LEN ]; | 286 | u8 addr1[MACADRR_BYTE_LEN]; |
| 294 | u8 addr2[ MACADRR_BYTE_LEN ]; | 287 | u8 addr2[MACADRR_BYTE_LEN]; |
| 295 | u8 addr3[ MACADRR_BYTE_LEN ]; | 288 | u8 addr3[MACADRR_BYTE_LEN]; |
| 296 | u16 seq_ctrl; // more endians! | 289 | u16 seq_ctrl; // more endians! |
| 297 | } __attribute__ ((packed)) ; | 290 | } __attribute__ ((packed)); |
| 298 | 291 | ||
| 299 | // TX TFD with 32 byte MAC Header | 292 | // TX TFD with 32 byte MAC Header |
| 300 | struct tx_tfd_32 | 293 | struct tx_tfd_32 { |
| 301 | { | 294 | struct machdr32 mchdr; // 32 |
| 302 | struct machdr32 mchdr; // 32 | 295 | u32 uivplaceholder[2]; // 8 |
| 303 | u32 uivplaceholder[2]; // 8 | 296 | } __attribute__ ((packed)); |
| 304 | } __attribute__ ((packed)) ; | ||
| 305 | 297 | ||
| 306 | // TX TFD with 30 byte MAC Header | 298 | // TX TFD with 30 byte MAC Header |
| 307 | struct tx_tfd_30 | 299 | struct tx_tfd_30 { |
| 308 | { | 300 | struct machdr30 mchdr; // 30 |
| 309 | struct machdr30 mchdr; // 30 | 301 | u8 reserved[2]; // 2 |
| 310 | u8 reserved[2]; // 2 | 302 | u32 uivplaceholder[2]; // 8 |
| 311 | u32 uivplaceholder[2]; // 8 | 303 | } __attribute__ ((packed)); |
| 312 | } __attribute__ ((packed)) ; | ||
| 313 | 304 | ||
| 314 | // tx tfd with 26 byte mac header | 305 | // tx tfd with 26 byte mac header |
| 315 | struct tx_tfd_26 | 306 | struct tx_tfd_26 { |
| 316 | { | 307 | struct machdr26 mchdr; // 26 |
| 317 | struct machdr26 mchdr; // 26 | 308 | u8 reserved1[2]; // 2 |
| 318 | u8 reserved1[2]; // 2 | 309 | u32 uivplaceholder[2]; // 8 |
| 319 | u32 uivplaceholder[2]; // 8 | 310 | u8 reserved2[4]; // 4 |
| 320 | u8 reserved2[4]; // 4 | 311 | } __attribute__ ((packed)); |
| 321 | } __attribute__ ((packed)) ; | ||
| 322 | 312 | ||
| 323 | // tx tfd with 24 byte mac header | 313 | // tx tfd with 24 byte mac header |
| 324 | struct tx_tfd_24 | 314 | struct tx_tfd_24 { |
| 325 | { | 315 | struct machdr24 mchdr; // 24 |
| 326 | struct machdr24 mchdr; // 24 | 316 | u32 uivplaceholder[2]; // 8 |
| 327 | u32 uivplaceholder[2]; // 8 | 317 | u8 reserved[8]; // 8 |
| 328 | u8 reserved[8]; // 8 | 318 | } __attribute__ ((packed)); |
| 329 | } __attribute__ ((packed)) ; | ||
| 330 | |||
| 331 | 319 | ||
| 332 | #define DCT_WEP_KEY_FIELD_LENGTH 16 | 320 | #define DCT_WEP_KEY_FIELD_LENGTH 16 |
| 333 | 321 | ||
| 334 | struct tfd_command | 322 | struct tfd_command { |
| 335 | { | ||
| 336 | u8 index; | 323 | u8 index; |
| 337 | u8 length; | 324 | u8 length; |
| 338 | u16 reserved; | 325 | u16 reserved; |
| 339 | u8 payload[0]; | 326 | u8 payload[0]; |
| 340 | } __attribute__ ((packed)) ; | 327 | } __attribute__ ((packed)); |
| 341 | 328 | ||
| 342 | struct tfd_data { | 329 | struct tfd_data { |
| 343 | /* Header */ | 330 | /* Header */ |
| 344 | u32 work_area_ptr; | 331 | u32 work_area_ptr; |
| 345 | u8 station_number; /* 0 for BSS */ | 332 | u8 station_number; /* 0 for BSS */ |
| 346 | u8 reserved1; | 333 | u8 reserved1; |
| 347 | u16 reserved2; | 334 | u16 reserved2; |
| 348 | 335 | ||
| @@ -359,14 +346,13 @@ struct tfd_data { | |||
| 359 | u8 antenna; | 346 | u8 antenna; |
| 360 | u16 next_packet_duration; | 347 | u16 next_packet_duration; |
| 361 | u16 next_frag_len; | 348 | u16 next_frag_len; |
| 362 | u16 back_off_counter; //////txop; | 349 | u16 back_off_counter; //////txop; |
| 363 | u8 retrylimit; | 350 | u8 retrylimit; |
| 364 | u16 cwcurrent; | 351 | u16 cwcurrent; |
| 365 | u8 reserved3; | 352 | u8 reserved3; |
| 366 | 353 | ||
| 367 | /* 802.11 MAC Header */ | 354 | /* 802.11 MAC Header */ |
| 368 | union | 355 | union { |
| 369 | { | ||
| 370 | struct tx_tfd_24 tfd_24; | 356 | struct tx_tfd_24 tfd_24; |
| 371 | struct tx_tfd_26 tfd_26; | 357 | struct tx_tfd_26 tfd_26; |
| 372 | struct tx_tfd_30 tfd_30; | 358 | struct tx_tfd_30 tfd_30; |
| @@ -379,8 +365,7 @@ struct tfd_data { | |||
| 379 | u16 chunk_len[NUM_TFD_CHUNKS]; | 365 | u16 chunk_len[NUM_TFD_CHUNKS]; |
| 380 | } __attribute__ ((packed)); | 366 | } __attribute__ ((packed)); |
| 381 | 367 | ||
| 382 | struct txrx_control_flags | 368 | struct txrx_control_flags { |
| 383 | { | ||
| 384 | u8 message_type; | 369 | u8 message_type; |
| 385 | u8 rx_seq_num; | 370 | u8 rx_seq_num; |
| 386 | u8 control_bits; | 371 | u8 control_bits; |
| @@ -390,17 +375,16 @@ struct txrx_control_flags | |||
| 390 | #define TFD_SIZE 128 | 375 | #define TFD_SIZE 128 |
| 391 | #define TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH (TFD_SIZE - sizeof(struct txrx_control_flags)) | 376 | #define TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH (TFD_SIZE - sizeof(struct txrx_control_flags)) |
| 392 | 377 | ||
| 393 | struct tfd_frame | 378 | struct tfd_frame { |
| 394 | { | ||
| 395 | struct txrx_control_flags control_flags; | 379 | struct txrx_control_flags control_flags; |
| 396 | union { | 380 | union { |
| 397 | struct tfd_data data; | 381 | struct tfd_data data; |
| 398 | struct tfd_command cmd; | 382 | struct tfd_command cmd; |
| 399 | u8 raw[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; | 383 | u8 raw[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; |
| 400 | } u; | 384 | } u; |
| 401 | } __attribute__ ((packed)) ; | 385 | } __attribute__ ((packed)); |
| 402 | 386 | ||
| 403 | typedef void destructor_func(const void*); | 387 | typedef void destructor_func(const void *); |
| 404 | 388 | ||
| 405 | /** | 389 | /** |
| 406 | * Tx Queue for DMA. Queue consists of circular buffer of | 390 | * Tx Queue for DMA. Queue consists of circular buffer of |
| @@ -408,7 +392,7 @@ typedef void destructor_func(const void*); | |||
| 408 | */ | 392 | */ |
| 409 | struct clx2_tx_queue { | 393 | struct clx2_tx_queue { |
| 410 | struct clx2_queue q; | 394 | struct clx2_queue q; |
| 411 | struct tfd_frame* bd; | 395 | struct tfd_frame *bd; |
| 412 | struct ieee80211_txb **txb; | 396 | struct ieee80211_txb **txb; |
| 413 | }; | 397 | }; |
| 414 | 398 | ||
| @@ -423,8 +407,7 @@ struct clx2_tx_queue { | |||
| 423 | #define SUP_RATE_11G_MAX_NUM_CHANNELS (12) | 407 | #define SUP_RATE_11G_MAX_NUM_CHANNELS (12) |
| 424 | 408 | ||
| 425 | // Used for passing to driver number of successes and failures per rate | 409 | // Used for passing to driver number of successes and failures per rate |
| 426 | struct rate_histogram | 410 | struct rate_histogram { |
| 427 | { | ||
| 428 | union { | 411 | union { |
| 429 | u32 a[SUP_RATE_11A_MAX_NUM_CHANNELS]; | 412 | u32 a[SUP_RATE_11A_MAX_NUM_CHANNELS]; |
| 430 | u32 b[SUP_RATE_11B_MAX_NUM_CHANNELS]; | 413 | u32 b[SUP_RATE_11B_MAX_NUM_CHANNELS]; |
| @@ -475,12 +458,12 @@ struct notif_scan_complete { | |||
| 475 | u8 num_channels; | 458 | u8 num_channels; |
| 476 | u8 status; | 459 | u8 status; |
| 477 | u8 reserved; | 460 | u8 reserved; |
| 478 | } __attribute__ ((packed)); | 461 | } __attribute__ ((packed)); |
| 479 | 462 | ||
| 480 | struct notif_frag_length { | 463 | struct notif_frag_length { |
| 481 | u16 frag_length; | 464 | u16 frag_length; |
| 482 | u16 reserved; | 465 | u16 reserved; |
| 483 | } __attribute__ ((packed)); | 466 | } __attribute__ ((packed)); |
| 484 | 467 | ||
| 485 | struct notif_beacon_state { | 468 | struct notif_beacon_state { |
| 486 | u32 state; | 469 | u32 state; |
| @@ -543,11 +526,11 @@ struct ipw_rx_notification { | |||
| 543 | 526 | ||
| 544 | struct ipw_rx_frame { | 527 | struct ipw_rx_frame { |
| 545 | u32 reserved1; | 528 | u32 reserved1; |
| 546 | u8 parent_tsf[4]; // fw_use[0] is boolean for OUR_TSF_IS_GREATER | 529 | u8 parent_tsf[4]; // fw_use[0] is boolean for OUR_TSF_IS_GREATER |
| 547 | u8 received_channel; // The channel that this frame was received on. | 530 | u8 received_channel; // The channel that this frame was received on. |
| 548 | // Note that for .11b this does not have to be | 531 | // Note that for .11b this does not have to be |
| 549 | // the same as the channel that it was sent. | 532 | // the same as the channel that it was sent. |
| 550 | // Filled by LMAC | 533 | // Filled by LMAC |
| 551 | u8 frameStatus; | 534 | u8 frameStatus; |
| 552 | u8 rate; | 535 | u8 rate; |
| 553 | u8 rssi; | 536 | u8 rssi; |
| @@ -556,10 +539,10 @@ struct ipw_rx_frame { | |||
| 556 | u16 signal; | 539 | u16 signal; |
| 557 | u16 noise; | 540 | u16 noise; |
| 558 | u8 antennaAndPhy; | 541 | u8 antennaAndPhy; |
| 559 | u8 control; // control bit should be on in bg | 542 | u8 control; // control bit should be on in bg |
| 560 | u8 rtscts_rate; // rate of rts or cts (in rts cts sequence rate | 543 | u8 rtscts_rate; // rate of rts or cts (in rts cts sequence rate |
| 561 | // is identical) | 544 | // is identical) |
| 562 | u8 rtscts_seen; // 0x1 RTS seen ; 0x2 CTS seen | 545 | u8 rtscts_seen; // 0x1 RTS seen ; 0x2 CTS seen |
| 563 | u16 length; | 546 | u16 length; |
| 564 | u8 data[0]; | 547 | u8 data[0]; |
| 565 | } __attribute__ ((packed)); | 548 | } __attribute__ ((packed)); |
| @@ -571,8 +554,7 @@ struct ipw_rx_header { | |||
| 571 | u8 reserved; | 554 | u8 reserved; |
| 572 | } __attribute__ ((packed)); | 555 | } __attribute__ ((packed)); |
| 573 | 556 | ||
| 574 | struct ipw_rx_packet | 557 | struct ipw_rx_packet { |
| 575 | { | ||
| 576 | struct ipw_rx_header header; | 558 | struct ipw_rx_header header; |
| 577 | union { | 559 | union { |
| 578 | struct ipw_rx_frame frame; | 560 | struct ipw_rx_frame frame; |
| @@ -589,21 +571,20 @@ struct ipw_rx_mem_buffer { | |||
| 589 | struct ipw_rx_buffer *rxb; | 571 | struct ipw_rx_buffer *rxb; |
| 590 | struct sk_buff *skb; | 572 | struct sk_buff *skb; |
| 591 | struct list_head list; | 573 | struct list_head list; |
| 592 | }; /* Not transferred over network, so not __attribute__ ((packed)) */ | 574 | }; /* Not transferred over network, so not __attribute__ ((packed)) */ |
| 593 | 575 | ||
| 594 | struct ipw_rx_queue { | 576 | struct ipw_rx_queue { |
| 595 | struct ipw_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS]; | 577 | struct ipw_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS]; |
| 596 | struct ipw_rx_mem_buffer *queue[RX_QUEUE_SIZE]; | 578 | struct ipw_rx_mem_buffer *queue[RX_QUEUE_SIZE]; |
| 597 | u32 processed; /* Internal index to last handled Rx packet */ | 579 | u32 processed; /* Internal index to last handled Rx packet */ |
| 598 | u32 read; /* Shared index to newest available Rx buffer */ | 580 | u32 read; /* Shared index to newest available Rx buffer */ |
| 599 | u32 write; /* Shared index to oldest written Rx packet */ | 581 | u32 write; /* Shared index to oldest written Rx packet */ |
| 600 | u32 free_count;/* Number of pre-allocated buffers in rx_free */ | 582 | u32 free_count; /* Number of pre-allocated buffers in rx_free */ |
| 601 | /* Each of these lists is used as a FIFO for ipw_rx_mem_buffers */ | 583 | /* Each of these lists is used as a FIFO for ipw_rx_mem_buffers */ |
| 602 | struct list_head rx_free; /* Own an SKBs */ | 584 | struct list_head rx_free; /* Own an SKBs */ |
| 603 | struct list_head rx_used; /* No SKB allocated */ | 585 | struct list_head rx_used; /* No SKB allocated */ |
| 604 | spinlock_t lock; | 586 | spinlock_t lock; |
| 605 | }; /* Not transferred over network, so not __attribute__ ((packed)) */ | 587 | }; /* Not transferred over network, so not __attribute__ ((packed)) */ |
| 606 | |||
| 607 | 588 | ||
| 608 | struct alive_command_responce { | 589 | struct alive_command_responce { |
| 609 | u8 alive_command; | 590 | u8 alive_command; |
| @@ -627,8 +608,7 @@ struct ipw_rates { | |||
| 627 | u8 rates[IPW_MAX_RATES]; | 608 | u8 rates[IPW_MAX_RATES]; |
| 628 | } __attribute__ ((packed)); | 609 | } __attribute__ ((packed)); |
| 629 | 610 | ||
| 630 | struct command_block | 611 | struct command_block { |
| 631 | { | ||
| 632 | unsigned int control; | 612 | unsigned int control; |
| 633 | u32 source_addr; | 613 | u32 source_addr; |
| 634 | u32 dest_addr; | 614 | u32 dest_addr; |
| @@ -636,18 +616,16 @@ struct command_block | |||
| 636 | } __attribute__ ((packed)); | 616 | } __attribute__ ((packed)); |
| 637 | 617 | ||
| 638 | #define CB_NUMBER_OF_ELEMENTS_SMALL 64 | 618 | #define CB_NUMBER_OF_ELEMENTS_SMALL 64 |
| 639 | struct fw_image_desc | 619 | struct fw_image_desc { |
| 640 | { | ||
| 641 | unsigned long last_cb_index; | 620 | unsigned long last_cb_index; |
| 642 | unsigned long current_cb_index; | 621 | unsigned long current_cb_index; |
| 643 | struct command_block cb_list[CB_NUMBER_OF_ELEMENTS_SMALL]; | 622 | struct command_block cb_list[CB_NUMBER_OF_ELEMENTS_SMALL]; |
| 644 | void * v_addr; | 623 | void *v_addr; |
| 645 | unsigned long p_addr; | 624 | unsigned long p_addr; |
| 646 | unsigned long len; | 625 | unsigned long len; |
| 647 | }; | 626 | }; |
| 648 | 627 | ||
| 649 | struct ipw_sys_config | 628 | struct ipw_sys_config { |
| 650 | { | ||
| 651 | u8 bt_coexistence; | 629 | u8 bt_coexistence; |
| 652 | u8 reserved1; | 630 | u8 reserved1; |
| 653 | u8 answer_broadcast_ssid_probe; | 631 | u8 answer_broadcast_ssid_probe; |
| @@ -670,8 +648,7 @@ struct ipw_sys_config | |||
| 670 | u8 reserved3; | 648 | u8 reserved3; |
| 671 | } __attribute__ ((packed)); | 649 | } __attribute__ ((packed)); |
| 672 | 650 | ||
| 673 | struct ipw_multicast_addr | 651 | struct ipw_multicast_addr { |
| 674 | { | ||
| 675 | u8 num_of_multicast_addresses; | 652 | u8 num_of_multicast_addresses; |
| 676 | u8 reserved[3]; | 653 | u8 reserved[3]; |
| 677 | u8 mac1[6]; | 654 | u8 mac1[6]; |
| @@ -680,8 +657,7 @@ struct ipw_multicast_addr | |||
| 680 | u8 mac4[6]; | 657 | u8 mac4[6]; |
| 681 | } __attribute__ ((packed)); | 658 | } __attribute__ ((packed)); |
| 682 | 659 | ||
| 683 | struct ipw_wep_key | 660 | struct ipw_wep_key { |
| 684 | { | ||
| 685 | u8 cmd_id; | 661 | u8 cmd_id; |
| 686 | u8 seq_num; | 662 | u8 seq_num; |
| 687 | u8 key_index; | 663 | u8 key_index; |
| @@ -689,8 +665,7 @@ struct ipw_wep_key | |||
| 689 | u8 key[16]; | 665 | u8 key[16]; |
| 690 | } __attribute__ ((packed)); | 666 | } __attribute__ ((packed)); |
| 691 | 667 | ||
| 692 | struct ipw_tgi_tx_key | 668 | struct ipw_tgi_tx_key { |
| 693 | { | ||
| 694 | u8 key_id; | 669 | u8 key_id; |
| 695 | u8 security_type; | 670 | u8 security_type; |
| 696 | u8 station_index; | 671 | u8 station_index; |
| @@ -701,8 +676,7 @@ struct ipw_tgi_tx_key | |||
| 701 | 676 | ||
| 702 | #define IPW_SCAN_CHANNELS 54 | 677 | #define IPW_SCAN_CHANNELS 54 |
| 703 | 678 | ||
| 704 | struct ipw_scan_request | 679 | struct ipw_scan_request { |
| 705 | { | ||
| 706 | u8 scan_type; | 680 | u8 scan_type; |
| 707 | u16 dwell_time; | 681 | u16 dwell_time; |
| 708 | u8 channels_list[IPW_SCAN_CHANNELS]; | 682 | u8 channels_list[IPW_SCAN_CHANNELS]; |
| @@ -718,8 +692,7 @@ enum { | |||
| 718 | IPW_SCAN_TYPES | 692 | IPW_SCAN_TYPES |
| 719 | }; | 693 | }; |
| 720 | 694 | ||
| 721 | struct ipw_scan_request_ext | 695 | struct ipw_scan_request_ext { |
| 722 | { | ||
| 723 | u32 full_scan_index; | 696 | u32 full_scan_index; |
| 724 | u8 channels_list[IPW_SCAN_CHANNELS]; | 697 | u8 channels_list[IPW_SCAN_CHANNELS]; |
| 725 | u8 scan_type[IPW_SCAN_CHANNELS / 2]; | 698 | u8 scan_type[IPW_SCAN_CHANNELS / 2]; |
| @@ -740,19 +713,16 @@ extern inline void ipw_set_scan_type(struct ipw_scan_request_ext *scan, | |||
| 740 | { | 713 | { |
| 741 | if (index % 2) | 714 | if (index % 2) |
| 742 | scan->scan_type[index / 2] = | 715 | scan->scan_type[index / 2] = |
| 743 | (scan->scan_type[index / 2] & 0xF0) | | 716 | (scan->scan_type[index / 2] & 0xF0) | (scan_type & 0x0F); |
| 744 | (scan_type & 0x0F); | ||
| 745 | else | 717 | else |
| 746 | scan->scan_type[index / 2] = | 718 | scan->scan_type[index / 2] = |
| 747 | (scan->scan_type[index / 2] & 0x0F) | | 719 | (scan->scan_type[index / 2] & 0x0F) | |
| 748 | ((scan_type & 0x0F) << 4); | 720 | ((scan_type & 0x0F) << 4); |
| 749 | } | 721 | } |
| 750 | 722 | ||
| 751 | struct ipw_associate | 723 | struct ipw_associate { |
| 752 | { | ||
| 753 | u8 channel; | 724 | u8 channel; |
| 754 | u8 auth_type:4, | 725 | u8 auth_type:4, auth_key:4; |
| 755 | auth_key:4; | ||
| 756 | u8 assoc_type; | 726 | u8 assoc_type; |
| 757 | u8 reserved; | 727 | u8 reserved; |
| 758 | u16 policy_support; | 728 | u16 policy_support; |
| @@ -771,8 +741,7 @@ struct ipw_associate | |||
| 771 | u16 reserved2; | 741 | u16 reserved2; |
| 772 | } __attribute__ ((packed)); | 742 | } __attribute__ ((packed)); |
| 773 | 743 | ||
| 774 | struct ipw_supported_rates | 744 | struct ipw_supported_rates { |
| 775 | { | ||
| 776 | u8 ieee_mode; | 745 | u8 ieee_mode; |
| 777 | u8 num_rates; | 746 | u8 num_rates; |
| 778 | u8 purpose; | 747 | u8 purpose; |
| @@ -780,42 +749,36 @@ struct ipw_supported_rates | |||
| 780 | u8 supported_rates[IPW_MAX_RATES]; | 749 | u8 supported_rates[IPW_MAX_RATES]; |
| 781 | } __attribute__ ((packed)); | 750 | } __attribute__ ((packed)); |
| 782 | 751 | ||
| 783 | struct ipw_rts_threshold | 752 | struct ipw_rts_threshold { |
| 784 | { | ||
| 785 | u16 rts_threshold; | 753 | u16 rts_threshold; |
| 786 | u16 reserved; | 754 | u16 reserved; |
| 787 | } __attribute__ ((packed)); | 755 | } __attribute__ ((packed)); |
| 788 | 756 | ||
| 789 | struct ipw_frag_threshold | 757 | struct ipw_frag_threshold { |
| 790 | { | ||
| 791 | u16 frag_threshold; | 758 | u16 frag_threshold; |
| 792 | u16 reserved; | 759 | u16 reserved; |
| 793 | } __attribute__ ((packed)); | 760 | } __attribute__ ((packed)); |
| 794 | 761 | ||
| 795 | struct ipw_retry_limit | 762 | struct ipw_retry_limit { |
| 796 | { | ||
| 797 | u8 short_retry_limit; | 763 | u8 short_retry_limit; |
| 798 | u8 long_retry_limit; | 764 | u8 long_retry_limit; |
| 799 | u16 reserved; | 765 | u16 reserved; |
| 800 | } __attribute__ ((packed)); | 766 | } __attribute__ ((packed)); |
| 801 | 767 | ||
| 802 | struct ipw_dino_config | 768 | struct ipw_dino_config { |
| 803 | { | ||
| 804 | u32 dino_config_addr; | 769 | u32 dino_config_addr; |
| 805 | u16 dino_config_size; | 770 | u16 dino_config_size; |
| 806 | u8 dino_response; | 771 | u8 dino_response; |
| 807 | u8 reserved; | 772 | u8 reserved; |
| 808 | } __attribute__ ((packed)); | 773 | } __attribute__ ((packed)); |
| 809 | 774 | ||
| 810 | struct ipw_aironet_info | 775 | struct ipw_aironet_info { |
| 811 | { | ||
| 812 | u8 id; | 776 | u8 id; |
| 813 | u8 length; | 777 | u8 length; |
| 814 | u16 reserved; | 778 | u16 reserved; |
| 815 | } __attribute__ ((packed)); | 779 | } __attribute__ ((packed)); |
| 816 | 780 | ||
| 817 | struct ipw_rx_key | 781 | struct ipw_rx_key { |
| 818 | { | ||
| 819 | u8 station_index; | 782 | u8 station_index; |
| 820 | u8 key_type; | 783 | u8 key_type; |
| 821 | u8 key_id; | 784 | u8 key_id; |
| @@ -826,23 +789,20 @@ struct ipw_rx_key | |||
| 826 | u8 reserved; | 789 | u8 reserved; |
| 827 | } __attribute__ ((packed)); | 790 | } __attribute__ ((packed)); |
| 828 | 791 | ||
| 829 | struct ipw_country_channel_info | 792 | struct ipw_country_channel_info { |
| 830 | { | ||
| 831 | u8 first_channel; | 793 | u8 first_channel; |
| 832 | u8 no_channels; | 794 | u8 no_channels; |
| 833 | s8 max_tx_power; | 795 | s8 max_tx_power; |
| 834 | } __attribute__ ((packed)); | 796 | } __attribute__ ((packed)); |
| 835 | 797 | ||
| 836 | struct ipw_country_info | 798 | struct ipw_country_info { |
| 837 | { | ||
| 838 | u8 id; | 799 | u8 id; |
| 839 | u8 length; | 800 | u8 length; |
| 840 | u8 country_str[3]; | 801 | u8 country_str[3]; |
| 841 | struct ipw_country_channel_info groups[7]; | 802 | struct ipw_country_channel_info groups[7]; |
| 842 | } __attribute__ ((packed)); | 803 | } __attribute__ ((packed)); |
| 843 | 804 | ||
| 844 | struct ipw_channel_tx_power | 805 | struct ipw_channel_tx_power { |
| 845 | { | ||
| 846 | u8 channel_number; | 806 | u8 channel_number; |
| 847 | s8 tx_power; | 807 | s8 tx_power; |
| 848 | } __attribute__ ((packed)); | 808 | } __attribute__ ((packed)); |
| @@ -852,15 +812,13 @@ struct ipw_channel_tx_power | |||
| 852 | #define MAX_A_CHANNELS 37 | 812 | #define MAX_A_CHANNELS 37 |
| 853 | #define MAX_B_CHANNELS 14 | 813 | #define MAX_B_CHANNELS 14 |
| 854 | 814 | ||
| 855 | struct ipw_tx_power | 815 | struct ipw_tx_power { |
| 856 | { | ||
| 857 | u8 num_channels; | 816 | u8 num_channels; |
| 858 | u8 ieee_mode; | 817 | u8 ieee_mode; |
| 859 | struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS]; | 818 | struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS]; |
| 860 | } __attribute__ ((packed)); | 819 | } __attribute__ ((packed)); |
| 861 | 820 | ||
| 862 | struct ipw_qos_parameters | 821 | struct ipw_qos_parameters { |
| 863 | { | ||
| 864 | u16 cw_min[4]; | 822 | u16 cw_min[4]; |
| 865 | u16 cw_max[4]; | 823 | u16 cw_max[4]; |
| 866 | u8 aifs[4]; | 824 | u8 aifs[4]; |
| @@ -868,15 +826,13 @@ struct ipw_qos_parameters | |||
| 868 | u16 tx_op_limit[4]; | 826 | u16 tx_op_limit[4]; |
| 869 | } __attribute__ ((packed)); | 827 | } __attribute__ ((packed)); |
| 870 | 828 | ||
| 871 | struct ipw_rsn_capabilities | 829 | struct ipw_rsn_capabilities { |
| 872 | { | ||
| 873 | u8 id; | 830 | u8 id; |
| 874 | u8 length; | 831 | u8 length; |
| 875 | u16 version; | 832 | u16 version; |
| 876 | } __attribute__ ((packed)); | 833 | } __attribute__ ((packed)); |
| 877 | 834 | ||
| 878 | struct ipw_sensitivity_calib | 835 | struct ipw_sensitivity_calib { |
| 879 | { | ||
| 880 | u16 beacon_rssi_raw; | 836 | u16 beacon_rssi_raw; |
| 881 | u16 reserved; | 837 | u16 reserved; |
| 882 | } __attribute__ ((packed)); | 838 | } __attribute__ ((packed)); |
| @@ -895,10 +851,11 @@ struct ipw_sensitivity_calib | |||
| 895 | * - \a param filled with status parameters. | 851 | * - \a param filled with status parameters. |
| 896 | */ | 852 | */ |
| 897 | struct ipw_cmd { | 853 | struct ipw_cmd { |
| 898 | u32 cmd; /**< Host command */ | 854 | u32 cmd; /**< Host command */ |
| 899 | u32 status; /**< Status */ | 855 | u32 status;/**< Status */ |
| 900 | u32 status_len; /**< How many 32 bit parameters in the status */ | 856 | u32 status_len; |
| 901 | u32 len; /**< incoming parameters length, bytes */ | 857 | /**< How many 32 bit parameters in the status */ |
| 858 | u32 len; /**< incoming parameters length, bytes */ | ||
| 902 | /** | 859 | /** |
| 903 | * command parameters. | 860 | * command parameters. |
| 904 | * There should be enough space for incoming and | 861 | * There should be enough space for incoming and |
| @@ -906,10 +863,10 @@ struct ipw_cmd { | |||
| 906 | * Incoming parameters listed 1-st, followed by outcoming params. | 863 | * Incoming parameters listed 1-st, followed by outcoming params. |
| 907 | * nParams=(len+3)/4+status_len | 864 | * nParams=(len+3)/4+status_len |
| 908 | */ | 865 | */ |
| 909 | u32 param[0]; | 866 | u32 param[0]; |
| 910 | } __attribute__ ((packed)); | 867 | } __attribute__ ((packed)); |
| 911 | 868 | ||
| 912 | #define STATUS_HCMD_ACTIVE (1<<0) /**< host command in progress */ | 869 | #define STATUS_HCMD_ACTIVE (1<<0) /**< host command in progress */ |
| 913 | 870 | ||
| 914 | #define STATUS_INT_ENABLED (1<<1) | 871 | #define STATUS_INT_ENABLED (1<<1) |
| 915 | #define STATUS_RF_KILL_HW (1<<2) | 872 | #define STATUS_RF_KILL_HW (1<<2) |
| @@ -932,15 +889,15 @@ struct ipw_cmd { | |||
| 932 | #define STATUS_SCANNING (1<<21) | 889 | #define STATUS_SCANNING (1<<21) |
| 933 | #define STATUS_SCAN_ABORTING (1<<22) | 890 | #define STATUS_SCAN_ABORTING (1<<22) |
| 934 | 891 | ||
| 935 | #define STATUS_INDIRECT_BYTE (1<<28) /* sysfs entry configured for access */ | 892 | #define STATUS_INDIRECT_BYTE (1<<28) /* sysfs entry configured for access */ |
| 936 | #define STATUS_INDIRECT_DWORD (1<<29) /* sysfs entry configured for access */ | 893 | #define STATUS_INDIRECT_DWORD (1<<29) /* sysfs entry configured for access */ |
| 937 | #define STATUS_DIRECT_DWORD (1<<30) /* sysfs entry configured for access */ | 894 | #define STATUS_DIRECT_DWORD (1<<30) /* sysfs entry configured for access */ |
| 938 | 895 | ||
| 939 | #define STATUS_SECURITY_UPDATED (1<<31) /* Security sync needed */ | 896 | #define STATUS_SECURITY_UPDATED (1<<31) /* Security sync needed */ |
| 940 | 897 | ||
| 941 | #define CFG_STATIC_CHANNEL (1<<0) /* Restrict assoc. to single channel */ | 898 | #define CFG_STATIC_CHANNEL (1<<0) /* Restrict assoc. to single channel */ |
| 942 | #define CFG_STATIC_ESSID (1<<1) /* Restrict assoc. to single SSID */ | 899 | #define CFG_STATIC_ESSID (1<<1) /* Restrict assoc. to single SSID */ |
| 943 | #define CFG_STATIC_BSSID (1<<2) /* Restrict assoc. to single BSSID */ | 900 | #define CFG_STATIC_BSSID (1<<2) /* Restrict assoc. to single BSSID */ |
| 944 | #define CFG_CUSTOM_MAC (1<<3) | 901 | #define CFG_CUSTOM_MAC (1<<3) |
| 945 | #define CFG_PREAMBLE (1<<4) | 902 | #define CFG_PREAMBLE (1<<4) |
| 946 | #define CFG_ADHOC_PERSIST (1<<5) | 903 | #define CFG_ADHOC_PERSIST (1<<5) |
| @@ -948,8 +905,8 @@ struct ipw_cmd { | |||
| 948 | #define CFG_FIXED_RATE (1<<7) | 905 | #define CFG_FIXED_RATE (1<<7) |
| 949 | #define CFG_ADHOC_CREATE (1<<8) | 906 | #define CFG_ADHOC_CREATE (1<<8) |
| 950 | 907 | ||
| 951 | #define CAP_SHARED_KEY (1<<0) /* Off = OPEN */ | 908 | #define CAP_SHARED_KEY (1<<0) /* Off = OPEN */ |
| 952 | #define CAP_PRIVACY_ON (1<<1) /* Off = No privacy */ | 909 | #define CAP_PRIVACY_ON (1<<1) /* Off = No privacy */ |
| 953 | 910 | ||
| 954 | #define MAX_STATIONS 32 | 911 | #define MAX_STATIONS 32 |
| 955 | #define IPW_INVALID_STATION (0xff) | 912 | #define IPW_INVALID_STATION (0xff) |
| @@ -989,8 +946,8 @@ struct ipw_priv { | |||
| 989 | /* result of ucode download */ | 946 | /* result of ucode download */ |
| 990 | struct alive_command_responce dino_alive; | 947 | struct alive_command_responce dino_alive; |
| 991 | 948 | ||
| 992 | wait_queue_head_t wait_command_queue; | 949 | wait_queue_head_t wait_command_queue; |
| 993 | wait_queue_head_t wait_state; | 950 | wait_queue_head_t wait_state; |
| 994 | 951 | ||
| 995 | /* Rx and Tx DMA processing queues */ | 952 | /* Rx and Tx DMA processing queues */ |
| 996 | struct ipw_rx_queue *rxq; | 953 | struct ipw_rx_queue *rxq; |
| @@ -1006,9 +963,9 @@ struct ipw_priv { | |||
| 1006 | struct average average_rssi; | 963 | struct average average_rssi; |
| 1007 | struct average average_noise; | 964 | struct average average_noise; |
| 1008 | u32 port_type; | 965 | u32 port_type; |
| 1009 | int rx_bufs_min; /**< minimum number of bufs in Rx queue */ | 966 | int rx_bufs_min; /**< minimum number of bufs in Rx queue */ |
| 1010 | int rx_pend_max; /**< maximum pending buffers for one IRQ */ | 967 | int rx_pend_max; /**< maximum pending buffers for one IRQ */ |
| 1011 | u32 hcmd_seq; /**< sequence number for hcmd */ | 968 | u32 hcmd_seq; /**< sequence number for hcmd */ |
| 1012 | u32 missed_beacon_threshold; | 969 | u32 missed_beacon_threshold; |
| 1013 | u32 roaming_threshold; | 970 | u32 roaming_threshold; |
| 1014 | 971 | ||
| @@ -1017,17 +974,17 @@ struct ipw_priv { | |||
| 1017 | 974 | ||
| 1018 | unsigned long ts_scan_abort; | 975 | unsigned long ts_scan_abort; |
| 1019 | struct ipw_supported_rates rates; | 976 | struct ipw_supported_rates rates; |
| 1020 | struct ipw_rates phy[3]; /**< PHY restrictions, per band */ | 977 | struct ipw_rates phy[3]; /**< PHY restrictions, per band */ |
| 1021 | struct ipw_rates supp; /**< software defined */ | 978 | struct ipw_rates supp; /**< software defined */ |
| 1022 | struct ipw_rates extended; /**< use for corresp. IE, AP only */ | 979 | struct ipw_rates extended; /**< use for corresp. IE, AP only */ |
| 1023 | 980 | ||
| 1024 | struct notif_link_deterioration last_link_deterioration; /** for statistics */ | 981 | struct notif_link_deterioration last_link_deterioration; /** for statistics */ |
| 1025 | struct ipw_cmd* hcmd; /**< host command currently executed */ | 982 | struct ipw_cmd *hcmd; /**< host command currently executed */ |
| 1026 | 983 | ||
| 1027 | wait_queue_head_t hcmd_wq; /**< host command waits for execution */ | 984 | wait_queue_head_t hcmd_wq; /**< host command waits for execution */ |
| 1028 | u32 tsf_bcn[2]; /**< TSF from latest beacon */ | 985 | u32 tsf_bcn[2]; /**< TSF from latest beacon */ |
| 1029 | 986 | ||
| 1030 | struct notif_calibration calib; /**< last calibration */ | 987 | struct notif_calibration calib; /**< last calibration */ |
| 1031 | 988 | ||
| 1032 | /* ordinal interface with firmware */ | 989 | /* ordinal interface with firmware */ |
| 1033 | u32 table0_addr; | 990 | u32 table0_addr; |
| @@ -1067,8 +1024,8 @@ struct ipw_priv { | |||
| 1067 | u32 tx_packets; | 1024 | u32 tx_packets; |
| 1068 | u32 quality; | 1025 | u32 quality; |
| 1069 | 1026 | ||
| 1070 | /* eeprom */ | 1027 | /* eeprom */ |
| 1071 | u8 eeprom[0x100]; /* 256 bytes of eeprom */ | 1028 | u8 eeprom[0x100]; /* 256 bytes of eeprom */ |
| 1072 | int eeprom_delay; | 1029 | int eeprom_delay; |
| 1073 | 1030 | ||
| 1074 | struct iw_statistics wstats; | 1031 | struct iw_statistics wstats; |
| @@ -1091,7 +1048,6 @@ struct ipw_priv { | |||
| 1091 | 1048 | ||
| 1092 | struct tasklet_struct irq_tasklet; | 1049 | struct tasklet_struct irq_tasklet; |
| 1093 | 1050 | ||
| 1094 | |||
| 1095 | #define IPW_2200BG 1 | 1051 | #define IPW_2200BG 1 |
| 1096 | #define IPW_2915ABG 2 | 1052 | #define IPW_2915ABG 2 |
| 1097 | u8 adapter; | 1053 | u8 adapter; |
| @@ -1114,7 +1070,6 @@ struct ipw_priv { | |||
| 1114 | u32 indirect_byte; | 1070 | u32 indirect_byte; |
| 1115 | }; /*ipw_priv */ | 1071 | }; /*ipw_priv */ |
| 1116 | 1072 | ||
| 1117 | |||
| 1118 | /* debug macros */ | 1073 | /* debug macros */ |
| 1119 | 1074 | ||
| 1120 | #ifdef CONFIG_IPW_DEBUG | 1075 | #ifdef CONFIG_IPW_DEBUG |
| @@ -1170,7 +1125,6 @@ do { if (ipw_debug_level & (level)) \ | |||
| 1170 | #define IPW_DL_RF_KILL (1<<17) | 1125 | #define IPW_DL_RF_KILL (1<<17) |
| 1171 | #define IPW_DL_FW_ERRORS (1<<18) | 1126 | #define IPW_DL_FW_ERRORS (1<<18) |
| 1172 | 1127 | ||
| 1173 | |||
| 1174 | #define IPW_DL_ORD (1<<20) | 1128 | #define IPW_DL_ORD (1<<20) |
| 1175 | 1129 | ||
| 1176 | #define IPW_DL_FRAG (1<<21) | 1130 | #define IPW_DL_FRAG (1<<21) |
| @@ -1184,7 +1138,6 @@ do { if (ipw_debug_level & (level)) \ | |||
| 1184 | 1138 | ||
| 1185 | #define IPW_DL_STATS (1<<29) | 1139 | #define IPW_DL_STATS (1<<29) |
| 1186 | 1140 | ||
| 1187 | |||
| 1188 | #define IPW_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a) | 1141 | #define IPW_ERROR(f, a...) printk(KERN_ERR DRV_NAME ": " f, ## a) |
| 1189 | #define IPW_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a) | 1142 | #define IPW_WARNING(f, a...) printk(KERN_WARNING DRV_NAME ": " f, ## a) |
| 1190 | #define IPW_DEBUG_INFO(f, a...) IPW_DEBUG(IPW_DL_INFO, f, ## a) | 1143 | #define IPW_DEBUG_INFO(f, a...) IPW_DEBUG(IPW_DL_INFO, f, ## a) |
| @@ -1253,12 +1206,12 @@ do { if (ipw_debug_level & (level)) \ | |||
| 1253 | /* | 1206 | /* |
| 1254 | * RESET Register Bit Indexes | 1207 | * RESET Register Bit Indexes |
| 1255 | */ | 1208 | */ |
| 1256 | #define CBD_RESET_REG_PRINCETON_RESET 0x00000001 /* Bit 0 (LSB) */ | 1209 | #define CBD_RESET_REG_PRINCETON_RESET 0x00000001 /* Bit 0 (LSB) */ |
| 1257 | #define CX2_RESET_REG_SW_RESET 0x00000080 /* Bit 7 */ | 1210 | #define CX2_RESET_REG_SW_RESET 0x00000080 /* Bit 7 */ |
| 1258 | #define CX2_RESET_REG_MASTER_DISABLED 0x00000100 /* Bit 8 */ | 1211 | #define CX2_RESET_REG_MASTER_DISABLED 0x00000100 /* Bit 8 */ |
| 1259 | #define CX2_RESET_REG_STOP_MASTER 0x00000200 /* Bit 9 */ | 1212 | #define CX2_RESET_REG_STOP_MASTER 0x00000200 /* Bit 9 */ |
| 1260 | #define CX2_ARC_KESHET_CONFIG 0x08000000 /* Bit 27 */ | 1213 | #define CX2_ARC_KESHET_CONFIG 0x08000000 /* Bit 27 */ |
| 1261 | #define CX2_START_STANDBY 0x00000004 /* Bit 2 */ | 1214 | #define CX2_START_STANDBY 0x00000004 /* Bit 2 */ |
| 1262 | 1215 | ||
| 1263 | #define CX2_CSR_CIS_UPPER_BOUND 0x00000200 | 1216 | #define CX2_CSR_CIS_UPPER_BOUND 0x00000200 |
| 1264 | #define CX2_DOMAIN_0_END 0x1000 | 1217 | #define CX2_DOMAIN_0_END 0x1000 |
| @@ -1289,14 +1242,12 @@ do { if (ipw_debug_level & (level)) \ | |||
| 1289 | #define CB_SRC_SIZE_LONG 0x00200000 | 1242 | #define CB_SRC_SIZE_LONG 0x00200000 |
| 1290 | #define CB_DEST_SIZE_LONG 0x00020000 | 1243 | #define CB_DEST_SIZE_LONG 0x00020000 |
| 1291 | 1244 | ||
| 1292 | |||
| 1293 | /* DMA DEFINES */ | 1245 | /* DMA DEFINES */ |
| 1294 | 1246 | ||
| 1295 | #define DMA_CONTROL_SMALL_CB_CONST_VALUE 0x00540000 | 1247 | #define DMA_CONTROL_SMALL_CB_CONST_VALUE 0x00540000 |
| 1296 | #define DMA_CB_STOP_AND_ABORT 0x00000C00 | 1248 | #define DMA_CB_STOP_AND_ABORT 0x00000C00 |
| 1297 | #define DMA_CB_START 0x00000100 | 1249 | #define DMA_CB_START 0x00000100 |
| 1298 | 1250 | ||
| 1299 | |||
| 1300 | #define CX2_SHARED_SRAM_SIZE 0x00030000 | 1251 | #define CX2_SHARED_SRAM_SIZE 0x00030000 |
| 1301 | #define CX2_SHARED_SRAM_DMA_CONTROL 0x00027000 | 1252 | #define CX2_SHARED_SRAM_DMA_CONTROL 0x00027000 |
| 1302 | #define CB_MAX_LENGTH 0x1FFF | 1253 | #define CB_MAX_LENGTH 0x1FFF |
| @@ -1304,7 +1255,6 @@ do { if (ipw_debug_level & (level)) \ | |||
| 1304 | #define CX2_HOST_EEPROM_DATA_SRAM_SIZE 0xA18 | 1255 | #define CX2_HOST_EEPROM_DATA_SRAM_SIZE 0xA18 |
| 1305 | #define CX2_EEPROM_IMAGE_SIZE 0x100 | 1256 | #define CX2_EEPROM_IMAGE_SIZE 0x100 |
| 1306 | 1257 | ||
| 1307 | |||
| 1308 | /* DMA defs */ | 1258 | /* DMA defs */ |
| 1309 | #define CX2_DMA_I_CURRENT_CB 0x003000D0 | 1259 | #define CX2_DMA_I_CURRENT_CB 0x003000D0 |
| 1310 | #define CX2_DMA_O_CURRENT_CB 0x003000D4 | 1260 | #define CX2_DMA_O_CURRENT_CB 0x003000D4 |
| @@ -1356,7 +1306,6 @@ do { if (ipw_debug_level & (level)) \ | |||
| 1356 | #define IPW_WHO_IS_AWAKE (CX2_SHARED_LOWER_BOUND + 0xB14) | 1306 | #define IPW_WHO_IS_AWAKE (CX2_SHARED_LOWER_BOUND + 0xB14) |
| 1357 | #define IPW_DURING_ATIM_WINDOW (CX2_SHARED_LOWER_BOUND + 0xB18) | 1307 | #define IPW_DURING_ATIM_WINDOW (CX2_SHARED_LOWER_BOUND + 0xB18) |
| 1358 | 1308 | ||
| 1359 | |||
| 1360 | #define MSB 1 | 1309 | #define MSB 1 |
| 1361 | #define LSB 0 | 1310 | #define LSB 0 |
| 1362 | #define WORD_TO_BYTE(_word) ((_word) * sizeof(u16)) | 1311 | #define WORD_TO_BYTE(_word) ((_word) * sizeof(u16)) |
| @@ -1365,16 +1314,16 @@ do { if (ipw_debug_level & (level)) \ | |||
| 1365 | ( WORD_TO_BYTE(_wordoffset) + (_byteoffset) ) | 1314 | ( WORD_TO_BYTE(_wordoffset) + (_byteoffset) ) |
| 1366 | 1315 | ||
| 1367 | /* EEPROM access by BYTE */ | 1316 | /* EEPROM access by BYTE */ |
| 1368 | #define EEPROM_PME_CAPABILITY (GET_EEPROM_ADDR(0x09,MSB)) /* 1 byte */ | 1317 | #define EEPROM_PME_CAPABILITY (GET_EEPROM_ADDR(0x09,MSB)) /* 1 byte */ |
| 1369 | #define EEPROM_MAC_ADDRESS (GET_EEPROM_ADDR(0x21,LSB)) /* 6 byte */ | 1318 | #define EEPROM_MAC_ADDRESS (GET_EEPROM_ADDR(0x21,LSB)) /* 6 byte */ |
| 1370 | #define EEPROM_VERSION (GET_EEPROM_ADDR(0x24,MSB)) /* 1 byte */ | 1319 | #define EEPROM_VERSION (GET_EEPROM_ADDR(0x24,MSB)) /* 1 byte */ |
| 1371 | #define EEPROM_NIC_TYPE (GET_EEPROM_ADDR(0x25,LSB)) /* 1 byte */ | 1320 | #define EEPROM_NIC_TYPE (GET_EEPROM_ADDR(0x25,LSB)) /* 1 byte */ |
| 1372 | #define EEPROM_SKU_CAPABILITY (GET_EEPROM_ADDR(0x25,MSB)) /* 1 byte */ | 1321 | #define EEPROM_SKU_CAPABILITY (GET_EEPROM_ADDR(0x25,MSB)) /* 1 byte */ |
| 1373 | #define EEPROM_COUNTRY_CODE (GET_EEPROM_ADDR(0x26,LSB)) /* 3 bytes */ | 1322 | #define EEPROM_COUNTRY_CODE (GET_EEPROM_ADDR(0x26,LSB)) /* 3 bytes */ |
| 1374 | #define EEPROM_IBSS_CHANNELS_BG (GET_EEPROM_ADDR(0x28,LSB)) /* 2 bytes */ | 1323 | #define EEPROM_IBSS_CHANNELS_BG (GET_EEPROM_ADDR(0x28,LSB)) /* 2 bytes */ |
| 1375 | #define EEPROM_IBSS_CHANNELS_A (GET_EEPROM_ADDR(0x29,MSB)) /* 5 bytes */ | 1324 | #define EEPROM_IBSS_CHANNELS_A (GET_EEPROM_ADDR(0x29,MSB)) /* 5 bytes */ |
| 1376 | #define EEPROM_BSS_CHANNELS_BG (GET_EEPROM_ADDR(0x2c,LSB)) /* 2 bytes */ | 1325 | #define EEPROM_BSS_CHANNELS_BG (GET_EEPROM_ADDR(0x2c,LSB)) /* 2 bytes */ |
| 1377 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ | 1326 | #define EEPROM_HW_VERSION (GET_EEPROM_ADDR(0x72,LSB)) /* 2 bytes */ |
| 1378 | 1327 | ||
| 1379 | /* NIC type as found in the one byte EEPROM_NIC_TYPE offset*/ | 1328 | /* NIC type as found in the one byte EEPROM_NIC_TYPE offset*/ |
| 1380 | #define EEPROM_NIC_TYPE_STANDARD 0 | 1329 | #define EEPROM_NIC_TYPE_STANDARD 0 |
| @@ -1479,7 +1428,6 @@ enum { | |||
| 1479 | #define IPW_RATE_CAPABILITIES 1 | 1428 | #define IPW_RATE_CAPABILITIES 1 |
| 1480 | #define IPW_RATE_CONNECT 0 | 1429 | #define IPW_RATE_CONNECT 0 |
| 1481 | 1430 | ||
| 1482 | |||
| 1483 | /* | 1431 | /* |
| 1484 | * Rate values and masks | 1432 | * Rate values and masks |
| 1485 | */ | 1433 | */ |
| @@ -1524,12 +1472,6 @@ enum { | |||
| 1524 | IPW_ORD_STAT_TX_DIR_DATA_B_11, | 1472 | IPW_ORD_STAT_TX_DIR_DATA_B_11, |
| 1525 | /* Hole */ | 1473 | /* Hole */ |
| 1526 | 1474 | ||
| 1527 | |||
| 1528 | |||
| 1529 | |||
| 1530 | |||
| 1531 | |||
| 1532 | |||
| 1533 | IPW_ORD_STAT_TX_DIR_DATA_G_1 = IPW_ORD_TABLE_0_MASK + 19, | 1475 | IPW_ORD_STAT_TX_DIR_DATA_G_1 = IPW_ORD_TABLE_0_MASK + 19, |
| 1534 | IPW_ORD_STAT_TX_DIR_DATA_G_2, | 1476 | IPW_ORD_STAT_TX_DIR_DATA_G_2, |
| 1535 | IPW_ORD_STAT_TX_DIR_DATA_G_5_5, | 1477 | IPW_ORD_STAT_TX_DIR_DATA_G_5_5, |
| @@ -1549,12 +1491,6 @@ enum { | |||
| 1549 | IPW_ORD_STAT_TX_NON_DIR_DATA_B_11, | 1491 | IPW_ORD_STAT_TX_NON_DIR_DATA_B_11, |
| 1550 | /* Hole */ | 1492 | /* Hole */ |
| 1551 | 1493 | ||
| 1552 | |||
| 1553 | |||
| 1554 | |||
| 1555 | |||
| 1556 | |||
| 1557 | |||
| 1558 | IPW_ORD_STAT_TX_NON_DIR_DATA_G_1 = IPW_ORD_TABLE_0_MASK + 44, | 1494 | IPW_ORD_STAT_TX_NON_DIR_DATA_G_1 = IPW_ORD_TABLE_0_MASK + 44, |
| 1559 | IPW_ORD_STAT_TX_NON_DIR_DATA_G_2, | 1495 | IPW_ORD_STAT_TX_NON_DIR_DATA_G_2, |
| 1560 | IPW_ORD_STAT_TX_NON_DIR_DATA_G_5_5, | 1496 | IPW_ORD_STAT_TX_NON_DIR_DATA_G_5_5, |
| @@ -1685,7 +1621,7 @@ struct host_cmd { | |||
| 1685 | #define CFG_BT_COEXISTENCE_WME_OVER_BT 0x08 | 1621 | #define CFG_BT_COEXISTENCE_WME_OVER_BT 0x08 |
| 1686 | #define CFG_BT_COEXISTENCE_OOB 0x10 | 1622 | #define CFG_BT_COEXISTENCE_OOB 0x10 |
| 1687 | #define CFG_BT_COEXISTENCE_MAX 0xFF | 1623 | #define CFG_BT_COEXISTENCE_MAX 0xFF |
| 1688 | #define CFG_BT_COEXISTENCE_DEF 0x80 /* read Bt from EEPROM*/ | 1624 | #define CFG_BT_COEXISTENCE_DEF 0x80 /* read Bt from EEPROM */ |
| 1689 | 1625 | ||
| 1690 | #define CFG_CTS_TO_ITSELF_ENABLED_MIN 0x0 | 1626 | #define CFG_CTS_TO_ITSELF_ENABLED_MIN 0x0 |
| 1691 | #define CFG_CTS_TO_ITSELF_ENABLED_MAX 0x1 | 1627 | #define CFG_CTS_TO_ITSELF_ENABLED_MAX 0x1 |
| @@ -1727,11 +1663,11 @@ static inline u32 frame_hdr_len(struct ieee80211_hdr *hdr) | |||
| 1727 | fc = le16_to_cpu(hdr->frame_ctl); | 1663 | fc = le16_to_cpu(hdr->frame_ctl); |
| 1728 | 1664 | ||
| 1729 | /* | 1665 | /* |
| 1730 | * Function ToDS FromDS | 1666 | * Function ToDS FromDS |
| 1731 | * IBSS 0 0 | 1667 | * IBSS 0 0 |
| 1732 | * To AP 1 0 | 1668 | * To AP 1 0 |
| 1733 | * From AP 0 1 | 1669 | * From AP 0 1 |
| 1734 | * WDS (bridge) 1 1 | 1670 | * WDS (bridge) 1 1 |
| 1735 | * | 1671 | * |
| 1736 | * Only WDS frames use Address4 among them. --YZ | 1672 | * Only WDS frames use Address4 among them. --YZ |
| 1737 | */ | 1673 | */ |
| @@ -1741,4 +1677,4 @@ static inline u32 frame_hdr_len(struct ieee80211_hdr *hdr) | |||
| 1741 | return retval; | 1677 | return retval; |
| 1742 | } | 1678 | } |
| 1743 | 1679 | ||
| 1744 | #endif /* __ipw2200_h__ */ | 1680 | #endif /* __ipw2200_h__ */ |
