diff options
-rw-r--r-- | drivers/net/wireless/wl12xx/init.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/main.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/tx.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/wl12xx/wl12xx.h | 4 |
4 files changed, 12 insertions, 8 deletions
diff --git a/drivers/net/wireless/wl12xx/init.c b/drivers/net/wireless/wl12xx/init.c index 14ff01efc0b1..c413abd26d1c 100644 --- a/drivers/net/wireless/wl12xx/init.c +++ b/drivers/net/wireless/wl12xx/init.c | |||
@@ -501,7 +501,7 @@ int wl1271_chip_specific_init(struct wl1271 *wl) | |||
501 | if (wl->chip.id == CHIP_ID_1283_PG20) { | 501 | if (wl->chip.id == CHIP_ID_1283_PG20) { |
502 | u32 host_cfg_bitmap = HOST_IF_CFG_RX_FIFO_ENABLE; | 502 | u32 host_cfg_bitmap = HOST_IF_CFG_RX_FIFO_ENABLE; |
503 | 503 | ||
504 | if (wl->quirks & WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT) | 504 | if (!(wl->quirks & WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT)) |
505 | /* Enable SDIO padding */ | 505 | /* Enable SDIO padding */ |
506 | host_cfg_bitmap |= HOST_IF_CFG_TX_PAD_TO_SDIO_BLK; | 506 | host_cfg_bitmap |= HOST_IF_CFG_TX_PAD_TO_SDIO_BLK; |
507 | 507 | ||
diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c index 51d519f93d79..b9a3fe497274 100644 --- a/drivers/net/wireless/wl12xx/main.c +++ b/drivers/net/wireless/wl12xx/main.c | |||
@@ -1323,7 +1323,9 @@ static int wl1271_chip_wakeup(struct wl1271 *wl) | |||
1323 | ret = wl1271_setup(wl); | 1323 | ret = wl1271_setup(wl); |
1324 | if (ret < 0) | 1324 | if (ret < 0) |
1325 | goto out; | 1325 | goto out; |
1326 | wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT; | ||
1326 | break; | 1327 | break; |
1328 | |||
1327 | case CHIP_ID_1271_PG20: | 1329 | case CHIP_ID_1271_PG20: |
1328 | wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1271 PG20)", | 1330 | wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1271 PG20)", |
1329 | wl->chip.id); | 1331 | wl->chip.id); |
@@ -1331,7 +1333,9 @@ static int wl1271_chip_wakeup(struct wl1271 *wl) | |||
1331 | ret = wl1271_setup(wl); | 1333 | ret = wl1271_setup(wl); |
1332 | if (ret < 0) | 1334 | if (ret < 0) |
1333 | goto out; | 1335 | goto out; |
1336 | wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT; | ||
1334 | break; | 1337 | break; |
1338 | |||
1335 | case CHIP_ID_1283_PG20: | 1339 | case CHIP_ID_1283_PG20: |
1336 | wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1283 PG20)", | 1340 | wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1283 PG20)", |
1337 | wl->chip.id); | 1341 | wl->chip.id); |
@@ -1340,8 +1344,8 @@ static int wl1271_chip_wakeup(struct wl1271 *wl) | |||
1340 | if (ret < 0) | 1344 | if (ret < 0) |
1341 | goto out; | 1345 | goto out; |
1342 | 1346 | ||
1343 | if (wl1271_set_block_size(wl)) | 1347 | if (!wl1271_set_block_size(wl)) |
1344 | wl->quirks |= WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT; | 1348 | wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT; |
1345 | break; | 1349 | break; |
1346 | case CHIP_ID_1283_PG10: | 1350 | case CHIP_ID_1283_PG10: |
1347 | default: | 1351 | default: |
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c index 3a9d2a6b8a09..a07ee8201d6d 100644 --- a/drivers/net/wireless/wl12xx/tx.c +++ b/drivers/net/wireless/wl12xx/tx.c | |||
@@ -201,10 +201,10 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif, | |||
201 | static unsigned int wl12xx_calc_packet_alignment(struct wl1271 *wl, | 201 | static unsigned int wl12xx_calc_packet_alignment(struct wl1271 *wl, |
202 | unsigned int packet_length) | 202 | unsigned int packet_length) |
203 | { | 203 | { |
204 | if (wl->quirks & WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT) | 204 | if (wl->quirks & WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT) |
205 | return ALIGN(packet_length, WL12XX_BUS_BLOCK_SIZE); | ||
206 | else | ||
207 | return ALIGN(packet_length, WL1271_TX_ALIGN_TO); | 205 | return ALIGN(packet_length, WL1271_TX_ALIGN_TO); |
206 | else | ||
207 | return ALIGN(packet_length, WL12XX_BUS_BLOCK_SIZE); | ||
208 | } | 208 | } |
209 | 209 | ||
210 | static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif, | 210 | static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif, |
diff --git a/drivers/net/wireless/wl12xx/wl12xx.h b/drivers/net/wireless/wl12xx/wl12xx.h index b7036df5939d..e58e801f7aea 100644 --- a/drivers/net/wireless/wl12xx/wl12xx.h +++ b/drivers/net/wireless/wl12xx/wl12xx.h | |||
@@ -669,8 +669,8 @@ size_t wl12xx_copy_fwlog(struct wl1271 *wl, u8 *memblock, size_t maxlen); | |||
669 | /* Each RX/TX transaction requires an end-of-transaction transfer */ | 669 | /* Each RX/TX transaction requires an end-of-transaction transfer */ |
670 | #define WL12XX_QUIRK_END_OF_TRANSACTION BIT(0) | 670 | #define WL12XX_QUIRK_END_OF_TRANSACTION BIT(0) |
671 | 671 | ||
672 | /* WL128X requires aggregated packets to be aligned to the SDIO block size */ | 672 | /* wl127x and SPI don't support SDIO block size alignment */ |
673 | #define WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT BIT(2) | 673 | #define WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT BIT(2) |
674 | 674 | ||
675 | /* Older firmwares did not implement the FW logger over bus feature */ | 675 | /* Older firmwares did not implement the FW logger over bus feature */ |
676 | #define WL12XX_QUIRK_FWLOG_NOT_IMPLEMENTED BIT(4) | 676 | #define WL12XX_QUIRK_FWLOG_NOT_IMPLEMENTED BIT(4) |