netdev->dev_addr will be const soon, make sure the qualifier is respected by drivers. Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx> --- drivers/staging/rtl8712/os_intfs.c | 3 ++- drivers/staging/rtl8712/rtl871x_cmd.c | 2 +- drivers/staging/rtl8712/rtl871x_cmd.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/rtl8712/os_intfs.c b/drivers/staging/rtl8712/os_intfs.c index beb9137c198c..d15d52c0d1a7 100644 --- a/drivers/staging/rtl8712/os_intfs.c +++ b/drivers/staging/rtl8712/os_intfs.c @@ -388,7 +388,8 @@ static int netdev_open(struct net_device *pnetdev) * address. */ msleep(200); - r8712_setMacAddr_cmd(padapter, (u8 *)pnetdev->dev_addr); + r8712_setMacAddr_cmd(padapter, + (const u8 *)pnetdev->dev_addr); /* * The "myid" function will get the wifi mac address * from eeprompriv structure instead of netdev diff --git a/drivers/staging/rtl8712/rtl871x_cmd.c b/drivers/staging/rtl8712/rtl871x_cmd.c index 75716f59044d..acda930722b2 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.c +++ b/drivers/staging/rtl8712/rtl871x_cmd.c @@ -554,7 +554,7 @@ void r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key) r8712_enqueue_cmd(pcmdpriv, ph2c); } -void r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr) +void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr) { struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_obj *ph2c; diff --git a/drivers/staging/rtl8712/rtl871x_cmd.h b/drivers/staging/rtl8712/rtl871x_cmd.h index bf6f0c6a86e5..ddd69c4ae208 100644 --- a/drivers/staging/rtl8712/rtl871x_cmd.h +++ b/drivers/staging/rtl8712/rtl871x_cmd.h @@ -718,7 +718,7 @@ struct DisconnectCtrlEx_param { #define H2C_CMD_OVERFLOW 0x06 #define H2C_RESERVED 0x07 -void r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr); +void r8712_setMacAddr_cmd(struct _adapter *padapter, const u8 *mac_addr); u8 r8712_sitesurvey_cmd(struct _adapter *padapter, struct ndis_802_11_ssid *pssid); int r8712_createbss_cmd(struct _adapter *padapter); -- 2.31.1