Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ef247121 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "wil6210: support NL_60G_GEN_FW_RESET UNSPEC vendor command"

parents d2c21b18 b87b69ca
Loading
Loading
Loading
Loading
+19 −0
Original line number Diff line number Diff line
@@ -103,6 +103,8 @@ enum wil_nl_60g_evt_type {

enum wil_nl_60g_debug_cmd {
	NL_60G_DBG_FORCE_WMI_SEND,
	NL_60G_GEN_RADAR_ALLOC_BUFFER,
	NL_60G_GEN_FW_RESET,
};

struct wil_nl_60g_send_receive_wmi {
@@ -3586,6 +3588,23 @@ static int wil_nl_60g_handle_cmd(struct wiphy *wiphy, struct wireless_dev *wdev,
			wil_dbg_wmi(wil, "force sending wmi commands %d\n",
				    wil->force_wmi_send);
			break;
		case NL_60G_GEN_FW_RESET:
			if (!test_bit(WMI_FW_CAPABILITY_WMI_ONLY,
				      wil->fw_capabilities)) {
				rc = -EOPNOTSUPP;
				break;
			}

			wil_dbg_misc(wil,
				     "NL_60G_GEN_FW_RESET, resetting...\n");

			mutex_lock(&wil->mutex);
			down_write(&wil->mem_lock);
			rc = wil_reset(wil, true);
			up_write(&wil->mem_lock);
			mutex_unlock(&wil->mutex);

			break;
		default:
			rc = -EINVAL;
			wil_err(wil, "invalid debug_cmd id %d",