diff mbox series

[2/3] staging: wilc1000: directly fetch 'priv' handler from 'vif' instance

Message ID 20200211000652.4781-2-ajay.kathat@microchip.com (mailing list archive)
State Not Applicable
Delegated to: Johannes Berg
Headers show
Series [1/3] staging: wilc1000: remove use of vendor specific IE for p2p handling | expand

Commit Message

Ajay Singh Feb. 10, 2020, 6:35 p.m. UTC
From: Ajay Singh <ajay.kathat@microchip.com>

The 'priv' handler is already present in 'vif' struct so directly fetch
its value from vif handler in wilc_handle_roc_expired().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
---
 drivers/staging/wilc1000/hif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/staging/wilc1000/hif.c b/drivers/staging/wilc1000/hif.c
index 658790bd465b..c8c41c2df4ec 100644
--- a/drivers/staging/wilc1000/hif.c
+++ b/drivers/staging/wilc1000/hif.c
@@ -861,9 +861,8 @@  static int wilc_handle_roc_expired(struct wilc_vif *vif, u64 cookie)
 	struct wid wid;
 	int result;
 	struct host_if_drv *hif_drv = vif->hif_drv;
-	struct wilc_priv *priv = wdev_priv(vif->ndev->ieee80211_ptr);
 
-	if (priv->p2p_listen_state) {
+	if (vif->priv.p2p_listen_state) {
 		remain_on_chan_flag = false;
 		wid.id = WID_REMAIN_ON_CHAN;
 		wid.type = WID_STR;