diff options
author | Ido Yariv <ido@wizery.com> | 2011-03-31 04:06:58 -0400 |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2011-04-19 09:49:18 -0400 |
commit | 0da13da767cd568c1fe2a7b5b936e86e521b5ae7 (patch) | |
tree | 7c629a516bb90567e60041b4273d4dd92395d0e8 /drivers/net/wireless/wl12xx/wl12xx.h | |
parent | d29633b40e6afc6b4276a4e381bc532cc84be104 (diff) |
wl12xx: Clean up the block size alignment code
Simplify and clean up the block size alignment code:
1. Set the block size according to the padding field type, as it cannot
exceed the maximum value this field can hold.
2. Move the alignment code into a function instead of duplicating it in
multiple places.
3. In the current implementation, the block_size member can be
misleading because a zero value actually means that there's no need to
align. Declare a block size alignment quirk instead.
Signed-off-by: Ido Yariv <ido@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl12xx.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index c12945958848..c7c42b687f5e 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -323,7 +323,7 @@ struct wl1271_if_operations { | |||
323 | struct device* (*dev)(struct wl1271 *wl); | 323 | struct device* (*dev)(struct wl1271 *wl); |
324 | void (*enable_irq)(struct wl1271 *wl); | 324 | void (*enable_irq)(struct wl1271 *wl); |
325 | void (*disable_irq)(struct wl1271 *wl); | 325 | void (*disable_irq)(struct wl1271 *wl); |
326 | void (*set_block_size) (struct wl1271 *wl); | 326 | void (*set_block_size) (struct wl1271 *wl, unsigned int blksz); |
327 | }; | 327 | }; |
328 | 328 | ||
329 | #define MAX_NUM_KEYS 14 | 329 | #define MAX_NUM_KEYS 14 |
@@ -558,7 +558,6 @@ struct wl1271 { | |||
558 | bool ba_support; | 558 | bool ba_support; |
559 | u8 ba_rx_bitmap; | 559 | u8 ba_rx_bitmap; |
560 | 560 | ||
561 | u32 block_size; | ||
562 | int tcxo_clock; | 561 | int tcxo_clock; |
563 | 562 | ||
564 | /* | 563 | /* |
@@ -610,12 +609,15 @@ int wl1271_plt_stop(struct wl1271 *wl); | |||
610 | /* Quirks */ | 609 | /* Quirks */ |
611 | 610 | ||
612 | /* Each RX/TX transaction requires an end-of-transaction transfer */ | 611 | /* Each RX/TX transaction requires an end-of-transaction transfer */ |
613 | #define WL12XX_QUIRK_END_OF_TRANSACTION BIT(0) | 612 | #define WL12XX_QUIRK_END_OF_TRANSACTION BIT(0) |
614 | 613 | ||
615 | /* | 614 | /* |
616 | * Older firmwares use 2 spare TX blocks | 615 | * Older firmwares use 2 spare TX blocks |
617 | * (for STA < 6.1.3.50.58 or for AP < 6.2.0.0.47) | 616 | * (for STA < 6.1.3.50.58 or for AP < 6.2.0.0.47) |
618 | */ | 617 | */ |
619 | #define WL12XX_QUIRK_USE_2_SPARE_BLOCKS BIT(1) | 618 | #define WL12XX_QUIRK_USE_2_SPARE_BLOCKS BIT(1) |
619 | |||
620 | /* WL128X requires aggregated packets to be aligned to the SDIO block size */ | ||
621 | #define WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT BIT(2) | ||
620 | 622 | ||
621 | #endif | 623 | #endif |