old mode 100644new mode 100755.. | .. |
---|
705 | 705 | BCM_REFERENCE(ndev); |
---|
706 | 706 | CFGP2P_DBG(("enter\n")); |
---|
707 | 707 | |
---|
708 | | -#ifdef BCMDBUS |
---|
709 | | - if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0 && !cfg->bus_resuming) |
---|
710 | | -#else |
---|
711 | | - if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0) |
---|
712 | | -#endif /* BCMDBUS */ |
---|
713 | | - { |
---|
| 708 | + if (wl_to_p2p_bss_bssidx(cfg, P2PAPI_BSSCFG_DEVICE) > 0) { |
---|
714 | 709 | CFGP2P_ERR(("do nothing, already initialized\n")); |
---|
715 | 710 | goto exit; |
---|
716 | 711 | } |
---|
.. | .. |
---|
737 | 732 | * so that time, the ifidx returned in WLC_E_IF should be used for populating |
---|
738 | 733 | * the netinfo |
---|
739 | 734 | */ |
---|
740 | | -#ifdef BCMDBUS |
---|
741 | | - if (!cfg->bus_resuming) |
---|
742 | | -#endif /* BCMDBUS */ |
---|
743 | 735 | ret = wl_alloc_netinfo(cfg, NULL, cfg->p2p_wdev, WL_IF_TYPE_STA, 0, bssidx, 0); |
---|
744 | 736 | if (unlikely(ret)) { |
---|
745 | 737 | goto exit; |
---|
.. | .. |
---|
830 | 822 | } |
---|
831 | 823 | #endif /* WL_IFACE_MGMT */ |
---|
832 | 824 | |
---|
833 | | -#ifdef BCMDBUS |
---|
834 | | - if (!cfg->bus_resuming && (wl_get_p2p_status(cfg, DISCOVERY_ON))) |
---|
835 | | -#else |
---|
836 | | - if (wl_get_p2p_status(cfg, DISCOVERY_ON)) |
---|
837 | | -#endif /* BCMDBUS */ |
---|
838 | | - { |
---|
| 825 | + if (wl_get_p2p_status(cfg, DISCOVERY_ON)) { |
---|
839 | 826 | CFGP2P_DBG((" DISCOVERY is already initialized, we have nothing to do\n")); |
---|
840 | 827 | goto set_ie; |
---|
841 | 828 | } |
---|
.. | .. |
---|
2683 | 2670 | cfg->p2p_prb_noti = false; |
---|
2684 | 2671 | #endif |
---|
2685 | 2672 | |
---|
2686 | | - printf("P2P interface started\n"); |
---|
| 2673 | + CFGP2P_DBG(("P2P interface started\n")); |
---|
2687 | 2674 | |
---|
2688 | 2675 | exit: |
---|
2689 | 2676 | return ret; |
---|
.. | .. |
---|
2731 | 2718 | |
---|
2732 | 2719 | p2p_on(cfg) = false; |
---|
2733 | 2720 | |
---|
2734 | | - printf("Exit. P2P interface stopped\n"); |
---|
| 2721 | + CFGP2P_DBG(("Exit. P2P interface stopped\n")); |
---|
2735 | 2722 | |
---|
2736 | 2723 | return; |
---|
2737 | 2724 | } |
---|
.. | .. |
---|
2821 | 2808 | } |
---|
2822 | 2809 | return false; |
---|
2823 | 2810 | } |
---|
2824 | | - |
---|
2825 | | -#ifdef BCMDBUS |
---|
2826 | | -int |
---|
2827 | | -wl_cfgp2p_start_p2p_device_resume(dhd_pub_t *dhd) |
---|
2828 | | -{ |
---|
2829 | | - int ret = 0; |
---|
2830 | | -#ifdef WL_CFG80211_P2P_DEV_IF |
---|
2831 | | - struct net_device *primary_ndev = dhd_linux_get_primary_netdev(dhd); |
---|
2832 | | - struct bcm_cfg80211 *cfg; |
---|
2833 | | - struct wiphy *wiphy; |
---|
2834 | | - |
---|
2835 | | - if (!primary_ndev) |
---|
2836 | | - return -EINVAL; |
---|
2837 | | - cfg = wl_get_cfg(primary_ndev); |
---|
2838 | | - if (!cfg) |
---|
2839 | | - return -EINVAL; |
---|
2840 | | - |
---|
2841 | | - RETURN_EIO_IF_NOT_UP(cfg); |
---|
2842 | | - if (!p2p_on(cfg)) |
---|
2843 | | - return -EINVAL; |
---|
2844 | | - |
---|
2845 | | - rtnl_lock(); |
---|
2846 | | - wiphy = bcmcfg_to_wiphy(cfg); |
---|
2847 | | - cfg->bus_resuming = TRUE; |
---|
2848 | | - ret = wl_cfgp2p_start_p2p_device(wiphy, cfg->wdev); |
---|
2849 | | - cfg->bus_resuming = FALSE; |
---|
2850 | | - printf("P2P interface resumed\n"); |
---|
2851 | | - rtnl_unlock(); |
---|
2852 | | -#endif |
---|
2853 | | - |
---|
2854 | | - return ret; |
---|
2855 | | -} |
---|
2856 | | -#endif /* BCMDBUS */ |
---|