module_param(dhd_idletime, int, 0);
/* Use polling */
-uint dhd_poll = false;
+uint dhd_poll;
module_param(dhd_poll, uint, 0);
/* Use cfg80211 */
ASSERT(dhd && (ifidx < DHD_MAX_IFS));
ifp = dhd->iflist[ifidx];
- if (!ifp && !(ifp = kmalloc(sizeof(dhd_if_t), GFP_ATOMIC))) {
- DHD_ERROR(("%s: OOM - dhd_if_t\n", __func__));
- return -ENOMEM;
+ if (!ifp) {
+ ifp = kmalloc(sizeof(dhd_if_t), GFP_ATOMIC);
+ if (!ifp) {
+ DHD_ERROR(("%s: OOM - dhd_if_t\n", __func__));
+ return -ENOMEM;
+ }
}
memset(ifp, 0, sizeof(dhd_if_t));
#define WL_PRIV_GET() \
({ \
- struct wl_iface *ci; \
- if (unlikely(!(wl_cfg80211_dev && \
- (ci = wl_get_drvdata(wl_cfg80211_dev))))) { \
+ struct wl_iface *ci = wl_get_drvdata(wl_cfg80211_dev); \
+ if (unlikely(!ci)) { \
WL_ERR("wl_cfg80211_dev is unavailable\n"); \
BUG(); \
} \
static void *wl_get_drvdata(struct wl_dev *dev)
{
- return dev->driver_data;
+ void *data = NULL;
+
+ if (dev)
+ data = dev->driver_data;
+ return data;
}
s32 wl_cfg80211_read_fw(s8 *buf, u32 size)
{
u32 status;
iscan_info_t *iscan = (iscan_info_t *) data;
- static bool iscan_pass_abort = false;
+ static bool iscan_pass_abort;
allow_signal(SIGTERM);
status = WL_SCAN_RESULTS_PARTIAL;