From: Dmitry Shmidt Date: Wed, 20 Jul 2011 17:31:30 +0000 (-0700) Subject: net: wireless: bcmdhd: Allow firmware_path parameter change X-Git-Tag: firefly_0821_release~7613^2~404 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3a08bc6c0627d7788217796dfc64c367ca1e53e1;p=firefly-linux-kernel-4.4.55.git net: wireless: bcmdhd: Allow firmware_path parameter change Signed-off-by: Dmitry Shmidt --- diff --git a/drivers/net/wireless/bcmdhd/dhd_linux.c b/drivers/net/wireless/bcmdhd/dhd_linux.c index ff9f9fa9c21a..e318017ff803 100644 --- a/drivers/net/wireless/bcmdhd/dhd_linux.c +++ b/drivers/net/wireless/bcmdhd/dhd_linux.c @@ -290,7 +290,7 @@ module_param(dhd_sysioc, uint, 0); module_param(dhd_msg_level, int, 0); /* load firmware and/or nvram values from the filesystem */ -module_param_string(firmware_path, firmware_path, MOD_PARAM_PATHLEN, 0); +module_param_string(firmware_path, firmware_path, MOD_PARAM_PATHLEN, 0660); module_param_string(nvram_path, nvram_path, MOD_PARAM_PATHLEN, 0); /* Watchdog interval */ @@ -2223,6 +2223,13 @@ dhd_open(struct net_device *net) int ifidx; int32 ret = 0; + /* Update FW path if it was changed */ + if ((firmware_path != NULL) && (firmware_path[0] != '\0')) { + if (firmware_path[strlen(firmware_path)-1] == '\n') + firmware_path[strlen(firmware_path)-1] = '\0'; + strcpy(fw_path, firmware_path); + firmware_path[0] = '\0'; + } #if !defined(WL_CFG80211) /** Force start if ifconfig_up gets called before START command * We keep WEXT's wl_control_wl_start to provide backward compatibility