mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 11:06:41 -05:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
2cbcfd3fce
commit
d82c5681df
@@ -5244,7 +5244,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
|
||||
/* clear CAM */
|
||||
flush_all_cam_entry(padapter);
|
||||
|
||||
memcpy(pnetwork, pbuf, FIELD_OFFSET(struct wlan_bssid_ex, ie_length));
|
||||
memcpy(pnetwork, pbuf, offsetof(struct wlan_bssid_ex, ie_length));
|
||||
pnetwork->ie_length = ((struct wlan_bssid_ex *)pbuf)->ie_length;
|
||||
|
||||
if (pnetwork->ie_length > MAX_IE_SZ)/* Check pbuf->ie_length */
|
||||
@@ -5308,7 +5308,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
|
||||
/* pmlmeinfo->assoc_AP_vendor = HT_IOT_PEER_MAX; */
|
||||
pmlmeinfo->VHT_enable = 0;
|
||||
|
||||
memcpy(pnetwork, pbuf, FIELD_OFFSET(struct wlan_bssid_ex, ie_length));
|
||||
memcpy(pnetwork, pbuf, offsetof(struct wlan_bssid_ex, ie_length));
|
||||
pnetwork->ie_length = ((struct wlan_bssid_ex *)pbuf)->ie_length;
|
||||
|
||||
if (pnetwork->ie_length > MAX_IE_SZ)/* Check pbuf->ie_length */
|
||||
|
||||
Reference in New Issue
Block a user