In stm32_ctrlout() in the HS and FS host drivers, the data buffer isn't sent. This patch passes the buffer and buflen to the stm32_ctrl_senddata() function. With this change, I am able to send MBIM control messages to my USB modem, and read the response.

This commit is contained in:
Adam Porter 2019-06-23 07:05:21 -06:00 committed by Gregory Nutt
parent 393f5b96dd
commit 37c4fb5477
4 changed files with 8 additions and 4 deletions

View File

@ -4540,7 +4540,8 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0,
/* Start DATA out transfer (only one DATA packet) */
priv->chan[ep0info->outndx].outdata1 = true;
ret = stm32_ctrl_senddata(priv, ep0info, NULL, 0);
ret = stm32_ctrl_senddata(priv, ep0info, (FAR uint8_t *)buffer,
buflen);
if (ret < 0)
{
usbhost_trace1(OTGFS_TRACE1_SENDDATA, -ret);

View File

@ -4545,7 +4545,8 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0,
/* Start DATA out transfer (only one DATA packet) */
priv->chan[ep0info->outndx].outdata1 = true;
ret = stm32_ctrl_senddata(priv, ep0info, NULL, 0);
ret = stm32_ctrl_senddata(priv, ep0info, (FAR uint8_t *)buffer,
buflen);
if (ret < 0)
{
usbhost_trace1(OTGHS_TRACE1_SENDDATA, -ret);

View File

@ -4538,7 +4538,8 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0,
/* Start DATA out transfer (only one DATA packet) */
priv->chan[ep0info->outndx].outdata1 = true;
ret = stm32_ctrl_senddata(priv, ep0info, NULL, 0);
ret = stm32_ctrl_senddata(priv, ep0info, (FAR uint8_t *)buffer,
buflen);
if (ret < 0)
{
usbhost_trace1(OTG_TRACE1_SENDDATA, -ret);

View File

@ -4543,7 +4543,8 @@ static int stm32_ctrlout(FAR struct usbhost_driver_s *drvr, usbhost_ep_t ep0,
/* Start DATA out transfer (only one DATA packet) */
priv->chan[ep0info->outndx].outdata1 = true;
ret = stm32_ctrl_senddata(priv, ep0info, NULL, 0);
ret = stm32_ctrl_senddata(priv, ep0info, (FAR uint8_t *)buffer,
buflen);
if (ret < 0)
{
usbhost_trace1(OTG_TRACE1_SENDDATA, -ret);