From 25f75f6c58f2f853357a3603d425d00297e30975 Mon Sep 17 00:00:00 2001
From: Ian Lin <ian.lin@infineon.com>
Date: Tue, 1 Nov 2022 22:30:00 -0500
Subject: [PATCH 131/296] non-upstream: Refine TWT code for checkpatch

Fix license statement and coding style.

Signed-off-by: Ian Lin <ian.lin@infineon.com>
---
 .../broadcom/brcm80211/brcmfmac/cfg80211.c    |   6 +-
 .../broadcom/brcm80211/brcmfmac/vendor_ifx.c  | 213 +++++++++---------
 .../broadcom/brcm80211/brcmfmac/vendor_ifx.h  |  78 +++----
 3 files changed, 142 insertions(+), 155 deletions(-)

diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
index 11917cae0615..34c54d12b5b6 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
@@ -7966,8 +7966,8 @@ brcmf_notify_beacon_loss(struct brcmf_if *ifp,
 }
 
 int brcmf_notify_twt(struct brcmf_if *ifp,
-				     const struct brcmf_event_msg *e,
-				     void *data)
+		     const struct brcmf_event_msg *e,
+		     void *data)
 {
 	brcmf_dbg(TRACE, "Enter\n");
 	return 0;
@@ -8032,7 +8032,7 @@ static void brcmf_register_event_handlers(struct brcmf_cfg80211_info *cfg)
 	brcmf_fweh_register(cfg->pub, BRCMF_E_BCNLOST_MSG,
 			    brcmf_notify_beacon_loss);
 	brcmf_fweh_register(cfg->pub, BRCMF_E_TWT_SETUP,
-				brcmf_notify_twt);
+			    brcmf_notify_twt);
 }
 
 static void brcmf_deinit_priv_mem(struct brcmf_cfg80211_info *cfg)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.c
index de397d8963cd..c9aa4f61694f 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.c
@@ -1,5 +1,6 @@
-/*
- * Infineon WLAN driver: vendor specific implement
+// SPDX-License-Identifier: ISC
+
+/* Infineon WLAN driver: vendor specific implement
  *
  * ©2022 Cypress Semiconductor Corporation (an Infineon company)
  * or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
@@ -54,23 +55,19 @@ static int ifx_cfg80211_vndr_send_cmd_reply(struct wiphy *wiphy,
 	return cfg80211_vendor_cmd_reply(skb);
 }
 
-/*
- * Wake Duration derivation from Nominal Minimum Wake Duration
- */
+/* Wake Duration derivation from Nominal Minimum Wake Duration */
 static inline u32
 ifx_twt_min_twt_to_wake_dur(u8 min_twt, u8 min_twt_unit)
 {
 	u32 wake_dur;
 
 	if (min_twt_unit == 1) {
-		/*
-		 * If min_twt_unit is 1, then min_twt is
+		/* If min_twt_unit is 1, then min_twt is
 		 * in units of TUs (i.e) 102400 usecs.
 		 */
 		wake_dur = (u32)min_twt * 102400;
 	} else if (min_twt_unit == 0) {
-		/*
-		 * If min_twt_unit is 0, then min_twt is
+		/* If min_twt_unit is 0, then min_twt is
 		 * in units of 256 usecs.
 		 */
 		wake_dur = (u32)min_twt * 256;
@@ -82,9 +79,7 @@ ifx_twt_min_twt_to_wake_dur(u8 min_twt, u8 min_twt_unit)
 	return wake_dur;
 }
 
-/*
- * Wake Interval derivation from Wake Interval Mantissa & Exponent
- */
+/* Wake Interval derivation from Wake Interval Mantissa & Exponent */
 static inline u32
 ifx_twt_float_to_uint32(u8 exponent, u16 mantissa)
 {
@@ -95,7 +90,7 @@ int ifx_twt_setup(struct wireless_dev *wdev, struct ifx_twt twt)
 {
 	struct brcmf_cfg80211_vif *vif;
 	struct brcmf_if *ifp;
-	ifx_twt_setup_t val;
+	struct ifx_twt_setup val;
 	s32 err;
 
 	vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);
@@ -156,18 +151,18 @@ int ifx_twt_setup(struct wireless_dev *wdev, struct ifx_twt twt)
 
 	/* Wake Duration or Service Period */
 	val.desc.wake_dur = ifx_twt_min_twt_to_wake_dur(twt.min_twt,
-							      twt.min_twt_unit);
+							twt.min_twt_unit);
 	/* Wake Interval or Service Interval */
 	val.desc.wake_int = ifx_twt_float_to_uint32(twt.exponent,
-							  twt.mantissa);
+						    twt.mantissa);
 	/* TWT Negotiation_type */
 	val.desc.negotiation_type = (u8)twt.negotiation_type;
 	err = brcmf_fil_xtlv_data_set(ifp, "twt", IFX_TWT_CMD_SETUP,
-		(void *)&val, sizeof(val));
+				      (void *)&val, sizeof(val));
 
 	brcmf_dbg(TRACE, "TWT setup\n"
 		"Setup command	: %u\n"
-		"Flow flags 	: 0x %02x\n"
+		"Flow flags	: 0x %02x\n"
 		"Flow ID		: %u\n"
 		"Broadcast TWT ID	: %u\n"
 		"Wake Time H,L	: 0x %08x %08x\n"
@@ -186,9 +181,8 @@ int ifx_twt_setup(struct wireless_dev *wdev, struct ifx_twt twt)
 		val.desc.wake_int,
 		val.desc.negotiation_type);
 
-	if (err < 0) {
+	if (err < 0)
 		brcmf_err("TWT setup failed. ret:%d\n", err);
-	} 
 
 	return err;
 }
@@ -197,7 +191,7 @@ int ifx_twt_teardown(struct wireless_dev *wdev, struct ifx_twt twt)
 {
 	struct brcmf_cfg80211_vif *vif;
 	struct brcmf_if *ifp;
-	ifx_twt_teardown_t val;
+	struct ifx_twt_teardown val;
 	s32 err;
 
 	vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);
@@ -224,7 +218,7 @@ int ifx_twt_teardown(struct wireless_dev *wdev, struct ifx_twt twt)
 	/* Teardown all Negotiated TWT */
 	val.teardesc.alltwt = twt.teardown_all_twt;
 	err = brcmf_fil_xtlv_data_set(ifp, "twt", IFX_TWT_CMD_TEARDOWN,
-		(void *)&val, sizeof(val));
+				      (void *)&val, sizeof(val));
 
 	brcmf_dbg(TRACE, "TWT teardown\n"
 		"Flow ID		: %u\n"
@@ -236,9 +230,8 @@ int ifx_twt_teardown(struct wireless_dev *wdev, struct ifx_twt twt)
 		val.teardesc.negotiation_type,
 		val.teardesc.alltwt);
 
-	if (err < 0) {
+	if (err < 0)
 		brcmf_err("TWT teardown failed. ret:%d\n", err);
-	} 
 
 	return err;
 }
@@ -248,25 +241,25 @@ int ifx_twt_oper(struct wireless_dev *wdev, struct ifx_twt twt)
 	int ret = -1;
 
 	switch (twt.twt_oper) {
-		case IFX_TWT_OPER_SETUP:
-			ret = ifx_twt_setup(wdev, twt);
-			break;
-		case IFX_TWT_OPER_TEARDOWN:
-			ret = ifx_twt_teardown(wdev, twt);
-			break;
-		default:
-			brcmf_err("Requested TWT operation (%d) is not supported\n",
-				twt.twt_oper);
-			ret = -EINVAL;
-			goto exit;
+	case IFX_TWT_OPER_SETUP:
+		ret = ifx_twt_setup(wdev, twt);
+		break;
+	case IFX_TWT_OPER_TEARDOWN:
+		ret = ifx_twt_teardown(wdev, twt);
+		break;
+	default:
+		brcmf_err("Requested TWT operation (%d) is not supported\n",
+			  twt.twt_oper);
+		ret = -EINVAL;
+		goto exit;
 	}
 exit:
 	return ret;
 }
 
 static void
-ifx_cfgvendor_twt_parse_params(const struct nlattr *attr_iter, 
-	struct ifx_twt *twt)
+ifx_cfgvendor_twt_parse_params(const struct nlattr *attr_iter,
+			       struct ifx_twt *twt)
 {
 	int tmp, twt_param;
 	const struct nlattr *twt_param_iter;
@@ -274,75 +267,73 @@ ifx_cfgvendor_twt_parse_params(const struct nlattr *attr_iter,
 	nla_for_each_nested(twt_param_iter, attr_iter, tmp) {
 		twt_param = nla_type(twt_param_iter);
 		switch (twt_param) {
-			case IFX_VENDOR_ATTR_TWT_PARAM_NEGO_TYPE:
-				twt->negotiation_type = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_SETUP_CMD_TYPE:
-				twt->setup_cmd = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_DIALOG_TOKEN:
-				twt->dialog_token = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_TIME:
-				twt->twt = nla_get_u64(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_TIME_OFFSET:
-				twt->twt_offset = nla_get_u64(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_MIN_WAKE_DURATION:
-				twt->min_twt = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_INTVL_EXPONENT:
-				twt->exponent = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_INTVL_MANTISSA:
-				twt->mantissa = nla_get_u16(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_REQUESTOR:
-				twt->requestor = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_TRIGGER:
-				twt->trigger = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_IMPLICIT:
-				twt->implicit = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_FLOW_TYPE:
-				twt->flow_type = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_FLOW_ID:
-				twt->flow_id = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_BCAST_TWT_ID:
-				twt->bcast_twt_id = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_PROTECTION:
-				twt->protection = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_CHANNEL:
-				twt->twt_channel = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_TWT_INFO_FRAME_DISABLED:
-				twt->twt_info_frame_disabled =
-					nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_MIN_WAKE_DURATION_UNIT:
-				twt->min_twt_unit = nla_get_u8(twt_param_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAM_TEARDOWN_ALL_TWT:
-				twt->teardown_all_twt =
-					nla_get_u8(twt_param_iter);
-				break;
-			default:
-				brcmf_dbg(TRACE, "Unknown TWT param %d, skipping\n", 
-					twt_param);
-				break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_NEGO_TYPE:
+			twt->negotiation_type = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_SETUP_CMD_TYPE:
+			twt->setup_cmd = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_DIALOG_TOKEN:
+			twt->dialog_token = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_TIME:
+			twt->twt = nla_get_u64(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_TIME_OFFSET:
+			twt->twt_offset = nla_get_u64(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_MIN_WAKE_DURATION:
+			twt->min_twt = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_INTVL_EXPONENT:
+			twt->exponent = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_WAKE_INTVL_MANTISSA:
+			twt->mantissa = nla_get_u16(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_REQUESTOR:
+			twt->requestor = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_TRIGGER:
+			twt->trigger = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_IMPLICIT:
+			twt->implicit = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_FLOW_TYPE:
+			twt->flow_type = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_FLOW_ID:
+			twt->flow_id = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_BCAST_TWT_ID:
+			twt->bcast_twt_id = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_PROTECTION:
+			twt->protection = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_CHANNEL:
+			twt->twt_channel = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_TWT_INFO_FRAME_DISABLED:
+			twt->twt_info_frame_disabled = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_MIN_WAKE_DURATION_UNIT:
+			twt->min_twt_unit = nla_get_u8(twt_param_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAM_TEARDOWN_ALL_TWT:
+			twt->teardown_all_twt = nla_get_u8(twt_param_iter);
+			break;
+		default:
+			brcmf_dbg(TRACE, "Unknown TWT param %d, skipping\n",
+				  twt_param);
+			break;
 		}
 	}
 }
 
-int ifx_cfg80211_vndr_cmds_twt(struct wiphy *wiphy, 
-	struct wireless_dev *wdev, const void  *data, int len)
+int ifx_cfg80211_vndr_cmds_twt(struct wiphy *wiphy,
+			       struct wireless_dev *wdev, const void  *data, int len)
 {
 	int tmp, attr_type;
 	const struct nlattr *attr_iter;
@@ -371,16 +362,16 @@ int ifx_cfg80211_vndr_cmds_twt(struct wiphy *wiphy,
 		attr_type = nla_type(attr_iter);
 
 		switch (attr_type) {
-			case IFX_VENDOR_ATTR_TWT_OPER:
-				twt.twt_oper = nla_get_u8(attr_iter);
-				break;
-			case IFX_VENDOR_ATTR_TWT_PARAMS:
-				ifx_cfgvendor_twt_parse_params(attr_iter, &twt);
-				break;
-			default:
-				brcmf_dbg(TRACE, "Unknown TWT attribute %d, skipping\n",
-					   attr_type);
-				break;
+		case IFX_VENDOR_ATTR_TWT_OPER:
+			twt.twt_oper = nla_get_u8(attr_iter);
+			break;
+		case IFX_VENDOR_ATTR_TWT_PARAMS:
+			ifx_cfgvendor_twt_parse_params(attr_iter, &twt);
+			break;
+		default:
+			brcmf_dbg(TRACE, "Unknown TWT attribute %d, skipping\n",
+				  attr_type);
+			break;
 		}
 	}
 
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.h
index 35fc3aba3e71..c18afdfb29f3 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/vendor_ifx.h
@@ -1,5 +1,6 @@
-/*
- * Infineon WLAN driver: vendor specific implement
+// SPDX-License-Identifier: ISC
+
+/* Infineon WLAN driver: vendor specific implement
  *
  * ©2022 Cypress Semiconductor Corporation (an Infineon company)
  * or an affiliate of Cypress Semiconductor Corporation. All rights reserved.
@@ -112,15 +113,15 @@ enum ifx_vendor_attr {
 #define IFX_TWT_SETUP_VER	0u
 #define IFX_TWT_TEARDOWN_VER	0u
 /* Flow flags */
-#define IFX_TWT_FLOW_FLAG_BROADCAST	(1 << 0)
-#define IFX_TWT_FLOW_FLAG_IMPLICIT	(1 << 1)
-#define IFX_TWT_FLOW_FLAG_UNANNOUNCED	(1 << 2)
-#define IFX_TWT_FLOW_FLAG_TRIGGER	(1 << 3)
-#define IFX_TWT_FLOW_FLAG_WAKE_TBTT_NEGO (1 << 4)
-#define IFX_TWT_FLOW_FLAG_REQUEST	(1 << 5)
-#define IFX_TWT_FLOW_FLAG_PROTECT	(1u << 0u)
-#define IFX_TWT_FLOW_FLAG_RESPONDER_PM	(1u << 6u)
-#define IFX_TWT_FLOW_FLAG_UNSOLICITED	(1u << 7u)
+#define IFX_TWT_FLOW_FLAG_BROADCAST	BIT(0)
+#define IFX_TWT_FLOW_FLAG_IMPLICIT	BIT(1)
+#define IFX_TWT_FLOW_FLAG_UNANNOUNCED	BIT(2)
+#define IFX_TWT_FLOW_FLAG_TRIGGER	BIT(3)
+#define IFX_TWT_FLOW_FLAG_WAKE_TBTT_NEGO BIT(4)
+#define IFX_TWT_FLOW_FLAG_REQUEST	BIT(5)
+#define IFX_TWT_FLOW_FLAG_PROTECT	BIT(0)
+#define IFX_TWT_FLOW_FLAG_RESPONDER_PM BIT(6)
+#define IFX_TWT_FLOW_FLAG_UNSOLICITED	BIT(7)
 /* Flow id */
 #define IFX_TWT_FLOW_ID_FID	0x07u	/* flow id */
 #define IFX_TWT_FLOW_ID_GID_MASK	0x70u	/* group id - broadcast TWT only */
@@ -135,16 +136,14 @@ enum ifx_vendor_attr {
 #define IFX_TWT_INFINITE_BTWT_PERSIST	0xFFFFFFFFu
 /* Wake type */
 /* TODO: not yet finalized */
-#define IFX_TWT_TIME_TYPE_BSS	0u	/* The time specified in wake_time_h/l is
-					 * the BSS TSF time.
-					 */
-#define IFX_TWT_TIME_TYPE_OFFSET	1u	/* The time specified in wake_time_h/l is an offset
-					 * of the TSF time when the iovar is processed.
-					 */
-#define IFX_TWT_TIME_TYPE_AUTO	2u	/* The target wake time is chosen internally by the FW */
- 
-/*
- * enum ifx_vendor_attr_twt - Attributes for the TWT vendor command
+/* The time specified in wake_time_h/l is the BSS TSF time. */
+#define IFX_TWT_TIME_TYPE_BSS	0u
+/* The time specified in wake_time_h/l is an offset of the TSF time when the iovar is processed. */
+#define IFX_TWT_TIME_TYPE_OFFSET 1u
+/* The target wake time is chosen internally by the FW */
+#define IFX_TWT_TIME_TYPE_AUTO 2u
+
+/* enum ifx_vendor_attr_twt - Attributes for the TWT vendor command
  *
  * @IFX_VENDOR_ATTR_TWT_UNSPEC: Reserved value 0
  *
@@ -165,8 +164,7 @@ enum ifx_vendor_attr_twt {
 	IFX_VENDOR_ATTR_TWT_MAX
 };
 
-/*
- * enum ifx_twt_oper - TWT operation to be specified using the vendor
+/* enum ifx_twt_oper - TWT operation to be specified using the vendor
  * attribute IFX_VENDOR_ATTR_TWT_OPER
  *
  * @IFX_TWT_OPER_UNSPEC: Reserved value 0
@@ -188,8 +186,7 @@ enum ifx_twt_oper {
 	IFX_TWT_OPER_MAX
 };
 
-/*
- * enum ifx_vendor_attr_twt_param - TWT parameters
+/* enum ifx_vendor_attr_twt_param - TWT parameters
  *
  * @IFX_VENDOR_ATTR_TWT_PARAM_UNSPEC: Reserved value 0
  *
@@ -248,7 +245,7 @@ enum ifx_twt_oper {
  *	otherwise, it shall set it to 0.
  *
  * @IFX_VENDOR_ATTR_TWT_PARAM_CHANNEL: TWT channel field which is set to 0, unless
- * 	the HE STA sets up a subchannel selective transmission operation.
+ *	the HE STA sets up a subchannel selective transmission operation.
  *
  * @IFX_VENDOR_ATTR_TWT_PARAM_TWT_INFO_FRAME_DISABLED: TWT Information frame RX handing
  *	disabled / enabled.
@@ -413,9 +410,8 @@ struct ifx_twt {
 	u8 teardown_all_twt;
 };
 
-/*
- * NOTES:
- * ifx_twt_sdesc_t is used to support both broadcast TWT and individual TWT.
+/* NOTES:
+ * ifx_twt_sdesc is used to support both broadcast TWT and individual TWT.
  * Value in bit[0:2] in 'flow_id' field is interpreted differently:
  * - flow id for individual TWT (when IFX_TWT_FLOW_FLAG_BROADCAST bit is NOT set
  *   in 'flow_flags' field)
@@ -426,7 +422,7 @@ struct ifx_twt {
  */
 
 /* TWT Setup descriptor */
-typedef struct ifx_twt_sdesc {
+struct ifx_twt_sdesc {
 	/* Setup Command. */
 	u8 setup_cmd;		/* See TWT_SETUP_CMD_XXXX in 802.11ah.h */
 	u8 flow_flags;		/* Flow attributes. See WL_TWT_FLOW_FLAG_XXXX below */
@@ -444,18 +440,18 @@ typedef struct ifx_twt_sdesc {
 	u8 channel;		/* Twt channel - Not used for now */
 	u8 negotiation_type;	/* Negotiation Type: See macros TWT_NEGO_TYPE_X */
 	u8 frame_recomm;	/* frame recommendation for broadcast TWTs - Not used for now	 */
-} ifx_twt_sdesc_t;
+};
 
 /* twt teardown descriptor */
-typedef struct ifx_twt_teardesc {
+struct ifx_twt_teardesc {
 	u8 negotiation_type;
 	u8 flow_id;		/* must be between 0 and 7 */
 	u8 bid;		/* must be between 0 and 31 */
 	u8 alltwt;		/* all twt teardown - 0 or 1 */
-} ifx_twt_teardesc_t;
+};
 
 /* HE TWT Setup command */
-typedef struct ifx_twt_setup {
+struct ifx_twt_setup {
 	/* structure control */
 	u16 version;	/* structure version */
 	u16 length;	/* data length (starting after this field) */
@@ -463,21 +459,21 @@ typedef struct ifx_twt_setup {
 	struct ether_addr peer;	/* leave it all 0s' for AP */
 	u8 pad[2];
 	/* setup descriptor */
-	ifx_twt_sdesc_t desc;
-} ifx_twt_setup_t;
+	struct ifx_twt_sdesc desc;
+};
 
 /* HE TWT Teardown command */
-typedef struct ifx_twt_teardown {
+struct ifx_twt_teardown {
 	/* structure control */
 	u16 version;	/* structure version */
 	u16 length;	/* data length (starting after this field) */
 	/* peer address */
 	struct ether_addr peer;	/* leave it all 0s' for AP */
-	ifx_twt_teardesc_t teardesc;	/* Teardown descriptor */
-} ifx_twt_teardown_t;
+	struct ifx_twt_teardesc teardesc;	/* Teardown descriptor */
+};
 
-int ifx_cfg80211_vndr_cmds_twt(struct wiphy *wiphy, 
-	struct wireless_dev *wdev, const void  *data, int len);
+int ifx_cfg80211_vndr_cmds_twt(struct wiphy *wiphy,
+			       struct wireless_dev *wdev, const void  *data, int len);
 int ifx_cfg80211_vndr_cmds_bsscolor(struct wiphy *wiphy,
 				    struct wireless_dev *wdev,
 				    const void *data, int len);
-- 
2.25.1

