/* register wifi event callback for station or AP mode  */
MX_WIFI_STATUS_T MX_WIFI_RegisterStatusCallback_if(MX_WIFIObject_t *Obj, mx_wifi_status_callback_t cb, void *arg, mwifi_if_t interface)
/* register wifi event callback for station or AP mode  */
MX_WIFI_STATUS_T MX_WIFI_RegisterStatusCallback_if(MX_WIFIObject_t *Obj, mx_wifi_status_callback_t cb, void *arg, mwifi_if_t interface)
{
  MX_WIFI_STATUS_T rc;
  if (NULL == Obj)
  {
    rc = MX_WIFI_STATUS_ERROR;
  }
  else
  {
    if ((mwifi_if_t)MC_SOFTAP == interface)
    {
      Obj->Runtime.status_cb[1] = cb;
      Obj->Runtime.callback_arg[1] = arg;
    }
    else
    {
      Obj->Runtime.status_cb[0] = cb;
      Obj->Runtime.callback_arg[0] = arg;
    }
    rc = MX_WIFI_STATUS_OK;
  }
  return rc;
}