wifi: mwifiex: Constify struct mwifiex_if_ops
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 19 Jan 2025 17:48:39 +0000 (18:48 +0100)
committerKalle Valo <kvalo@kernel.org>
Tue, 28 Jan 2025 18:12:40 +0000 (20:12 +0200)
commite50e30fa966e7f1ef407d5cdda22de629d64e82b
tree9aa646001e6cb40c312b14dbad60f84c0b2a5629
parent59372af69d4d71e6487614f1b35712cf241eadb4
wifi: mwifiex: Constify struct mwifiex_if_ops

'struct mwifiex_if_ops' are not modified in these drivers.

Constifying these structures moves some data to a read-only section, so
increase overall security, especially when the structure holds some
function pointers.

On a x86_64, with allmodconfig, as an example:
Before:
======
   text    data     bss     dec     hex filename
  61439    4367      32   65838   1012e drivers/net/wireless/marvell/mwifiex/pcie.o

After:
=====
   text    data     bss     dec     hex filename
  61699    4127      32   65858   10142 drivers/net/wireless/marvell/mwifiex/pcie.o

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/03d524b72f20a0302e4de5e0ebdc20ab69469dec.1737308889.git.christophe.jaillet@wanadoo.fr
drivers/net/wireless/marvell/mwifiex/main.c
drivers/net/wireless/marvell/mwifiex/main.h
drivers/net/wireless/marvell/mwifiex/pcie.c
drivers/net/wireless/marvell/mwifiex/sdio.c
drivers/net/wireless/marvell/mwifiex/usb.c