All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maxim Altshul <maxim.altshul@ti.com>
To: <linux-kernel@vger.kernel.org>
Cc: <john.stultz@linaro.org>, Maxim Altshul <maxim.altshul@ti.com>,
	Kalle Valo <kvalo@codeaurora.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Eliad Peller <eliad@wizery.com>, Yaniv Machani <yanivma@ti.com>
Subject: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput
Date: Thu, 4 Aug 2016 15:43:04 +0300	[thread overview]
Message-ID: <20160804124314.7636-2-maxim.altshul@ti.com> (raw)
In-Reply-To: <20160804124314.7636-1-maxim.altshul@ti.com>

- The variable is added to allow the driver an easy access
to it's own hw->priv when the op is invoked.

- Change wlcore op accordingly.

Signed-off-by: Maxim Altshul <maxim.altshul@ti.com>
---
 drivers/net/wireless/ti/wlcore/main.c | 5 +++--
 include/net/mac80211.h                | 3 ++-
 net/mac80211/driver-ops.h             | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 4573614..1ec3545 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5803,10 +5803,11 @@ out:
 	mutex_unlock(&wl->mutex);
 }
 
-static u32 wlcore_op_get_expected_throughput(struct ieee80211_sta *sta)
+static u32 wlcore_op_get_expected_throughput(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta)
 {
 	struct wl1271_station *wl_sta = (struct wl1271_station *)sta->drv_priv;
-	struct wl1271 *wl = wl_sta->wl;
+	struct wl1271 *wl = hw->priv;
 	u8 hlid = wl_sta->hlid;
 
 	/* return in units of Kbps */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c328f35..464eb97 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -3484,7 +3484,8 @@ struct ieee80211_ops {
 
 	int (*join_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
 	void (*leave_ibss)(struct ieee80211_hw *hw, struct ieee80211_vif *vif);
-	u32 (*get_expected_throughput)(struct ieee80211_sta *sta);
+	u32 (*get_expected_throughput)(struct ieee80211_hw *hw,
+			struct ieee80211_sta *sta);
 	int (*get_txpower)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 			   int *dbm);
 
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index 154ce4b..1f75195 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1081,7 +1081,7 @@ static inline u32 drv_get_expected_throughput(struct ieee80211_local *local,
 
 	trace_drv_get_expected_throughput(sta);
 	if (local->ops->get_expected_throughput)
-		ret = local->ops->get_expected_throughput(sta);
+		ret = local->ops->get_expected_throughput(&local->hw, sta);
 	trace_drv_return_u32(local, ret);
 
 	return ret;
-- 
2.9.0

  reply	other threads:[~2016-08-04 12:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-04 12:43 [PATCH 0/2] get_expected_throughput interface update Maxim Altshul
2016-08-04 12:43 ` Maxim Altshul [this message]
2016-08-04 12:43   ` [PATCH 2/2] wlcore: Remove wl pointer from wl_sta structure Maxim Altshul
2016-08-04 21:31     ` John Stultz
2016-08-15  7:56     ` Kalle Valo
2016-08-15  7:56     ` Kalle Valo
2016-08-04 21:31   ` [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput John Stultz
2016-08-05  5:40     ` Johannes Berg
2016-08-05  6:03       ` John Stultz
2016-08-05 12:22   ` Johannes Berg
2016-08-05 12:24     ` Johannes Berg
2016-08-05 13:25       ` Altshul, Maxim
2016-08-05 15:34         ` Johannes Berg
2016-08-07 13:42           ` Altshul, Maxim
2016-08-08  6:10             ` Johannes Berg
2016-08-08 10:42               ` Altshul, Maxim
2016-08-09  7:58                 ` Johannes Berg
2016-08-10  8:03                   ` Altshul, Maxim
2016-08-15  7:59   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160804124314.7636-2-maxim.altshul@ti.com \
    --to=maxim.altshul@ti.com \
    --cc=eliad@wizery.com \
    --cc=johannes@sipsolutions.net \
    --cc=john.stultz@linaro.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yanivma@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.