2016-06-30 15:37:30

by Altshul, Maxim

[permalink] [raw]
Subject: [PATCH v3] wlcore: Add support for get_expected_throughput opcode

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 <[email protected]>
---
Removed ret and NULL test.

drivers/net/wireless/ti/wlcore/main.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 39dec7d..237dae8c 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5851,6 +5851,16 @@ out:
mutex_unlock(&wl->mutex);
}

+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);
+}
+
static bool wl1271_tx_frames_pending(struct ieee80211_hw *hw)
{
struct wl1271 *wl = hw->priv;
@@ -6051,6 +6061,7 @@ static const struct ieee80211_ops wl1271_ops = {
.switch_vif_chanctx = wlcore_op_switch_vif_chanctx,
.sta_rc_update = wlcore_op_sta_rc_update,
.sta_statistics = wlcore_op_sta_statistics,
+ .get_expected_throughput = wlcore_op_get_expected_throughput,
CFG80211_TESTMODE_CMD(wl1271_tm_cmd)
};

--
2.9.0



2016-06-30 17:25:20

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH v3] wlcore: Add support for get_expected_throughput opcode

Hi,

[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on v4.7-rc5 next-20160630]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/Maxim-Altshul/wlcore-Add-support-for-get_expected_throughput-opcode/20160630-234034
base: https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: alpha-allmodconfig (attached as .config)
compiler: alpha-linux-gnu-gcc (Debian 5.3.1-8) 5.3.1 20160205
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=alpha

All error/warnings (new ones prefixed by >>):

drivers/net/wireless/ti/wlcore/main.c: In function 'wlcore_op_get_expected_throughput':
>> drivers/net/wireless/ti/wlcore/main.c:5678:28: error: 'struct wl1271_station' has no member named 'wl'
struct wl1271 *wl = wl_sta->wl;
^
>> drivers/net/wireless/ti/wlcore/main.c:5682:26: error: 'struct wl1271_link' has no member named 'fw_rate_mbps'
return (wl->links[hlid].fw_rate_mbps * 1000);
^
>> drivers/net/wireless/ti/wlcore/main.c:5683:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^

vim +5678 drivers/net/wireless/ti/wlcore/main.c

5672 mutex_unlock(&wl->mutex);
5673 }
5674
5675 static u32 wlcore_op_get_expected_throughput(struct ieee80211_sta *sta)
5676 {
5677 struct wl1271_station *wl_sta = (struct wl1271_station *)sta->drv_priv;
> 5678 struct wl1271 *wl = wl_sta->wl;
5679 u8 hlid = wl_sta->hlid;
5680
5681 /* return in units of Kbps */
> 5682 return (wl->links[hlid].fw_rate_mbps * 1000);
> 5683 }
5684
5685 static bool wl1271_tx_frames_pending(struct ieee80211_hw *hw)
5686 {

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (2.09 kB)
.config.gz (45.11 kB)
Download all attachments