diff --git a/configs/photon/src/stm32_wlan.c b/configs/photon/src/stm32_wlan.c index 2892e7af2a..9e886807e0 100644 --- a/configs/photon/src/stm32_wlan.c +++ b/configs/photon/src/stm32_wlan.c @@ -150,16 +150,5 @@ int photon_wlan_initialize() return ERROR; } -#if 0 /* Not yet */ - /* Register the nework device */ - - ret = bcmf_netdev_register(0); - if (ret != OK) - { - syslog(LOG_ERR, "Failed to register bcmf network device: %d\n", ret); - return ret; - } -#endif - return OK; } diff --git a/drivers/wireless/ieee80211/bcmf_driver.c b/drivers/wireless/ieee80211/bcmf_driver.c index 5294e5a781..4aafc2b823 100644 --- a/drivers/wireless/ieee80211/bcmf_driver.c +++ b/drivers/wireless/ieee80211/bcmf_driver.c @@ -117,10 +117,12 @@ FAR struct bcmf_dev_s* bcmf_allocate_device(void) { goto exit_free_priv; } + if ((ret = sem_init(&priv->control_timeout, 0, 0)) != OK) { goto exit_free_priv; } + if ((ret = sem_setprotocol(&priv->control_timeout, SEM_PRIO_NONE)) != OK) { goto exit_free_priv; @@ -165,7 +167,8 @@ int bcmf_dongle_scantime(FAR struct bcmf_dev_s *priv, int32_t scan_assoc_time, int32_t scan_unassoc_time, int32_t scan_passive_time) { int ret; - uint32_t out_len, value; + uint32_t out_len; + uint32_t value; out_len = 4; value = scan_assoc_time; @@ -284,7 +287,8 @@ int bcmf_run_escan(FAR struct bcmf_dev_s *priv) int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv) { int ret; - uint32_t out_len, value; + uint32_t out_len; + uint32_t value; uint8_t tmp_buf[64]; /* Disable TX Gloming feature */ @@ -341,6 +345,7 @@ int bcmf_driver_initialize(FAR struct bcmf_dev_s *priv) } /* Remove line feed */ + out_len = strlen((char*)tmp_buf); if (out_len > 0 && tmp_buf[out_len-1] == '\n') {