rsi: buffer available interrupt handling
authorKarun Eagalapati <karun256@gmail.com>
Thu, 3 Aug 2017 14:29:03 +0000 (19:59 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 8 Aug 2017 11:46:03 +0000 (14:46 +0300)
BUFFER_AVAILABLE interrupt is sent by firmware to indicate
change in buffer status. We should check buffer status while
handling this interrupt. Currently buffer status is checked
only while dequeueing packets. This patch fixes a data
traffic stuck problem observed occasionally.

Signed-off-by: Karun Eagalapati <karun256@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_sdio_ops.c

index 94a9fcd70dc7c5d24a662f7782623d0d9d06d8bc..8e2a95c486b06f990ee80338ea5b8ac0b9a8d08a 100644 (file)
@@ -259,10 +259,12 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
 
                        switch (isr_type) {
                        case BUFFER_AVAILABLE:
-                               dev->rx_info.watch_bufferfull_count = 0;
-                               dev->rx_info.buffer_full = false;
-                               dev->rx_info.semi_buffer_full = false;
-                               dev->rx_info.mgmt_buffer_full = false;
+                               status = rsi_sdio_check_buffer_status(adapter,
+                                                                     0);
+                               if (status < 0)
+                                       rsi_dbg(ERR_ZONE,
+                                               "%s: Failed to check buffer status\n",
+                                               __func__);
                                rsi_sdio_ack_intr(common->priv,
                                                  (1 << PKT_BUFF_AVAILABLE));
                                rsi_set_event(&common->tx_thread.event);
@@ -270,7 +272,6 @@ void rsi_interrupt_handler(struct rsi_hw *adapter)
                                rsi_dbg(ISR_ZONE,
                                        "%s: ==> BUFFER_AVAILABLE <==\n",
                                        __func__);
-                               dev->rx_info.buf_available_counter++;
                                dev->buff_status_updated = true;
                                break;