Merge branch 'photon'

This commit is contained in:
Gregory Nutt
2017-05-03 18:31:17 -06:00
9 changed files with 21 additions and 21 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ ifeq ($(CONFIG_IEEE80211_BROADCOM_FULLMAC),y)
CSRCS += bcmf_utils.c CSRCS += bcmf_utils.c
CSRCS += bcmf_netdev.c CSRCS += bcmf_netdev.c
ifeq ($(CONFIG_IEEE80211_BROADCOM_FULLMAC_SDIO),y) ifeq ($(CONFIG_IEEE80211_BROADCOM_FULLMAC_SDIO),y)
CSRCS += mmc_sdio.c CSRCS += mmc_sdio.c
CSRCS += bcmf_sdio.c CSRCS += bcmf_sdio.c
CSRCS += bcmf_core.c CSRCS += bcmf_core.c
+1 -1
View File
@@ -115,7 +115,7 @@ struct bcmf_frame_s *bcmf_bdc_allocate_frame(FAR struct bcmf_dev_s *priv,
frame->data += sizeof(struct bcmf_bdc_header); frame->data += sizeof(struct bcmf_bdc_header);
return frame; return frame;
} }
int bcmf_bdc_process_event_frame(FAR struct bcmf_dev_s *priv, int bcmf_bdc_process_event_frame(FAR struct bcmf_dev_s *priv,
+1 -1
View File
@@ -130,7 +130,7 @@ struct bcmf_frame_s *bcmf_cdc_allocate_frame(FAR struct bcmf_dev_s *priv,
frame = priv->bus->allocate_frame(priv, frame = priv->bus->allocate_frame(priv,
sizeof(struct bcmf_cdc_header) + data_len + name_len, sizeof(struct bcmf_cdc_header) + data_len + name_len,
true, true); true, true);
if (!frame) if (!frame)
{ {
return NULL; return NULL;
+2 -1
View File
@@ -339,8 +339,9 @@ void bcmf_core_disable(FAR struct bcmf_sdio_dev_s *sbus, unsigned int core)
wlerr("Invalid core id %d\n", core); wlerr("Invalid core id %d\n", core);
return; return;
} }
uint32_t base = sbus->chip->core_base[core]; uint32_t base = sbus->chip->core_base[core];
/* Check if core is already in reset state */ /* Check if core is already in reset state */
bcmf_read_sbregb(sbus, base + BCMA_RESET_CTL, &value); bcmf_read_sbregb(sbus, base + BCMA_RESET_CTL, &value);
+1 -2
View File
@@ -201,7 +201,7 @@ int bcmf_wl_set_mac_address(FAR struct bcmf_dev_s *priv, struct ifreq *req)
memcpy(priv->bc_dev.d_mac.ether.ether_addr_octet, memcpy(priv->bc_dev.d_mac.ether.ether_addr_octet,
req->ifr_hwaddr.sa_data, ETHER_ADDR_LEN); req->ifr_hwaddr.sa_data, ETHER_ADDR_LEN);
return OK; return OK;
} }
@@ -912,4 +912,3 @@ int bcmf_wl_set_ssid(FAR struct bcmf_dev_s *priv, struct iwreq *iwr)
} }
return OK; return OK;
} }
+1 -1
View File
@@ -210,7 +210,7 @@ static int bcmf_transmit(FAR struct bcmf_dev_s *priv,
frame->len = priv->bc_dev.d_len + frame->len = priv->bc_dev.d_len +
(unsigned int)(frame->data - frame->base); (unsigned int)(frame->data - frame->base);
ret = bcmf_bdc_transmit_frame(priv, frame); ret = bcmf_bdc_transmit_frame(priv, frame);
if (ret) if (ret)
+11 -11
View File
@@ -159,7 +159,7 @@ int bcmf_sdio_bus_sleep(FAR struct bcmf_sdio_dev_s *sbus, bool sleep)
else else
{ {
/* Request HT Avail */ /* Request HT Avail */
ret = bcmf_write_reg(sbus, 1, SBSDIO_FUNC1_CHIPCLKCSR, ret = bcmf_write_reg(sbus, 1, SBSDIO_FUNC1_CHIPCLKCSR,
SBSDIO_HT_AVAIL_REQ | SBSDIO_FORCE_HT); SBSDIO_HT_AVAIL_REQ | SBSDIO_FORCE_HT);
if (ret != OK) if (ret != OK)
@@ -167,27 +167,27 @@ int bcmf_sdio_bus_sleep(FAR struct bcmf_sdio_dev_s *sbus, bool sleep)
wlerr("HT Avail request failed %d\n", ret); wlerr("HT Avail request failed %d\n", ret);
return ret; return ret;
} }
/* Wait for High Troughput clock */ /* Wait for High Troughput clock */
loops = 20; loops = 20;
while (--loops > 0) while (--loops > 0)
{ {
up_mdelay(1); up_mdelay(1);
ret = bcmf_read_reg(sbus, 1, SBSDIO_FUNC1_CHIPCLKCSR, &value); ret = bcmf_read_reg(sbus, 1, SBSDIO_FUNC1_CHIPCLKCSR, &value);
if (ret != OK) if (ret != OK)
{ {
return ret; return ret;
} }
if (value & SBSDIO_HT_AVAIL) if (value & SBSDIO_HT_AVAIL)
{ {
/* High Throughput clock is ready */ /* High Throughput clock is ready */
break; break;
} }
} }
if (loops <= 0) if (loops <= 0)
{ {
wlerr("HT clock not ready\n"); wlerr("HT clock not ready\n");
@@ -196,7 +196,7 @@ int bcmf_sdio_bus_sleep(FAR struct bcmf_sdio_dev_s *sbus, bool sleep)
sbus->sleeping = false; sbus->sleeping = false;
} }
return OK; return OK;
} }
@@ -597,7 +597,7 @@ int bcmf_bus_sdio_initialize(FAR struct bcmf_dev_s *priv,
{ {
bcmf_dqueue_push(&sbus->free_queue, &g_pktframes[ret].list_entry); bcmf_dqueue_push(&sbus->free_queue, &g_pktframes[ret].list_entry);
} }
/* Init thread semaphore */ /* Init thread semaphore */
if ((ret = sem_init(&sbus->thread_signal, 0, 0)) != OK) if ((ret = sem_init(&sbus->thread_signal, 0, 0)) != OK)
@@ -740,13 +740,13 @@ int bcmf_sdio_thread(int argc, char **argv)
int ret; int ret;
FAR struct bcmf_dev_s *priv = g_sdio_priv; FAR struct bcmf_dev_s *priv = g_sdio_priv;
FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus; FAR struct bcmf_sdio_dev_s *sbus = (FAR struct bcmf_sdio_dev_s *)priv->bus;
wlinfo("Enter\n"); wlinfo("Enter\n");
/* FIXME wait for the chip to be ready to receive commands */ /* FIXME wait for the chip to be ready to receive commands */
up_mdelay(50); up_mdelay(50);
while (sbus->ready) while (sbus->ready)
{ {
/* Wait for event (device interrupt, user request or waitdog timer) */ /* Wait for event (device interrupt, user request or waitdog timer) */
@@ -796,7 +796,7 @@ int bcmf_sdio_thread(int argc, char **argv)
ret = bcmf_sdpcm_readframe(priv); ret = bcmf_sdpcm_readframe(priv);
} }
while (ret == OK); while (ret == OK);
if (ret == -ENODATA) if (ret == -ENODATA)
{ {
/* All frames processed */ /* All frames processed */
+1 -1
View File
@@ -223,7 +223,7 @@ int bcmf_sdpcm_readframe(FAR struct bcmf_dev_s *priv)
goto exit_free_frame; goto exit_free_frame;
} }
/* Update frame structure */ /* Update frame structure */
sframe->header.len = header->size; sframe->header.len = header->size;
sframe->header.data += header->data_offset; sframe->header.data += header->data_offset;
+2 -2
View File
@@ -243,7 +243,7 @@ int sdio_set_wide_bus(struct sdio_dev_s *dev)
{ {
return ret; return ret;
} }
SDIO_WIDEBUS(dev, true); SDIO_WIDEBUS(dev, true);
return OK; return OK;
} }
@@ -343,7 +343,7 @@ int sdio_enable_function(FAR struct sdio_dev_s *dev, uint8_t function)
{ {
return ret; return ret;
} }
ret = sdio_io_rw_direct(dev, true, 0, SDIO_CCCR_IOEN, value | (1 << function), NULL); ret = sdio_io_rw_direct(dev, true, 0, SDIO_CCCR_IOEN, value | (1 << function), NULL);
if (ret != OK) if (ret != OK)