Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1456376

[PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput

From Maxim Altshul <maxim.altshul@ti.com>
Newsgroups linux.kernel
Subject [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput
Date 2016-08-04 14:40 +0200
Message-ID <s2q6m-DV-43@gated-at.bofh.it> (permalink)
References <s2q6m-DV-45@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


- 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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput Maxim Altshul <maxim.altshul@ti.com> - 2016-08-04 14:40 +0200
  [PATCH 2/2] wlcore: Remove wl pointer from wl_sta structure Maxim Altshul <maxim.altshul@ti.com> - 2016-08-04 14:50 +0200
    Re: [PATCH 2/2] wlcore: Remove wl pointer from wl_sta structure John Stultz <john.stultz@linaro.org> - 2016-08-04 23:40 +0200
  Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput John Stultz <john.stultz@linaro.org> - 2016-08-04 23:40 +0200
    Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput Johannes Berg <johannes@sipsolutions.net> - 2016-08-05 07:50 +0200
      Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to get_expected_throughput John Stultz <john.stultz@linaro.org> - 2016-08-05 08:10 +0200
  Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput Johannes Berg <johannes@sipsolutions.net> - 2016-08-05 14:30 +0200
    RE: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput "Altshul, Maxim" <maxim.altshul@ti.com> - 2016-08-05 15:30 +0200
      Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput Johannes Berg <johannes@sipsolutions.net> - 2016-08-05 17:40 +0200
        RE: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput "Altshul, Maxim" <maxim.altshul@ti.com> - 2016-08-07 15:50 +0200
          Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput Johannes Berg <johannes@sipsolutions.net> - 2016-08-08 08:20 +0200
            RE: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput "Altshul, Maxim" <maxim.altshul@ti.com> - 2016-08-08 12:50 +0200
              Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput Johannes Berg <johannes@sipsolutions.net> - 2016-08-09 10:00 +0200
                RE: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput "Altshul, Maxim" <maxim.altshul@ti.com> - 2016-08-10 23:00 +0200
  Re: [PATCH 1/2] mac80211/wlcore: Add ieee80211_hw variable to  get_expected_throughput Johannes Berg <johannes@sipsolutions.net> - 2016-08-05 14:30 +0200

csiph-web