PD#86917:fix compile error if POWER_OFF_IN_SUSPEND not define
authorjiamin.miao <jiamin.miao@amlogic.com>
Mon, 24 Feb 2014 08:41:55 +0000 (16:41 +0800)
committerpeter.lin <peter.lin@amlogic.com>
Tue, 25 Feb 2014 09:42:14 +0000 (17:42 +0800)
broadcm_40181/dhd_config.h
broadcm_40181/dhd_linux.c
broadcm_40181/dhd_sdio.c
broadcm_40181/wl_cfg80211.c

index 6cbd3c288e1b4ef0ebda2be09c125b9b1c8ce378..dcd6797607f3a232e6f074304658aa8e2c7c56dd 100755 (executable)
@@ -16,7 +16,9 @@
 #define FW_PATH_AUTO_SELECT 1\r
 extern char firmware_path[MOD_PARAM_PATHLEN];\r
 extern int disable_proptx;\r
+#ifdef POWER_OFF_IN_SUSPEND\r
 extern bool wifi_ready;\r
+#endif\r
 \r
 /* channel list */\r
 typedef struct wl_channel_list {\r
index 771ccf0754f34ae70869d39d6c1f19ee0bcc6c33..5fb46d6f673cc0709b74b0ff7cc9e2eea9c30da1 100755 (executable)
@@ -4017,6 +4017,8 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
        dhd_wl_ioctl_cmd(dhd, WLC_SET_VAR, iovbuf, sizeof(iovbuf), TRUE, 0);
 #endif /* defined(AP) && !defined(WLP2P) */
        dhd_conf_set_bw(dhd);
+       dhd_conf_force_wme(dhd);
+       dhd_conf_set_stbc(dhd);
 
 #if defined(SOFTAP)
        if (ap_fw_loaded == TRUE) {
@@ -4703,7 +4705,6 @@ void dhd_detach(dhd_pub_t *dhdp)
                if (dhdp->prot)
                        dhd_prot_detach(dhdp);
        }
-       dhd_conf_detach(dhdp);
 
 #if defined(CONFIG_HAS_EARLYSUSPEND) && defined(DHD_USE_EARLYSUSPEND)
        if (dhd->dhd_state & DHD_ATTACH_STATE_EARLYSUSPEND_DONE) {
@@ -4795,6 +4796,7 @@ void dhd_detach(dhd_pub_t *dhdp)
                dhd_monitor_uninit();
        }
 #endif
+       dhd_conf_detach(dhdp);
 
 #ifdef PNO_SUPPORT
        if (dhdp->pno_state)
index 6fe671848538a0fb92ea6978b1cfb2ee281ca163..731346b291164d03637bf62f708508987106ceb2 100755 (executable)
@@ -8460,6 +8460,7 @@ dhd_bus_devreset(dhd_pub_t *dhdp, uint8 flag)
                                        /* Re-init bus, enable F2 transfer */
                                        bcmerror = dhd_bus_init((dhd_pub_t *) bus->dhd, FALSE);
                                        if (bcmerror == BCME_OK) {
+                                               bcmsdh_set_drvdata(dhdp); // terence 20131214: fix for null pointer issue
 #if defined(OOB_INTR_ONLY)
                                                /* make sure oob intr get registered */
                                                if (!bcmsdh_is_oob_intr_registered()) {
index 88f944dc4e8d987f1ccf34793f51aabe80f630cc..bdd4a94b87263bfaf8e9dc93bb60a19e7539beeb 100755 (executable)
@@ -610,6 +610,7 @@ static void wl_wakelock_timeout(struct wl_priv *priv)
 }
 
 
+#ifdef POWER_OFF_IN_SUSPEND
 #define RETURN_EIO_IF_NOT_UP(wlpriv)                                           \
 do {                                                                   \
        struct net_device *checkSysUpNDev = wl_to_prmry_ndev(wlpriv);           \
@@ -623,7 +624,16 @@ do {                                                                       \
        }       \
        wl_wakelock_timeout(wlpriv);    \
 } while (0)
-
+#else
+#define RETURN_EIO_IF_NOT_UP(wlpriv)                                           \
+do {                                                                   \
+       struct net_device *checkSysUpNDev = wl_to_prmry_ndev(wlpriv);           \
+       if (unlikely(!wl_get_drv_status(wlpriv, READY, checkSysUpNDev))) {      \
+               WL_INFO(("device is not ready\n"));                     \
+               return -EIO;                                            \
+       }                                                               \
+} while (0)
+#endif
 
 #define IS_WPA_AKM(akm) ((akm) == RSN_AKM_NONE ||                      \
                                 (akm) == RSN_AKM_UNSPECIFIED ||        \