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

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

Merge "wil6210: extend bus voting support for wider bandwidth"

parents 190d4e4e dbccf88f
Loading
Loading
Loading
Loading
+15 −4
Original line number Diff line number Diff line
@@ -1455,8 +1455,14 @@ static int wil_cfg80211_connect(struct wiphy *wiphy,
	rc = wmi_send(wil, WMI_CONNECT_CMDID, vif->mid, &conn, sizeof(conn));
	if (rc == 0) {
		netif_carrier_on(ndev);
		if (!wil_has_other_active_ifaces(wil, ndev, false, true))
			wil6210_bus_request(wil, WIL_MAX_BUS_REQUEST_KBPS);
		if (!wil_has_other_active_ifaces(wil, ndev, false, true)) {
			if (wil->force_edmg_channel)
				wil6210_bus_request(wil,
						    WIL_11AY_BUS_REQUEST_KBPS);
			else
				wil6210_bus_request(wil,
						    WIL_11AD_BUS_REQUEST_KBPS);
		}
		vif->bss = bss;
		/* Connect can take lots of time */
		mod_timer(&vif->connect_timer,
@@ -2099,8 +2105,13 @@ static int _wil_cfg80211_start_ap(struct wiphy *wiphy,
	}

	netif_carrier_on(ndev);
	if (!wil_has_other_active_ifaces(wil, ndev, false, true))
		wil6210_bus_request(wil, WIL_MAX_BUS_REQUEST_KBPS);
	if (!wil_has_other_active_ifaces(wil, ndev, false, true)) {
		if (wil->force_edmg_channel)
			wil6210_bus_request(wil, WIL_11AY_BUS_REQUEST_KBPS);
		else
			wil6210_bus_request(wil, WIL_11AD_BUS_REQUEST_KBPS);
	}


	rc = wmi_pcp_start(vif, bi, wmi_nettype, chan, hidden_ssid, is_go);
	if (rc)
+2 −0
Original line number Diff line number Diff line
@@ -52,6 +52,8 @@ union wil_tx_desc;

#define WIL_DEFAULT_BUS_REQUEST_KBPS 128000 /* ~1Gbps */
#define WIL_MAX_BUS_REQUEST_KBPS 800000 /* ~6.1Gbps */
#define WIL_11AD_BUS_REQUEST_KBPS 600000 /* ~4.6Gbps */
#define WIL_11AY_BUS_REQUEST_KBPS 1300000 /* ~10.1Gbps */

#define WIL_NUM_LATENCY_BINS 200

+1 −1
Original line number Diff line number Diff line
@@ -1396,7 +1396,7 @@ static int ops_bus_request(void *handle, u32 kbps /* KBytes/Sec */)
		 * assume we have single path (vectors[0]). If we ever
		 * have multiple paths, need to define the behavior
		 */
		usecase_kbps = div64_u64(usecase->vectors[0].ib, 1000);
		usecase_kbps = div64_u64(usecase->vectors[0].ab, 1000);
		if (usecase_kbps >= kbps && usecase_kbps < min_kbps) {
			min_kbps = usecase_kbps;
			vote = i;