PD#87206 wifi policy support
authorzhancai.yang <zhancai.yang@amlogic.com>
Tue, 18 Feb 2014 09:49:20 +0000 (17:49 +0800)
committerLarson Jiang <larson.jiang@amlogic.com>
Tue, 18 Feb 2014 09:49:20 +0000 (17:49 +0800)
commit 530d545c00e9dc168266232c7b6e0fbdb8c72b78
Author: zhancai.yang <zhancai.yang@amlogic.com>
Date:   Tue Feb 18 11:08:33 2014 +0800

    PD#87206 wifi policy support

broadcm_40181/dhd_config.h
broadcm_40181/dhd_linux.c
broadcm_40181/wl_cfg80211.c
broadcm_40181/wl_cfg80211.h

index 9d4c58e5bd18814525a569bd57262fbb6ad8ab06..de6d87ef8d1396befa16bb3e32f3e7158fbda9ff 100755 (executable)
@@ -58,10 +58,10 @@ void dhd_conf_detach(dhd_pub_t *dhd);
 \r
 extern void *bcmsdh_get_drvdata(void);\r
 \r
+extern int g_wifi_on;\r
 #ifdef POWER_OFF_IN_SUSPEND\r
 extern struct net_device *g_netdev;\r
 #if defined(CONFIG_HAS_EARLYSUSPEND)\r
-extern int g_wifi_on;\r
 void wl_cfg80211_stop(void);\r
 void wl_cfg80211_send_disconnect(void);\r
 void wl_cfg80211_user_sync(bool lock);\r
index 8550a202848fa2e3563af86d190946920cf4769c..771ccf0754f34ae70869d39d6c1f19ee0bcc6c33 100755 (executable)
@@ -4204,7 +4204,7 @@ dhd_preinit_ioctls(dhd_pub_t *dhd)
                dhd->pktfilter[DHD_MULTICAST4_FILTER_NUM] = NULL;
                dhd->pktfilter[DHD_MULTICAST6_FILTER_NUM] = NULL;
                /* Add filter to pass multicastDNS packet and NOT filter out as Broadcast */
-               dhd->pktfilter[DHD_MDNS_FILTER_NUM] = "104 0 0 0 0xFFFFFFFFFFFF 0x01005E0000FB";
+               dhd->pktfilter[DHD_MDNS_FILTER_NUM] = NULL;//"104 0 0 0 0xFFFFFFFFFFFF 0x01005E0000FB";
                /* apply APP pktfilter */
                dhd->pktfilter[DHD_ARP_FILTER_NUM] = "105 0 0 12 0xFFFF 0x0806";
        }
index 4cd2e11b84223fe424d31343f0774107f02f9395..87f86c8f67a1b918a09df4e3e6ca4da4dfa9298b 100755 (executable)
@@ -604,7 +604,7 @@ wl_sdo_proto_t wl_sdo_protos [] = {
 
 static void wl_wakelock_timeout(struct wl_priv *priv)
 {
-#if defined(CONFIG_HAS_WAKELOCK)       
+#if defined(POWER_OFF_IN_SUSPEND) && defined(CONFIG_HAS_WAKELOCK)      
        wake_lock_timeout(&priv->priv_lock, msecs_to_jiffies(20));      
 #endif
 }
@@ -2275,10 +2275,12 @@ __wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
 
        dhd_pub_t *dhd;
 
+#ifdef POWER_OFF_IN_SUSPEND
        if (!wifi_ready) {
                WL_INFO(("Too early scan req\n"));
                return -EAGAIN;
        }
+#endif
        
        dhd = (dhd_pub_t *)(wl->pub);
        if (dhd->op_mode & DHD_FLAG_HOSTAP_MODE) {
@@ -9885,7 +9887,7 @@ static s32 wl_init_priv(struct wl_priv *wl)
        wl_init_prof(wl, ndev);
        wl_link_down(wl);
        DNGL_FUNC(dhd_cfg80211_init, (wl));
-#ifdef CONFIG_HAS_WAKELOCK
+#if defined(POWER_OFF_IN_SUSPEND) && defined(CONFIG_HAS_WAKELOCK)
        wake_lock_init(&wl->priv_lock, WAKE_LOCK_SUSPEND, "wlan_priv_wake");
        printk("init wlan_priv_wake\n");
 #endif
@@ -9902,7 +9904,7 @@ static void wl_deinit_priv(struct wl_priv *wl)
        wl_term_iscan(wl);
        wl_deinit_priv_mem(wl);
        unregister_netdevice_notifier(&wl_cfg80211_netdev_notifier);
-#ifdef CONFIG_HAS_WAKELOCK
+#if defined(POWER_OFF_IN_SUSPEND) && defined(CONFIG_HAS_WAKELOCK)
        wake_lock_destroy(&wl->priv_lock);
 #endif
 }
index 5c11b4450388369e02f88a3198ddb224874ca071..c2806d35f2e439fd3f98385dd7b70832b47cf479 100755 (executable)
@@ -16,7 +16,7 @@
 #include <linux/wireless.h>
 #include <net/cfg80211.h>
 #include <linux/rfkill.h>
-#ifdef CONFIG_HAS_WAKELOCK
+#if defined(POWER_OFF_IN_SUSPEND) && defined(CONFIG_HAS_WAKELOCK)
 #include <linux/wakelock.h>
 #endif
 
@@ -537,7 +537,7 @@ struct wl_priv {
        struct wl_scan_results *bss_list;
        struct wl_scan_results *scan_results;
 
-#if defined(CONFIG_HAS_WAKELOCK)
+#if defined(POWER_OFF_IN_SUSPEND) && defined(CONFIG_HAS_WAKELOCK)
                struct wake_lock priv_lock;     
 #endif