wl18xx: init Tx-released index to 0 on HW init
authorArik Nemtsov <arik@wizery.com>
Thu, 10 May 2012 09:13:46 +0000 (12:13 +0300)
committerLuciano Coelho <coelho@ti.com>
Tue, 5 Jun 2012 12:56:27 +0000 (15:56 +0300)
This ensures the index is 0 on FW recovery and prevents spurious error
prints - "WARNING illegal id in tx completion".

Signed-off-by: Arik Nemtsov <arik@wizery.com>
Signed-off-by: Luciano Coelho <coelho@ti.com>
drivers/net/wireless/ti/wl18xx/main.c

index 9aae0af25fefe95325fffab5ef610d1b9b2dff98..a8b9ceacd9c26b79dbabfdbaa9f61c84e5a7a839 100644 (file)
@@ -850,11 +850,15 @@ static void wl18xx_tx_immediate_completion(struct wl1271 *wl)
 static int wl18xx_hw_init(struct wl1271 *wl)
 {
        int ret;
+       struct wl18xx_priv *priv = wl->priv;
        u32 host_cfg_bitmap = HOST_IF_CFG_RX_FIFO_ENABLE |
                HOST_IF_CFG_ADD_RX_ALIGNMENT;
 
        u32 sdio_align_size = 0;
 
+       /* (re)init private structures. Relevant on recovery as well. */
+       priv->last_fw_rls_idx = 0;
+
        /* Enable Tx SDIO padding */
        if (wl->quirks & WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN) {
                host_cfg_bitmap |= HOST_IF_CFG_TX_PAD_TO_SDIO_BLK;