This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SIMPLELINK-WIFI-CC3120-SDK-PLUGIN: Bug in host Driver v 2.0.1.22

Part Number: SIMPLELINK-WIFI-CC3120-SDK-PLUGIN

Hello,

I use the latest SDK version (1.50.00.38). 

Errno mechanism is implemented in RTOS I use. So, I don't need the Simplelink driver internal errno.

File driver.c can't be compiled if SL_INC_INTERNAL_ERRNO isn't defined in user.h:

compiling driver.c...
Libraries\ti\drivers\net\wifi\source\driver.c(594): error:  #20: identifier "ERROR" is undefined
  		Errno = ERROR;
Libraries\ti\drivers\net\wifi\source\driver.c(599): error:  #20: identifier "INEXE" is undefined
  		Errno = INEXE;
Libraries\ti\drivers\net\wifi\source\driver.c(604): error:  #20: identifier "EBADF" is undefined
  		Errno = EBADF;
Libraries\ti\drivers\net\wifi\source\driver.c(609): error:  #20: identifier "ENSOCK" is undefined
  		Errno = ENSOCK;
Libraries\ti\drivers\net\wifi\source\driver.c(614): error:  #20: identifier "EAGAIN" is undefined
  		Errno = EAGAIN;
Libraries\ti\drivers\net\wifi\source\driver.c(624): error:  #20: identifier "EACCES" is undefined
  		Errno = EACCES;
Libraries\ti\drivers\net\wifi\source\driver.c(629): error:  #20: identifier "EFAULT" is undefined
  		Errno = EFAULT;
Libraries\ti\drivers\net\wifi\source\driver.c(639): error:  #20: identifier "EDESTADDRREQ" is undefined
  		Errno = EDESTADDRREQ;
Libraries\ti\drivers\net\wifi\source\driver.c(644): error:  #20: identifier "EPROTOTYPE" is undefined
  		Errno = EPROTOTYPE;
Libraries\ti\drivers\net\wifi\source\driver.c(649): error:  #20: identifier "ENOPROTOOPT" is undefined
  		Errno = ENOPROTOOPT;
Libraries\ti\drivers\net\wifi\source\driver.c(654): error:  #20: identifier "EPROTONOSUPPORT" is undefined
  		Errno = EPROTONOSUPPORT;
Libraries\ti\drivers\net\wifi\source\driver.c(659): error:  #20: identifier "ESOCKTNOSUPPORT" is undefined
  		Errno = ESOCKTNOSUPPORT;
Libraries\ti\drivers\net\wifi\source\driver.c(664): error:  #20: identifier "EOPNOTSUPP" is undefined
  		Errno = EOPNOTSUPP;
Libraries\ti\drivers\net\wifi\source\driver.c(669): error:  #20: identifier "EAFNOSUPPORT" is undefined
  		Errno = EAFNOSUPPORT;
Libraries\ti\drivers\net\wifi\source\driver.c(674): error:  #20: identifier "EADDRINUSE" is undefined
  		Errno = EADDRINUSE;
Libraries\ti\drivers\net\wifi\source\driver.c(679): error:  #20: identifier "EADDRNOTAVAIL" is undefined
  		Errno = EADDRNOTAVAIL;
Libraries\ti\drivers\net\wifi\source\driver.c(684): error:  #20: identifier "ENETUNREACH" is undefined
  		Errno = ENETUNREACH;
Libraries\ti\drivers\net\wifi\source\driver.c(689): error:  #20: identifier "ENOBUFS" is undefined
  		Errno = ENOBUFS;
Libraries\ti\drivers\net\wifi\source\driver.c(694): error:  #20: identifier "EISCONN" is undefined
  		Errno = EISCONN;
Libraries\ti\drivers\net\wifi\source\driver.c(699): error:  #20: identifier "ENOTCONN" is undefined
  		Errno = ENOTCONN;
Libraries\ti\drivers\net\wifi\source\driver.c(704): error:  #20: identifier "ETIMEDOUT" is undefined
  		Errno = ETIMEDOUT;
Libraries\ti\drivers\net\wifi\source\driver.c(709): error:  #20: identifier "ECONNREFUSED" is undefined
  		Errno = ECONNREFUSED;
Libraries\ti\drivers\net\wifi\source\driver.c(730): error:  #20: identifier "EBADE" is undefined
  	    Errno = EBADE;

There must be no #ifdef

/*
 * driver.c - CC31xx/CC32xx Host Driver Implementation
 *
 * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
 *
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
 *
 *    Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 *    Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the
 *    distribution.
 *
 *    Neither the name of Texas Instruments Incorporated nor the names of
 *    its contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

/*****************************************************************************/
/* Include files                                                             */
/*****************************************************************************/
#include <ti/drivers/net/wifi/simplelink.h>
#include <ti/drivers/net/wifi/source/protocol.h>
#include <ti/drivers/net/wifi/source/driver.h>
#include <ti/drivers/net/wifi/source/flowcont.h>
#ifdef SL_INC_INTERNAL_ERRNO
#include <ti/drivers/net/wifi/bsd/errno.h>
#endif

Because errno.h contains definitions for the error codes above.

I think, this bug exists in previous versions of the driver too. As well as it was mentioned on forum before. But it is not fixed still.

Best regards,

Eugene