Return-path: Received: from smtp.codeaurora.org ([198.145.29.96]:43501 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750965AbcGRInO (ORCPT ); Mon, 18 Jul 2016 04:43:14 -0400 From: Kalle Valo To: Maxim Altshul Cc: , Eliad Peller , Arik Nemtsov , Yaniv Machani , Subject: Re: [PATCH 2/2 v4] wlcore: Add support for get_expected_throughput opcode References: <20160711142251.30443-1-maxim.altshul@ti.com> <20160711142251.30443-2-maxim.altshul@ti.com> Date: Mon, 18 Jul 2016 11:43:10 +0300 In-Reply-To: <20160711142251.30443-2-maxim.altshul@ti.com> (Maxim Altshul's message of "Mon, 11 Jul 2016 17:22:33 +0300") Message-ID: <87inw39w0x.fsf@purkki.adurom.net> (sfid-20160718_104333_917330_0C2EA02B) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-wireless-owner@vger.kernel.org List-ID: Maxim Altshul writes: > Adding this opcode, allows the TI wireless driver, > to report throughput directly from FW to mac80211. > > This is used mainly for mesh metric calculation. > > Signed-off-by: Maxim Altshul [...] > +static u32 wlcore_op_get_expected_throughput(struct ieee80211_sta *sta) > +{ > + struct wl1271_station *wl_sta = (struct wl1271_station *)sta->drv_priv; > + struct wl1271 *wl = wl_sta->wl; > + u8 hlid = wl_sta->hlid; > + > + /* return in units of Kbps */ > + return (wl->links[hlid].fw_rate_mbps * 1000); The indentation looks wrong, but I can fix it before I apply the patch. -- Kalle Valo