module_param_string(nvram_path, nvram_path, MOD_PARAM_PATHLEN, 0);
/* No firmware required */
-bool dhd_no_fw_req;
-module_param(dhd_no_fw_req, bool, 0);
+bool brcmf_no_fw_req;
+module_param(brcmf_no_fw_req, bool, 0);
/* Error bits */
module_param(brcmf_msg_level, int, 0);
/* Spawn a thread for system ioctls (set mac, set mcast) */
-uint dhd_sysioc = true;
-module_param(dhd_sysioc, uint, 0);
+uint brcmf_sysioc = true;
+module_param(brcmf_sysioc, uint, 0);
/* Watchdog interval */
uint brcmf_watchdog_ms = 10;
module_param(brcmf_master_mode, uint, 1);
/* Watchdog thread priority, -1 to use kernel timer */
-int dhd_watchdog_prio = 97;
-module_param(dhd_watchdog_prio, int, 0);
+int brcmf_watchdog_prio = 97;
+module_param(brcmf_watchdog_prio, int, 0);
/* DPC thread priority, -1 to use tasklet */
-int dhd_dpc_prio = 98;
-module_param(dhd_dpc_prio, int, 0);
+int brcmf_dpc_prio = 98;
+module_param(brcmf_dpc_prio, int, 0);
/* DPC thread priority, -1 to use tasklet */
-extern int dhd_dongle_memsize;
-module_param(dhd_dongle_memsize, int, 0);
+extern int brcmf_dongle_memsize;
+module_param(brcmf_dongle_memsize, int, 0);
/* Contorl fw roaming */
#ifdef CUSTOMER_HW2
/* The following are specific to the SDIO dongle */
/* IOCTL response timeout */
-int dhd_ioctl_timeout_msec = IOCTL_RESP_TIMEOUT;
+int brcmf_ioctl_timeout_msec = IOCTL_RESP_TIMEOUT;
/* Idle timeout for backplane clock */
int brcmf_idletime = BRCMF_IDLETIME_TICKS;
module_param(brcmf_sdiod_drive_strength, uint, 0);
/* Tx/Rx bounds */
-extern uint dhd_txbound;
-extern uint dhd_rxbound;
-module_param(dhd_txbound, uint, 0);
-module_param(dhd_rxbound, uint, 0);
+extern uint brcmf_txbound;
+extern uint brcmf_rxbound;
+module_param(brcmf_txbound, uint, 0);
+module_param(brcmf_rxbound, uint, 0);
/* Deferred transmits */
-extern uint dhd_deferred_tx;
-module_param(dhd_deferred_tx, uint, 0);
+extern uint brcmf_deferred_tx;
+module_param(brcmf_deferred_tx, uint, 0);
#ifdef SDTEST
/* Echo packet generator (pkts/s) */
* so get rid of all our resources
*/
#ifdef DHD_SCHED
- if (dhd_watchdog_prio > 0) {
+ if (brcmf_watchdog_prio > 0) {
struct sched_param param;
- param.sched_priority = (dhd_watchdog_prio < MAX_RT_PRIO) ?
- dhd_watchdog_prio : (MAX_RT_PRIO - 1);
+ param.sched_priority = (brcmf_watchdog_prio < MAX_RT_PRIO) ?
+ brcmf_watchdog_prio : (MAX_RT_PRIO - 1);
sched_setscheduler(current, SCHED_FIFO, ¶m);
}
#endif /* DHD_SCHED */
* so get rid of all our resources
*/
#ifdef DHD_SCHED
- if (dhd_dpc_prio > 0) {
+ if (brcmf_dpc_prio > 0) {
struct sched_param param;
param.sched_priority =
- (dhd_dpc_prio <
- MAX_RT_PRIO) ? dhd_dpc_prio : (MAX_RT_PRIO - 1);
+ (brcmf_dpc_prio <
+ MAX_RT_PRIO) ? brcmf_dpc_prio : (MAX_RT_PRIO - 1);
sched_setscheduler(current, SCHED_FIFO, ¶m);
}
#endif /* DHD_SCHED */
DHD_ERROR(("wl_cfg80211_attach failed\n"));
goto fail;
}
- if (!dhd_no_fw_req) {
+ if (!brcmf_no_fw_req) {
strcpy(brcmf_fw_path, wl_cfg80211_get_fwname());
strcpy(brcmf_nv_path, wl_cfg80211_get_nvramname());
}
/* Initialize thread based operation and lock */
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;
else
dhd->threads_only = false;
- if (dhd_dpc_prio >= 0) {
+ if (brcmf_dpc_prio >= 0) {
/* Initialize watchdog thread */
sema_init(&dhd->watchdog_sem, 0);
dhd->watchdog_tsk = kthread_run(brcmf_watchdog_thread, dhd,
}
/* Set up the bottom half handler */
- if (dhd_dpc_prio >= 0) {
+ if (brcmf_dpc_prio >= 0) {
/* Initialize DPC thread */
sema_init(&dhd->dpc_sem, 0);
dhd->dpc_tsk = kthread_run(brcmf_dpc_thread, dhd, "dhd_dpc");
dhd->dpc_tsk = NULL;
}
- if (dhd_sysioc) {
+ if (brcmf_sysioc) {
sema_init(&dhd->sysioc_sem, 0);
dhd->sysioc_tsk = kthread_run(_brcmf_sysioc_thread, dhd,
"_dhd_sysioc");
/* Sanity check on the module parameters */
do {
/* 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;
/* If both watchdog and DPC are threads, TX must be deferred */
- if ((dhd_watchdog_prio >= 0) && (dhd_dpc_prio >= 0)
- && dhd_deferred_tx)
+ if ((brcmf_watchdog_prio >= 0) && (brcmf_dpc_prio >= 0)
+ && brcmf_deferred_tx)
break;
DHD_ERROR(("Invalid module parameters.\n"));
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)
{
- 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)
{
dhd_info_t *dhd = (dhd_info_t *) (pub->info);
DECLARE_WAITQUEUE(wait, current);
- int timeout = dhd_ioctl_timeout_msec;
+ int timeout = brcmf_ioctl_timeout_msec;
/* Convert timeout in millsecond to jiffies */
timeout = timeout * HZ / 1000;
{
struct file *fp;
- if (!dhd_no_fw_req)
+ if (!brcmf_no_fw_req)
return wl_cfg80211_request_fw(filename);
fp = filp_open(filename, O_RDONLY, 0);
struct file *fp = (struct file *)image;
int rdlen;
- if (!dhd_no_fw_req)
+ if (!brcmf_no_fw_req)
return wl_cfg80211_read_fw(buf, len);
if (!image)
void brcmf_os_close_image(void *image)
{
- if (!dhd_no_fw_req)
+ if (!brcmf_no_fw_req)
return wl_cfg80211_release_fw();
if (image)
filp_close((struct file *)image, NULL);
#endif /* DHD_DEBUG */
/* Deferred transmit */
-const uint dhd_deferred_tx = 1;
+const uint brcmf_deferred_tx = 1;
/* Tx/Rx bounds */
-uint dhd_txbound;
-uint dhd_rxbound;
+uint brcmf_txbound;
+uint brcmf_rxbound;
uint dhd_txminmax;
/* override the RAM size if possible */
#define DONGLE_MIN_MEMSIZE (128 * 1024)
-int dhd_dongle_memsize;
+int brcmf_dongle_memsize;
static bool dhd_alignctl;
s32 min_size = DONGLE_MIN_MEMSIZE;
/* Restrict the memsize to user specified limit */
DHD_ERROR(("user: Restrict the dongle ram size to %d, min %d\n",
- dhd_dongle_memsize, min_size));
- if ((dhd_dongle_memsize > min_size) &&
- (dhd_dongle_memsize < (s32) bus->orig_ramsize))
- bus->ramsize = dhd_dongle_memsize;
+ brcmf_dongle_memsize, min_size));
+ if ((brcmf_dongle_memsize > min_size) &&
+ (brcmf_dongle_memsize < (s32) bus->orig_ramsize))
+ bus->ramsize = brcmf_dongle_memsize;
}
static int brcmf_sdbrcm_set_siaddr_window(dhd_bus_t *bus, u32 address)
/* Check for existing queue, current flow-control,
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->flowcontrol & NBITVAL(prec))
|| (bus->clkstate != CLK_AVAIL)) {
qcount[prec] = pktq_plen(&bus->txq, prec);
#endif
/* 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;
brcmf_sched_dpc(bus->dhd);
}
break;
case IOV_GVAL(IOV_TXBOUND):
- int_val = (s32) dhd_txbound;
+ int_val = (s32) brcmf_txbound;
memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_TXBOUND):
- dhd_txbound = (uint) int_val;
+ brcmf_txbound = (uint) int_val;
break;
case IOV_GVAL(IOV_RXBOUND):
- int_val = (s32) dhd_rxbound;
+ int_val = (s32) brcmf_rxbound;
memcpy(arg, &int_val, val_size);
break;
case IOV_SVAL(IOV_RXBOUND):
- dhd_rxbound = (uint) int_val;
+ brcmf_rxbound = (uint) int_val;
break;
case IOV_GVAL(IOV_TXMINMAX):
struct sdpcmd_regs *regs = bus->regs;
u32 intstatus, newstatus = 0;
uint retries = 0;
- uint rxlimit = dhd_rxbound; /* Rx frames to read before resched */
- uint txlimit = dhd_txbound; /* Tx frames to send before resched */
+ uint rxlimit = brcmf_rxbound; /* Rx frames to read before resched */
+ uint txlimit = brcmf_txbound; /* Tx frames to send before resched */
uint framecnt = 0; /* Temporary counter of tx/rx frames */
bool rxdone = true; /* Flag for no more read data */
bool resched = false; /* Flag indicating resched wanted */
* first time that the driver is initialized vs subsequent
* initializations.
*/
- dhd_txbound = DHD_TXBOUND;
- dhd_rxbound = DHD_RXBOUND;
+ brcmf_txbound = DHD_TXBOUND;
+ brcmf_rxbound = DHD_RXBOUND;
dhd_alignctl = true;
sd1idle = true;
dhd_readahead = true;
retrydata = false;
- dhd_dongle_memsize = 0;
+ brcmf_dongle_memsize = 0;
dhd_txminmax = DHD_TXMINMAX;
forcealign = true;
goto fail;
}
bus->ramsize = bus->orig_ramsize;
- if (dhd_dongle_memsize)
- brcmf_sdbrcm_setmemsize(bus, dhd_dongle_memsize);
+ if (brcmf_dongle_memsize)
+ brcmf_sdbrcm_setmemsize(bus, brcmf_dongle_memsize);
DHD_ERROR(("DHD: dongle ram size is set to %d(orig %d)\n",
bus->ramsize, bus->orig_ramsize));