mirror of https://gitee.com/openkylin/linux.git
wl12xx: change blocksize alignment quirk to negative
SDIO blocksize alignment support is now the rule, not the exception. To simplify the code in patches to come, invert the meaning of the quirk to be negative (ie. the quirk is set if the device does _not_ support blocksize alignment). Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
2f8e81ad42
commit
ce39defb5c
|
@ -501,7 +501,7 @@ int wl1271_chip_specific_init(struct wl1271 *wl)
|
|||
if (wl->chip.id == CHIP_ID_1283_PG20) {
|
||||
u32 host_cfg_bitmap = HOST_IF_CFG_RX_FIFO_ENABLE;
|
||||
|
||||
if (wl->quirks & WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT)
|
||||
if (!(wl->quirks & WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT))
|
||||
/* Enable SDIO padding */
|
||||
host_cfg_bitmap |= HOST_IF_CFG_TX_PAD_TO_SDIO_BLK;
|
||||
|
||||
|
|
|
@ -1323,7 +1323,9 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
|
|||
ret = wl1271_setup(wl);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT;
|
||||
break;
|
||||
|
||||
case CHIP_ID_1271_PG20:
|
||||
wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1271 PG20)",
|
||||
wl->chip.id);
|
||||
|
@ -1331,7 +1333,9 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
|
|||
ret = wl1271_setup(wl);
|
||||
if (ret < 0)
|
||||
goto out;
|
||||
wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT;
|
||||
break;
|
||||
|
||||
case CHIP_ID_1283_PG20:
|
||||
wl1271_debug(DEBUG_BOOT, "chip id 0x%x (1283 PG20)",
|
||||
wl->chip.id);
|
||||
|
@ -1340,8 +1344,8 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
|
|||
if (ret < 0)
|
||||
goto out;
|
||||
|
||||
if (wl1271_set_block_size(wl))
|
||||
wl->quirks |= WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT;
|
||||
if (!wl1271_set_block_size(wl))
|
||||
wl->quirks |= WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT;
|
||||
break;
|
||||
case CHIP_ID_1283_PG10:
|
||||
default:
|
||||
|
|
|
@ -201,10 +201,10 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
|||
static unsigned int wl12xx_calc_packet_alignment(struct wl1271 *wl,
|
||||
unsigned int packet_length)
|
||||
{
|
||||
if (wl->quirks & WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT)
|
||||
return ALIGN(packet_length, WL12XX_BUS_BLOCK_SIZE);
|
||||
else
|
||||
if (wl->quirks & WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT)
|
||||
return ALIGN(packet_length, WL1271_TX_ALIGN_TO);
|
||||
else
|
||||
return ALIGN(packet_length, WL12XX_BUS_BLOCK_SIZE);
|
||||
}
|
||||
|
||||
static int wl1271_tx_allocate(struct wl1271 *wl, struct wl12xx_vif *wlvif,
|
||||
|
|
|
@ -669,8 +669,8 @@ size_t wl12xx_copy_fwlog(struct wl1271 *wl, u8 *memblock, size_t maxlen);
|
|||
/* Each RX/TX transaction requires an end-of-transaction transfer */
|
||||
#define WL12XX_QUIRK_END_OF_TRANSACTION BIT(0)
|
||||
|
||||
/* WL128X requires aggregated packets to be aligned to the SDIO block size */
|
||||
#define WL12XX_QUIRK_BLOCKSIZE_ALIGNMENT BIT(2)
|
||||
/* wl127x and SPI don't support SDIO block size alignment */
|
||||
#define WL12XX_QUIRK_NO_BLOCKSIZE_ALIGNMENT BIT(2)
|
||||
|
||||
/* Older firmwares did not implement the FW logger over bus feature */
|
||||
#define WL12XX_QUIRK_FWLOG_NOT_IMPLEMENTED BIT(4)
|
||||
|
|
Loading…
Reference in New Issue