Пример #1
0
/*FUNCTION*-----------------------------------------------------------------
*
* Function Name  : Shell_iwconfig_set_power
* Returned Value : ERROR code on error else success
* Comments       :
*
*END------------------------------------------------------------------*/
static int32_t Shell_iwconfig_set_scan (FILE *fout, uint32_t enet_device,int32_t index,int32_t argc,char *argv[])
{
    uint32_t error;
    char *ssid = NULL;
    if (argc > 2)
    {
        ssid = argv[index+1];
    }

    error = iwcfg_set_scan (enet_device, ssid);
    if (error != 0)
    {
        fprintf(fout, "Error during scan %08x!\n", error);
        return SHELL_EXIT_ERROR;
    }

    if (ssid)
      fprintf(fout, "scan %s done.\n",ssid);
    else
      fprintf(fout, "scan done.\n");

    return SHELL_EXIT_SUCCESS;
}
Пример #2
0
/*FUNCTION*-----------------------------------------------------------------
*
* Function Name  : Shell_iwconfig_set_power
* Returned Value : ERROR code on error else success
* Comments       :
*
*END------------------------------------------------------------------*/
static int_32 Shell_iwconfig_set_scan (uint_32 enet_device,int_32 index,int_32 argc,char_ptr argv[])
{
    uint_32 error;
    char_ptr ssid = NULL;
    if (argc > 2)
    {
        ssid = argv[index+1];
    }

    error = iwcfg_set_scan (enet_device, ssid);
    if (error != 0)
    {
        printf ("Error during scan %08x!\n", error);
        return SHELL_EXIT_ERROR;
    }

    if (ssid)
        printf ("scan %s done.\n",ssid);
    else
        printf("scan done.\n");

    return SHELL_EXIT_SUCCESS;
}