summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210/pm.c
diff options
context:
space:
mode:
authorLior David <liord@codeaurora.org>2018-02-26 20:12:13 +0200
committerKalle Valo <kvalo@codeaurora.org>2018-02-27 18:50:19 +0200
commite00243fab84b4efd5a250d1c47a4ddcca4c666ce (patch)
tree9f41600fb5f3a29c4ebf4204e9f148f31d0e9a11 /drivers/net/wireless/ath/wil6210/pm.c
parent7bfe9e22e487b0cb14bc3bd03e6e987d9789756b (diff)
wil6210: infrastructure for multiple virtual interfaces
Simple infrastructure changes for supporting multiple virtual interfaces (multiple VIFs). It is still not possible to add new VIFs so the only VIF belongs to the main interface. Main changes: 1. Add MAC ID(mid) argument to wmi_send and wmi_call to allow invoking WMI commands on different VIFs. 2. Similarly, in WMI event handler look at the mid reported by FW and extract VIF structure (currently only for main interface). All WMI event handlers operate on wil6210_vif structure so they know on which VIF they were called. 3. Trivial changes to use wil6210_vif structure and MID throughout the code. 4. Various changes to logging to report MID. More complete multiple VIFs support will be added gradually in next patches. Signed-off-by: Lior David <liord@codeaurora.org> Signed-off-by: Maya Erez <merez@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210/pm.c')
-rw-r--r--drivers/net/wireless/ath/wil6210/pm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/wil6210/pm.c b/drivers/net/wireless/ath/wil6210/pm.c
index 0a96518a566f..12f6d78bcf63 100644
--- a/drivers/net/wireless/ath/wil6210/pm.c
+++ b/drivers/net/wireless/ath/wil6210/pm.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2014,2017 Qualcomm Atheros, Inc.
+ * Copyright (c) 2018, The Linux Foundation. All rights reserved.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -23,8 +24,8 @@
int wil_can_suspend(struct wil6210_priv *wil, bool is_runtime)
{
int rc = 0;
- struct wireless_dev *wdev = wil->wdev;
- struct net_device *ndev = wil_to_ndev(wil);
+ struct net_device *ndev = wil->main_ndev;
+ struct wireless_dev *wdev = ndev->ieee80211_ptr;
bool wmi_only = test_bit(WMI_FW_CAPABILITY_WMI_ONLY,
wil->fw_capabilities);
@@ -258,7 +259,7 @@ reject_suspend:
static int wil_suspend_radio_off(struct wil6210_priv *wil)
{
int rc = 0;
- struct net_device *ndev = wil_to_ndev(wil);
+ struct net_device *ndev = wil->main_ndev;
wil_dbg_pm(wil, "suspend radio off\n");
@@ -306,7 +307,7 @@ out:
static int wil_resume_radio_off(struct wil6210_priv *wil)
{
int rc = 0;
- struct net_device *ndev = wil_to_ndev(wil);
+ struct net_device *ndev = wil->main_ndev;
wil_dbg_pm(wil, "Enabling PCIe IRQ\n");
wil_enable_irq(wil);