Skip to content

Commit d82c568

Browse files
cyberkunjugregkh
authored andcommitted
staging: rtl8723bs: replace FIELD_OFFSET usage with offsetof in rtw_mlme_ext.c
Replace usage of the custom FIELD_OFFSET macro with the standard offsetof() macro in rtw_mlme_ext.c. This improves code readability and uses the kernel's standard mechanism. Signed-off-by: Navaneeth K <knavaneeth786@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/20251125112059.16913-5-knavaneeth786@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 2cbcfd3 commit d82c568

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/staging/rtl8723bs/core/rtw_mlme_ext.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5244,7 +5244,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
52445244
/* clear CAM */
52455245
flush_all_cam_entry(padapter);
52465246

5247-
memcpy(pnetwork, pbuf, FIELD_OFFSET(struct wlan_bssid_ex, ie_length));
5247+
memcpy(pnetwork, pbuf, offsetof(struct wlan_bssid_ex, ie_length));
52485248
pnetwork->ie_length = ((struct wlan_bssid_ex *)pbuf)->ie_length;
52495249

52505250
if (pnetwork->ie_length > MAX_IE_SZ)/* Check pbuf->ie_length */
@@ -5308,7 +5308,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
53085308
/* pmlmeinfo->assoc_AP_vendor = HT_IOT_PEER_MAX; */
53095309
pmlmeinfo->VHT_enable = 0;
53105310

5311-
memcpy(pnetwork, pbuf, FIELD_OFFSET(struct wlan_bssid_ex, ie_length));
5311+
memcpy(pnetwork, pbuf, offsetof(struct wlan_bssid_ex, ie_length));
53125312
pnetwork->ie_length = ((struct wlan_bssid_ex *)pbuf)->ie_length;
53135313

53145314
if (pnetwork->ie_length > MAX_IE_SZ)/* Check pbuf->ie_length */

0 commit comments

Comments
 (0)