mirror of https://github.com/ARMmbed/mbed-os.git
Cypress Target update to support Manufacturing Test. (#11868)
Cypress Target update to support WiFi Manufacturing Test Adding IOCTLS in WhdSTAInterface for MFG Test. Fix WHD EMAC interface to release buffer when emac is not powered up or callback is not registered.pull/11913/head
parent
e638486be1
commit
f51cc6494e
|
@ -571,6 +571,30 @@ int WhdSTAInterface::wifi_set_ioctl_value(uint32_t ioctl, uint32_t value)
|
|||
return res;
|
||||
}
|
||||
|
||||
int WhdSTAInterface::wifi_get_ioctl_value(uint32_t ioctl, uint32_t *value )
|
||||
{
|
||||
int res = WHD_SUCCESS;
|
||||
_whd_emac.ifp->role = WHD_STA_ROLE;
|
||||
res = whd_wifi_get_ioctl_value(_whd_emac.ifp, ioctl, value);
|
||||
return res;
|
||||
}
|
||||
|
||||
int WhdSTAInterface::wifi_get_ioctl_buffer(uint32_t ioctl, uint8_t *buffer, uint16_t len)
|
||||
{
|
||||
int res = WHD_SUCCESS;
|
||||
_whd_emac.ifp->role = WHD_STA_ROLE;
|
||||
res = whd_wifi_get_ioctl_buffer(_whd_emac.ifp, ioctl, buffer, len);
|
||||
return res;
|
||||
}
|
||||
|
||||
int WhdSTAInterface::wifi_set_ioctl_buffer(uint32_t ioctl, uint8_t *buffer, uint16_t len)
|
||||
{
|
||||
int res = WHD_SUCCESS;
|
||||
_whd_emac.ifp->role = WHD_STA_ROLE;
|
||||
res = whd_wifi_set_ioctl_buffer(_whd_emac.ifp, ioctl, buffer, len);
|
||||
return res;
|
||||
}
|
||||
|
||||
int WhdSTAInterface::wifi_get_ifp(whd_interface_t *ifp)
|
||||
{
|
||||
int res = WHD_SUCCESS;
|
||||
|
|
|
@ -191,6 +191,15 @@ public:
|
|||
/* set ioctl value */
|
||||
int wifi_set_ioctl_value(uint32_t ioctl, uint32_t value) ;
|
||||
|
||||
/* get ioctl value */
|
||||
int wifi_get_ioctl_value(uint32_t ioctl, uint32_t *value);
|
||||
|
||||
/* get ioctl buffer */
|
||||
int wifi_get_ioctl_buffer(uint32_t ioctl, uint8_t *buffer, uint16_t len);
|
||||
|
||||
/* set ioctl buffer */
|
||||
int wifi_set_ioctl_buffer(uint32_t ioctl, uint8_t *buffer, uint16_t len);
|
||||
|
||||
/* get WHD ifp value */
|
||||
int wifi_get_ifp(whd_interface_t *ifp);
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ extern "C"
|
|||
|
||||
WHD_EMAC &emac = WHD_EMAC::get_instance(ifp->role);
|
||||
|
||||
if (!emac.powered_up && !emac.emac_link_input_cb) {
|
||||
if (!emac.powered_up || !emac.emac_link_input_cb) {
|
||||
// ignore any trailing packets
|
||||
whd_buffer_release(emac.drvp, buffer, WHD_NETWORK_RX);
|
||||
return;
|
||||
|
|
Loading…
Reference in New Issue