summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMaxim Altshul <maxim.altshul@ti.com>2016-08-04 15:43:04 +0300
committerJohannes Berg <johannes.berg@intel.com>2016-08-05 14:23:25 +0200
commit2439ca0402091badb24415e1b073ba12b34ba423 (patch)
treebee78c393a782b2cd1cdd5f44d35406e6183aecd /drivers
parent9757235f451c27deaa88925399f070ff6fcea832 (diff)
mac80211: Add ieee80211_hw pointer to get_expected_throughput
The variable is added to allow the driver an easy access to it's own hw->priv when the op is invoked. This fixes a crash in wlcore because it was relying on a station pointer that wasn't initialized yet. It's the wrong way to fix the crash, but it solves the problem for now and it does make sense to have the hw pointer here. Signed-off-by: Maxim Altshul <maxim.altshul@ti.com> [rewrite commit message, fix indentation] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wlcore/main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 1d689169da76..9e1f2d9c9865 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5700,10 +5700,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 */