[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200907101521.66082-15-Jerome.Pouiller@silabs.com>
Date: Mon, 7 Sep 2020 12:15:04 +0200
From: Jerome Pouiller <Jerome.Pouiller@...abs.com>
To: devel@...verdev.osuosl.org, linux-wireless@...r.kernel.org
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kalle Valo <kvalo@...eaurora.org>,
"David S . Miller" <davem@...emloft.net>,
Jérôme Pouiller
<jerome.pouiller@...abs.com>
Subject: [PATCH 14/31] staging: wfx: drop useless struct hif_map_link_flags
From: Jérôme Pouiller <jerome.pouiller@...abs.com>
Struct hif_map_link_flags has no reason to exist. Drop it and simplify
access to struct hif_req_map_link.
Also rename the field 'map_direction' in 'unmap'. It is more
meaningful and allows to drop enum hif_sta_map_direction.
Signed-off-by: Jérôme Pouiller <jerome.pouiller@...abs.com>
---
drivers/staging/wfx/hif_api_cmd.h | 15 +++------------
drivers/staging/wfx/hif_tx.c | 4 ++--
2 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/drivers/staging/wfx/hif_api_cmd.h b/drivers/staging/wfx/hif_api_cmd.h
index 895f26d9f1a2..f86f6d491fb2 100644
--- a/drivers/staging/wfx/hif_api_cmd.h
+++ b/drivers/staging/wfx/hif_api_cmd.h
@@ -434,20 +434,11 @@ struct hif_cnf_beacon_transmit {
#define HIF_LINK_ID_MAX 14
#define HIF_LINK_ID_NOT_ASSOCIATED (HIF_LINK_ID_MAX + 1)
-enum hif_sta_map_direction {
- HIF_STA_MAP = 0x0,
- HIF_STA_UNMAP = 0x1
-};
-
-struct hif_map_link_flags {
- u8 map_direction:1;
- u8 mfpc:1;
- u8 reserved:6;
-} __packed;
-
struct hif_req_map_link {
u8 mac_addr[ETH_ALEN];
- struct hif_map_link_flags map_link_flags;
+ u8 unmap:1;
+ u8 mfpc:1;
+ u8 reserved:6;
u8 peer_sta_id;
} __packed;
diff --git a/drivers/staging/wfx/hif_tx.c b/drivers/staging/wfx/hif_tx.c
index 49523e70af6c..eddb60dec069 100644
--- a/drivers/staging/wfx/hif_tx.c
+++ b/drivers/staging/wfx/hif_tx.c
@@ -502,8 +502,8 @@ int hif_map_link(struct wfx_vif *wvif, bool unmap, u8 *mac_addr, int sta_id, boo
return -ENOMEM;
if (mac_addr)
ether_addr_copy(body->mac_addr, mac_addr);
- body->map_link_flags.mfpc = mfp ? 1 : 0;
- body->map_link_flags.map_direction = unmap ? 1 : 0;
+ body->mfpc = mfp ? 1 : 0;
+ body->unmap = unmap ? 1 : 0;
body->peer_sta_id = sta_id;
wfx_fill_header(hif, wvif->id, HIF_REQ_ID_MAP_LINK, sizeof(*body));
ret = wfx_cmd_send(wvif->wdev, hif, NULL, 0, false);
--
2.28.0
Powered by blists - more mailing lists