/*********************************************************************** * * <:copyright-BRCM:2015:DUAL/GPL:standard * * Copyright (c) 2015 Broadcom * All Rights Reserved * * Unless you and Broadcom execute a separate written software license * agreement governing use of this software, this software is licensed * to you under the terms of the GNU General Public License version 2 * (the "GPL"), available at http://www.broadcom.com/licenses/GPLv2.php, * with the following added to such license: * * As a special exception, the copyright holders of this software give * you permission to link this software with independent modules, and * to copy and distribute the resulting executable under terms of your * choice, provided that you also meet, for each linked independent * module, the terms and conditions of the license of that module. * An independent module is a module which is not derived from this * software. The special exception does not apply to any modifications * of the software. * * Not withstanding the above, under no circumstances may you combine * this software in any way with any other Broadcom software provided * under a license other than the GPL, without Broadcom's express prior * written consent. * * :> * ************************************************************************/ #include #define IFNAMESIZ (16) #define wc_log_err(fmt, arg...) fprintf(stderr, "wanconf %s:%d >> " fmt "\n", __FILE__, __LINE__, ##arg); #define wc_log(fmt, arg...) printf("wanconf: " fmt "\n", ##arg); #define insmod(d) insmod_param(d, NULL) #ifndef CONFIG_BCM963158 #define DETECTION_OK ( 0) #define DETECTION_ERROR (-1) int try_wan_type_detect_and_set(rdpa_wan_type *wan_type); #endif #ifdef BRCM_BDK_BUILD #include "bdk.h" // #include "bcm_zbus_intf.h" Cannot use this header file when BDK is // provided as binary only. /** Send out wanConfig command in a bus independent way. */ void zbus_out_wanConf(const char *destCompName, const char *cmd); /** Send out wanConf command on the Bus. * This function should only be used by zbus_out_wanConf. All app code * should call zbus_out_wanConf. * * The real prototype is : * * void bus_out_wanConf(const ZbusAddr *dest, const char *cmd); * * but because we need to build this app when when BDK is in binary-only * format, we have to define a local version that does not need any ZBus * data structures. */ void bus_out_wanConf(const void *dest, const char *cmd); // From bcm_zbus_intf.h: actually returns a ZbusAddr const void *zbusIntf_componentNameToZbusAddr(const char *destCompName); #endif /* BRCM_BDK_BUILD */