diff --git a/drivers/net/wireless/qualcomm/wcn39xx/qcacld-3.0/Kbuild b/drivers/net/wireless/qualcomm/wcn39xx/qcacld-3.0/Kbuild index 951862c31c59..54ab4ad22aff 100755 --- a/drivers/net/wireless/qualcomm/wcn39xx/qcacld-3.0/Kbuild +++ b/drivers/net/wireless/qualcomm/wcn39xx/qcacld-3.0/Kbuild @@ -2977,7 +2977,9 @@ cppflags-$(CONFIG_WLAN_HANG_EVENT) += -DHIF_BUS_LOG_INFO cppflags-$(CONFIG_WLAN_HANG_EVENT) += -DDP_SUPPORT_RECOVERY_NOTIFY #endof dummy flags -ccflags-$(CONFIG_ENABLE_SIZE_OPTIMIZE) += -Os +ifndef CONFIG_CC_OPTIMIZE_FOR_SIZE +ccflags-y += -O2 +endif # DFS component cppflags-$(CONFIG_WLAN_DFS_STATIC_MEM_ALLOC) += -DWLAN_DFS_STATIC_MEM_ALLOC