Commit 7af9d0ca authored by Arend van Spriel's avatar Arend van Spriel Committed by Greg Kroah-Hartman

staging: brcm80211: rename more brcmfmac module parameters

Renamed remaining brcmfmac module parameters to more consistent
naming convention.
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Reviewed-by: default avatarRoland Vossen <rvossen@broadcom.com>
Reviewed-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent db62efcc
...@@ -248,15 +248,15 @@ module_param_string(firmware_path, firmware_path, MOD_PARAM_PATHLEN, 0); ...@@ -248,15 +248,15 @@ module_param_string(firmware_path, firmware_path, MOD_PARAM_PATHLEN, 0);
module_param_string(nvram_path, nvram_path, MOD_PARAM_PATHLEN, 0); module_param_string(nvram_path, nvram_path, MOD_PARAM_PATHLEN, 0);
/* No firmware required */ /* No firmware required */
bool dhd_no_fw_req; bool brcmf_no_fw_req;
module_param(dhd_no_fw_req, bool, 0); module_param(brcmf_no_fw_req, bool, 0);
/* Error bits */ /* Error bits */
module_param(brcmf_msg_level, int, 0); module_param(brcmf_msg_level, int, 0);
/* Spawn a thread for system ioctls (set mac, set mcast) */ /* Spawn a thread for system ioctls (set mac, set mcast) */
uint dhd_sysioc = true; uint brcmf_sysioc = true;
module_param(dhd_sysioc, uint, 0); module_param(brcmf_sysioc, uint, 0);
/* Watchdog interval */ /* Watchdog interval */
uint brcmf_watchdog_ms = 10; uint brcmf_watchdog_ms = 10;
...@@ -290,16 +290,16 @@ uint brcmf_master_mode = true; ...@@ -290,16 +290,16 @@ uint brcmf_master_mode = true;
module_param(brcmf_master_mode, uint, 1); module_param(brcmf_master_mode, uint, 1);
/* Watchdog thread priority, -1 to use kernel timer */ /* Watchdog thread priority, -1 to use kernel timer */
int dhd_watchdog_prio = 97; int brcmf_watchdog_prio = 97;
module_param(dhd_watchdog_prio, int, 0); module_param(brcmf_watchdog_prio, int, 0);
/* DPC thread priority, -1 to use tasklet */ /* DPC thread priority, -1 to use tasklet */
int dhd_dpc_prio = 98; int brcmf_dpc_prio = 98;
module_param(dhd_dpc_prio, int, 0); module_param(brcmf_dpc_prio, int, 0);
/* DPC thread priority, -1 to use tasklet */ /* DPC thread priority, -1 to use tasklet */
extern int dhd_dongle_memsize; extern int brcmf_dongle_memsize;
module_param(dhd_dongle_memsize, int, 0); module_param(brcmf_dongle_memsize, int, 0);
/* Contorl fw roaming */ /* Contorl fw roaming */
#ifdef CUSTOMER_HW2 #ifdef CUSTOMER_HW2
...@@ -318,7 +318,7 @@ module_param_string(iface_name, iface_name, IFNAMSIZ, 0); ...@@ -318,7 +318,7 @@ module_param_string(iface_name, iface_name, IFNAMSIZ, 0);
/* The following are specific to the SDIO dongle */ /* The following are specific to the SDIO dongle */
/* IOCTL response timeout */ /* IOCTL response timeout */
int dhd_ioctl_timeout_msec = IOCTL_RESP_TIMEOUT; int brcmf_ioctl_timeout_msec = IOCTL_RESP_TIMEOUT;
/* Idle timeout for backplane clock */ /* Idle timeout for backplane clock */
int brcmf_idletime = BRCMF_IDLETIME_TICKS; int brcmf_idletime = BRCMF_IDLETIME_TICKS;
...@@ -337,14 +337,14 @@ uint brcmf_sdiod_drive_strength = 6; ...@@ -337,14 +337,14 @@ uint brcmf_sdiod_drive_strength = 6;
module_param(brcmf_sdiod_drive_strength, uint, 0); module_param(brcmf_sdiod_drive_strength, uint, 0);
/* Tx/Rx bounds */ /* Tx/Rx bounds */
extern uint dhd_txbound; extern uint brcmf_txbound;
extern uint dhd_rxbound; extern uint brcmf_rxbound;
module_param(dhd_txbound, uint, 0); module_param(brcmf_txbound, uint, 0);
module_param(dhd_rxbound, uint, 0); module_param(brcmf_rxbound, uint, 0);
/* Deferred transmits */ /* Deferred transmits */
extern uint dhd_deferred_tx; extern uint brcmf_deferred_tx;
module_param(dhd_deferred_tx, uint, 0); module_param(brcmf_deferred_tx, uint, 0);
#ifdef SDTEST #ifdef SDTEST
/* Echo packet generator (pkts/s) */ /* Echo packet generator (pkts/s) */
...@@ -1204,10 +1204,10 @@ static int brcmf_watchdog_thread(void *data) ...@@ -1204,10 +1204,10 @@ static int brcmf_watchdog_thread(void *data)
* so get rid of all our resources * so get rid of all our resources
*/ */
#ifdef DHD_SCHED #ifdef DHD_SCHED
if (dhd_watchdog_prio > 0) { if (brcmf_watchdog_prio > 0) {
struct sched_param param; struct sched_param param;
param.sched_priority = (dhd_watchdog_prio < MAX_RT_PRIO) ? param.sched_priority = (brcmf_watchdog_prio < MAX_RT_PRIO) ?
dhd_watchdog_prio : (MAX_RT_PRIO - 1); brcmf_watchdog_prio : (MAX_RT_PRIO - 1);
sched_setscheduler(current, SCHED_FIFO, &param); sched_setscheduler(current, SCHED_FIFO, &param);
} }
#endif /* DHD_SCHED */ #endif /* DHD_SCHED */
...@@ -1264,11 +1264,11 @@ static int brcmf_dpc_thread(void *data) ...@@ -1264,11 +1264,11 @@ static int brcmf_dpc_thread(void *data)
* so get rid of all our resources * so get rid of all our resources
*/ */
#ifdef DHD_SCHED #ifdef DHD_SCHED
if (dhd_dpc_prio > 0) { if (brcmf_dpc_prio > 0) {
struct sched_param param; struct sched_param param;
param.sched_priority = param.sched_priority =
(dhd_dpc_prio < (brcmf_dpc_prio <
MAX_RT_PRIO) ? dhd_dpc_prio : (MAX_RT_PRIO - 1); MAX_RT_PRIO) ? brcmf_dpc_prio : (MAX_RT_PRIO - 1);
sched_setscheduler(current, SCHED_FIFO, &param); sched_setscheduler(current, SCHED_FIFO, &param);
} }
#endif /* DHD_SCHED */ #endif /* DHD_SCHED */
...@@ -1843,7 +1843,7 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen) ...@@ -1843,7 +1843,7 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen)
DHD_ERROR(("wl_cfg80211_attach failed\n")); DHD_ERROR(("wl_cfg80211_attach failed\n"));
goto fail; goto fail;
} }
if (!dhd_no_fw_req) { if (!brcmf_no_fw_req) {
strcpy(brcmf_fw_path, wl_cfg80211_get_fwname()); strcpy(brcmf_fw_path, wl_cfg80211_get_fwname());
strcpy(brcmf_nv_path, wl_cfg80211_get_nvramname()); strcpy(brcmf_nv_path, wl_cfg80211_get_nvramname());
} }
...@@ -1855,12 +1855,12 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen) ...@@ -1855,12 +1855,12 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen)
/* Initialize thread based operation and lock */ /* Initialize thread based operation and lock */
sema_init(&dhd->sdsem, 1); sema_init(&dhd->sdsem, 1);
if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0)) if ((brcmf_watchdog_prio >= 0) && (brcmf_dpc_prio >= 0))
dhd->threads_only = true; dhd->threads_only = true;
else else
dhd->threads_only = false; dhd->threads_only = false;
if (dhd_dpc_prio >= 0) { if (brcmf_dpc_prio >= 0) {
/* Initialize watchdog thread */ /* Initialize watchdog thread */
sema_init(&dhd->watchdog_sem, 0); sema_init(&dhd->watchdog_sem, 0);
dhd->watchdog_tsk = kthread_run(brcmf_watchdog_thread, dhd, dhd->watchdog_tsk = kthread_run(brcmf_watchdog_thread, dhd,
...@@ -1875,7 +1875,7 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen) ...@@ -1875,7 +1875,7 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen)
} }
/* Set up the bottom half handler */ /* Set up the bottom half handler */
if (dhd_dpc_prio >= 0) { if (brcmf_dpc_prio >= 0) {
/* Initialize DPC thread */ /* Initialize DPC thread */
sema_init(&dhd->dpc_sem, 0); sema_init(&dhd->dpc_sem, 0);
dhd->dpc_tsk = kthread_run(brcmf_dpc_thread, dhd, "dhd_dpc"); dhd->dpc_tsk = kthread_run(brcmf_dpc_thread, dhd, "dhd_dpc");
...@@ -1889,7 +1889,7 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen) ...@@ -1889,7 +1889,7 @@ dhd_pub_t *brcmf_attach(struct dhd_bus *bus, uint bus_hdrlen)
dhd->dpc_tsk = NULL; dhd->dpc_tsk = NULL;
} }
if (dhd_sysioc) { if (brcmf_sysioc) {
sema_init(&dhd->sysioc_sem, 0); sema_init(&dhd->sysioc_sem, 0);
dhd->sysioc_tsk = kthread_run(_brcmf_sysioc_thread, dhd, dhd->sysioc_tsk = kthread_run(_brcmf_sysioc_thread, dhd,
"_dhd_sysioc"); "_dhd_sysioc");
...@@ -2228,12 +2228,12 @@ static int __init brcmf_module_init(void) ...@@ -2228,12 +2228,12 @@ static int __init brcmf_module_init(void)
/* Sanity check on the module parameters */ /* Sanity check on the module parameters */
do { do {
/* Both watchdog and DPC as tasklets are ok */ /* Both watchdog and DPC as tasklets are ok */
if ((dhd_watchdog_prio < 0) && (dhd_dpc_prio < 0)) if ((brcmf_watchdog_prio < 0) && (brcmf_dpc_prio < 0))
break; break;
/* If both watchdog and DPC are threads, TX must be deferred */ /* If both watchdog and DPC are threads, TX must be deferred */
if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0) if ((brcmf_watchdog_prio >= 0) && (brcmf_dpc_prio >= 0)
&& dhd_deferred_tx) && brcmf_deferred_tx)
break; break;
DHD_ERROR(("Invalid module parameters.\n")); DHD_ERROR(("Invalid module parameters.\n"));
...@@ -2307,19 +2307,19 @@ int brcmf_os_proto_unblock(dhd_pub_t *pub) ...@@ -2307,19 +2307,19 @@ int brcmf_os_proto_unblock(dhd_pub_t *pub)
unsigned int brcmf_os_get_ioctl_resp_timeout(void) unsigned int brcmf_os_get_ioctl_resp_timeout(void)
{ {
return (unsigned int)dhd_ioctl_timeout_msec; return (unsigned int)brcmf_ioctl_timeout_msec;
} }
void brcmf_os_set_ioctl_resp_timeout(unsigned int timeout_msec) void brcmf_os_set_ioctl_resp_timeout(unsigned int timeout_msec)
{ {
dhd_ioctl_timeout_msec = (int)timeout_msec; brcmf_ioctl_timeout_msec = (int)timeout_msec;
} }
int brcmf_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition, bool *pending) int brcmf_os_ioctl_resp_wait(dhd_pub_t *pub, uint *condition, bool *pending)
{ {
dhd_info_t *dhd = (dhd_info_t *) (pub->info); dhd_info_t *dhd = (dhd_info_t *) (pub->info);
DECLARE_WAITQUEUE(wait, current); DECLARE_WAITQUEUE(wait, current);
int timeout = dhd_ioctl_timeout_msec; int timeout = brcmf_ioctl_timeout_msec;
/* Convert timeout in millsecond to jiffies */ /* Convert timeout in millsecond to jiffies */
timeout = timeout * HZ / 1000; timeout = timeout * HZ / 1000;
...@@ -2399,7 +2399,7 @@ void *brcmf_os_open_image(char *filename) ...@@ -2399,7 +2399,7 @@ void *brcmf_os_open_image(char *filename)
{ {
struct file *fp; struct file *fp;
if (!dhd_no_fw_req) if (!brcmf_no_fw_req)
return wl_cfg80211_request_fw(filename); return wl_cfg80211_request_fw(filename);
fp = filp_open(filename, O_RDONLY, 0); fp = filp_open(filename, O_RDONLY, 0);
...@@ -2420,7 +2420,7 @@ int brcmf_os_get_image_block(char *buf, int len, void *image) ...@@ -2420,7 +2420,7 @@ int brcmf_os_get_image_block(char *buf, int len, void *image)
struct file *fp = (struct file *)image; struct file *fp = (struct file *)image;
int rdlen; int rdlen;
if (!dhd_no_fw_req) if (!brcmf_no_fw_req)
return wl_cfg80211_read_fw(buf, len); return wl_cfg80211_read_fw(buf, len);
if (!image) if (!image)
...@@ -2435,7 +2435,7 @@ int brcmf_os_get_image_block(char *buf, int len, void *image) ...@@ -2435,7 +2435,7 @@ int brcmf_os_get_image_block(char *buf, int len, void *image)
void brcmf_os_close_image(void *image) void brcmf_os_close_image(void *image)
{ {
if (!dhd_no_fw_req) if (!brcmf_no_fw_req)
return wl_cfg80211_release_fw(); return wl_cfg80211_release_fw();
if (image) if (image)
filp_close((struct file *)image, NULL); filp_close((struct file *)image, NULL);
......
...@@ -650,16 +650,16 @@ static int tx_packets[NUMPRIO]; ...@@ -650,16 +650,16 @@ static int tx_packets[NUMPRIO];
#endif /* DHD_DEBUG */ #endif /* DHD_DEBUG */
/* Deferred transmit */ /* Deferred transmit */
const uint dhd_deferred_tx = 1; const uint brcmf_deferred_tx = 1;
/* Tx/Rx bounds */ /* Tx/Rx bounds */
uint dhd_txbound; uint brcmf_txbound;
uint dhd_rxbound; uint brcmf_rxbound;
uint dhd_txminmax; uint dhd_txminmax;
/* override the RAM size if possible */ /* override the RAM size if possible */
#define DONGLE_MIN_MEMSIZE (128 * 1024) #define DONGLE_MIN_MEMSIZE (128 * 1024)
int dhd_dongle_memsize; int brcmf_dongle_memsize;
static bool dhd_alignctl; static bool dhd_alignctl;
...@@ -807,10 +807,10 @@ static void brcmf_sdbrcm_setmemsize(struct dhd_bus *bus, int mem_size) ...@@ -807,10 +807,10 @@ static void brcmf_sdbrcm_setmemsize(struct dhd_bus *bus, int mem_size)
s32 min_size = DONGLE_MIN_MEMSIZE; s32 min_size = DONGLE_MIN_MEMSIZE;
/* Restrict the memsize to user specified limit */ /* Restrict the memsize to user specified limit */
DHD_ERROR(("user: Restrict the dongle ram size to %d, min %d\n", DHD_ERROR(("user: Restrict the dongle ram size to %d, min %d\n",
dhd_dongle_memsize, min_size)); brcmf_dongle_memsize, min_size));
if ((dhd_dongle_memsize > min_size) && if ((brcmf_dongle_memsize > min_size) &&
(dhd_dongle_memsize < (s32) bus->orig_ramsize)) (brcmf_dongle_memsize < (s32) bus->orig_ramsize))
bus->ramsize = dhd_dongle_memsize; bus->ramsize = brcmf_dongle_memsize;
} }
static int brcmf_sdbrcm_set_siaddr_window(dhd_bus_t *bus, u32 address) static int brcmf_sdbrcm_set_siaddr_window(dhd_bus_t *bus, u32 address)
...@@ -1363,7 +1363,7 @@ int brcmf_sdbrcm_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt) ...@@ -1363,7 +1363,7 @@ int brcmf_sdbrcm_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt)
/* Check for existing queue, current flow-control, /* Check for existing queue, current flow-control,
pending event, or pending clock */ pending event, or pending clock */
if (dhd_deferred_tx || bus->fcstate || pktq_len(&bus->txq) if (brcmf_deferred_tx || bus->fcstate || pktq_len(&bus->txq)
|| bus->dpc_sched || (!DATAOK(bus)) || bus->dpc_sched || (!DATAOK(bus))
|| (bus->flowcontrol & NBITVAL(prec)) || (bus->flowcontrol & NBITVAL(prec))
|| (bus->clkstate != CLK_AVAIL)) { || (bus->clkstate != CLK_AVAIL)) {
...@@ -1392,7 +1392,7 @@ int brcmf_sdbrcm_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt) ...@@ -1392,7 +1392,7 @@ int brcmf_sdbrcm_bus_txdata(struct dhd_bus *bus, struct sk_buff *pkt)
qcount[prec] = pktq_plen(&bus->txq, prec); qcount[prec] = pktq_plen(&bus->txq, prec);
#endif #endif
/* Schedule DPC if needed to send queued packet(s) */ /* Schedule DPC if needed to send queued packet(s) */
if (dhd_deferred_tx && !bus->dpc_sched) { if (brcmf_deferred_tx && !bus->dpc_sched) {
bus->dpc_sched = true; bus->dpc_sched = true;
brcmf_sched_dpc(bus->dhd); brcmf_sched_dpc(bus->dhd);
} }
...@@ -2703,21 +2703,21 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid, ...@@ -2703,21 +2703,21 @@ brcmf_sdbrcm_doiovar(dhd_bus_t *bus, const struct brcmu_iovar *vi, u32 actionid,
break; break;
case IOV_GVAL(IOV_TXBOUND): case IOV_GVAL(IOV_TXBOUND):
int_val = (s32) dhd_txbound; int_val = (s32) brcmf_txbound;
memcpy(arg, &int_val, val_size); memcpy(arg, &int_val, val_size);
break; break;
case IOV_SVAL(IOV_TXBOUND): case IOV_SVAL(IOV_TXBOUND):
dhd_txbound = (uint) int_val; brcmf_txbound = (uint) int_val;
break; break;
case IOV_GVAL(IOV_RXBOUND): case IOV_GVAL(IOV_RXBOUND):
int_val = (s32) dhd_rxbound; int_val = (s32) brcmf_rxbound;
memcpy(arg, &int_val, val_size); memcpy(arg, &int_val, val_size);
break; break;
case IOV_SVAL(IOV_RXBOUND): case IOV_SVAL(IOV_RXBOUND):
dhd_rxbound = (uint) int_val; brcmf_rxbound = (uint) int_val;
break; break;
case IOV_GVAL(IOV_TXMINMAX): case IOV_GVAL(IOV_TXMINMAX):
...@@ -4443,8 +4443,8 @@ bool brcmf_sdbrcm_dpc(dhd_bus_t *bus) ...@@ -4443,8 +4443,8 @@ bool brcmf_sdbrcm_dpc(dhd_bus_t *bus)
struct sdpcmd_regs *regs = bus->regs; struct sdpcmd_regs *regs = bus->regs;
u32 intstatus, newstatus = 0; u32 intstatus, newstatus = 0;
uint retries = 0; uint retries = 0;
uint rxlimit = dhd_rxbound; /* Rx frames to read before resched */ uint rxlimit = brcmf_rxbound; /* Rx frames to read before resched */
uint txlimit = dhd_txbound; /* Tx frames to send before resched */ uint txlimit = brcmf_txbound; /* Tx frames to send before resched */
uint framecnt = 0; /* Temporary counter of tx/rx frames */ uint framecnt = 0; /* Temporary counter of tx/rx frames */
bool rxdone = true; /* Flag for no more read data */ bool rxdone = true; /* Flag for no more read data */
bool resched = false; /* Flag indicating resched wanted */ bool resched = false; /* Flag indicating resched wanted */
...@@ -5201,13 +5201,13 @@ static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no, ...@@ -5201,13 +5201,13 @@ static void *brcmf_sdbrcm_probe(u16 venid, u16 devid, u16 bus_no,
* first time that the driver is initialized vs subsequent * first time that the driver is initialized vs subsequent
* initializations. * initializations.
*/ */
dhd_txbound = DHD_TXBOUND; brcmf_txbound = DHD_TXBOUND;
dhd_rxbound = DHD_RXBOUND; brcmf_rxbound = DHD_RXBOUND;
dhd_alignctl = true; dhd_alignctl = true;
sd1idle = true; sd1idle = true;
dhd_readahead = true; dhd_readahead = true;
retrydata = false; retrydata = false;
dhd_dongle_memsize = 0; brcmf_dongle_memsize = 0;
dhd_txminmax = DHD_TXMINMAX; dhd_txminmax = DHD_TXMINMAX;
forcealign = true; forcealign = true;
...@@ -5402,8 +5402,8 @@ brcmf_sdbrcm_probe_attach(struct dhd_bus *bus, void *sdh, void *regsva, ...@@ -5402,8 +5402,8 @@ brcmf_sdbrcm_probe_attach(struct dhd_bus *bus, void *sdh, void *regsva,
goto fail; goto fail;
} }
bus->ramsize = bus->orig_ramsize; bus->ramsize = bus->orig_ramsize;
if (dhd_dongle_memsize) if (brcmf_dongle_memsize)
brcmf_sdbrcm_setmemsize(bus, dhd_dongle_memsize); brcmf_sdbrcm_setmemsize(bus, brcmf_dongle_memsize);
DHD_ERROR(("DHD: dongle ram size is set to %d(orig %d)\n", DHD_ERROR(("DHD: dongle ram size is set to %d(orig %d)\n",
bus->ramsize, bus->orig_ramsize)); bus->ramsize, bus->orig_ramsize));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment