BigW Consortium Gitlab

Commit b572f32d by David Clark

Fixed bug with re-opening wireless interface

parent d01c77fc
......@@ -213,7 +213,7 @@ void* mt7697_uart_open(rx_hndlr rx_fcn, void* rx_hndl)
goto cleanup;
}
dev_dbg(uart_info->dev, "%s(): fd_hndl(%p)\n",
dev_dbg(uart_info->dev, "%s(): fd_hndl(0x%p)\n",
__func__, uart_info->fd_hndl);
uart_info->rx_fcn = rx_fcn;
......@@ -236,7 +236,7 @@ int mt7697_uart_close(void *arg)
struct mt7697_uart_info *uart_info = arg;
int ret = 0;
dev_dbg(uart_info->dev, "%s(): fd_hndl(%p)\n",
dev_dbg(uart_info->dev, "%s(): fd_hndl(0x%p)\n",
__func__, uart_info->fd_hndl);
if (uart_info->fd_hndl == MT7697_UART_INVALID_FD ||
......
......@@ -1145,6 +1145,7 @@ int mt7697_cfg80211_stop(struct mt7697_vif *vif)
__func__, ret);
}
vif->cfg->txq_hdl = NULL;
vif->cfg->rxq_hdl = NULL;
cleanup:
......
......@@ -55,6 +55,17 @@ static int mt7697_open(struct net_device *ndev)
dev_dbg(cfg->dev, "%s(): open net device\n", __func__);
if (!cfg->rxq_hdl && !cfg->txq_hdl) {
dev_dbg(cfg->dev, "%s(): open mt7697 uart\n", __func__);
cfg->txq_hdl = cfg->hif_ops->open(mt7697_proc_80211cmd, cfg);
if (!cfg->txq_hdl) {
dev_err(cfg->dev, "%s(): open() failed\n", __func__);
goto cleanup;
}
cfg->rxq_hdl = cfg->txq_hdl;
}
if ((cfg->wifi_cfg.opmode == MT7697_WIFI_MODE_STA_ONLY) &&
(cfg->radio_state == MT7697_RADIO_STATE_OFF)) {
ret = mt7697_wr_set_radio_state_req(cfg, MT7697_RADIO_STATE_ON);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment