aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/main.c
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2011-03-31 04:06:58 -0400
committerLuciano Coelho <coelho@ti.com>2011-04-19 09:49:18 -0400
commit0da13da767cd568c1fe2a7b5b936e86e521b5ae7 (patch)
tree7c629a516bb90567e60041b4273d4dd92395d0e8 /drivers/net/wireless/wl12xx/main.c
parentd29633b40e6afc6b4276a4e381bc532cc84be104 (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/main.c')
-rw-r--r--drivers/net/wireless/wl12xx/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
index 01205ea5e7e4..1cd396306e7b 100644
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
@@ -1017,6 +1017,8 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
1017 ret = wl1271_setup(wl); 1017 ret = wl1271_setup(wl);
1018 if (ret < 0) 1018 if (ret < 0)
1019 goto out; 1019 goto out;
1020 if (wl1271_set_block_size(wl))
1021 wl->quirks |= WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT;
1020 break; 1022 break;
1021 case CHIP_ID_1283_PG10: 1023 case CHIP_ID_1283_PG10:
1022 default: 1024 default:
@@ -1487,7 +1489,6 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl)
1487 memset(wl->ap_hlid_map, 0, sizeof(wl->ap_hlid_map)); 1489 memset(wl->ap_hlid_map, 0, sizeof(wl->ap_hlid_map));
1488 wl->ap_fw_ps_map = 0; 1490 wl->ap_fw_ps_map = 0;
1489 wl->ap_ps_map = 0; 1491 wl->ap_ps_map = 0;
1490 wl->block_size = 0;
1491 1492
1492 /* 1493 /*
1493 * this is performed after the cancel_work calls and the associated 1494 * this is performed after the cancel_work calls and the associated
@@ -3632,7 +3633,6 @@ struct ieee80211_hw *wl1271_alloc_hw(void)
3632 wl->ap_ps_map = 0; 3633 wl->ap_ps_map = 0;
3633 wl->ap_fw_ps_map = 0; 3634 wl->ap_fw_ps_map = 0;
3634 wl->quirks = 0; 3635 wl->quirks = 0;
3635 wl->block_size = 0;
3636 3636
3637 memset(wl->tx_frames_map, 0, sizeof(wl->tx_frames_map)); 3637 memset(wl->tx_frames_map, 0, sizeof(wl->tx_frames_map));
3638 for (i = 0; i < ACX_TX_DESCRIPTORS; i++) 3638 for (i = 0; i < ACX_TX_DESCRIPTORS; i++)