diff options
-rwxr-xr-x | misc/drivers/rtl8187x/rtl8187x.c | 24 | ||||
-rwxr-xr-x | nuttx/configs/olimex-lpc1766stk/wlan/defconfig | 4 | ||||
-rwxr-xr-x | nuttx/configs/vsn/nsh/defconfig | 19 | ||||
-rwxr-xr-x | nuttx/drivers/wireless/chipcon_cc1101.c | 2 |
4 files changed, 37 insertions, 12 deletions
diff --git a/misc/drivers/rtl8187x/rtl8187x.c b/misc/drivers/rtl8187x/rtl8187x.c index 437d2d62b..2016bd17f 100755 --- a/misc/drivers/rtl8187x/rtl8187x.c +++ b/misc/drivers/rtl8187x/rtl8187x.c @@ -4011,12 +4011,7 @@ static int rtl8187x_setup(FAR struct rtl8187x_state_s *priv) usleep(10); rtl8187x_eeprom_multiread(priv, RTL8187X_EEPROM_MACADDR, permaddr, 3); - - udbg("%.4x%.4x%.4x", permaddr[0], permaddr[1], permaddr[2]); - -#define RTL8187X_EEPROM_TXPWRCHAN1 0x16 /* 3 channels */ -#define RTL8187X_EEPROM_TXPWRCHAN6 0x1b /* 2 channels */ -#define RTL8187X_EEPROM_TXPWRCHAN4 0x3d /* 2 channels */ + udbg("MAC address: %04x.%04x.%04x", permaddr[0], permaddr[1], permaddr[2]); channel = priv->channels; for (i = 0; i < 3; i++) @@ -4084,9 +4079,22 @@ static int rtl8187x_setup(FAR struct rtl8187x_state_s *priv) } rtl8187x_write(priv, 0, 0x0b7); + + /* Save the MAC address in the device structure */ + + priv->ethdev.d_mac.ether_addr_octet[0] = permaddr[0] & 0xff; + priv->ethdev.d_mac.ether_addr_octet[1] = permaddr[0] >> 8; + priv->ethdev.d_mac.ether_addr_octet[2] = permaddr[1] & 0xff; + priv->ethdev.d_mac.ether_addr_octet[3] = permaddr[1] >> 8; + priv->ethdev.d_mac.ether_addr_octet[4] = permaddr[2] & 0xff; + priv->ethdev.d_mac.ether_addr_octet[5] = permaddr[2] >> 8; + + /* Provide information about the RTL device */ - udbg("hwaddr %.4x%.4x%.4x, rtl8187 V%d + %s\n", - permaddr[0], permaddr[1], permaddr[2], + udbg("hwaddr %02x.%02x.%02x.%02x.%02x.%02x, rtl8187 V%d + %s\n", + priv->ethdev.d_mac.ether_addr_octet[0], priv->ethdev.d_mac.ether_addr_octet[1], + priv->ethdev.d_mac.ether_addr_octet[2], priv->ethdev.d_mac.ether_addr_octet[3], + priv->ethdev.d_mac.ether_addr_octet[4], priv->ethdev.d_mac.ether_addr_octet[5], priv->asicrev, priv->rfinit == rtl8225_rfinit ? "rtl8225" : "rtl8225z2"); diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig index 7a8441feb..02b639bef 100755 --- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig +++ b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig @@ -900,5 +900,5 @@ CONFIG_HEAP_SIZE= # # USB WLAN device identification # -CONFIG_USB_WLAN_VID=0x148f -CONFIG_USB_WLAN_PID=0x3071 +CONFIG_USB_WLAN_VID=0x0bda +CONFIG_USB_WLAN_PID=0x8189 diff --git a/nuttx/configs/vsn/nsh/defconfig b/nuttx/configs/vsn/nsh/defconfig index f5b768224..c33e36dbf 100755 --- a/nuttx/configs/vsn/nsh/defconfig +++ b/nuttx/configs/vsn/nsh/defconfig @@ -255,9 +255,24 @@ CONFIG_SSI_POLLWAIT=y CONFIG_I2C=y # +# OS support for various wireless chipsets such as +# - Chipcon CC1101 operating in bands 300-400, 800-900 MHz +# - Chipcon CC2500 operating in band of 2 GHz +# +# Note: this has (at the moment) nothing to do with WIFI +# +CONFIG_WIRELESS=y + +# # OS support for hardware RTC # CONFIG_RTC=y +CONFIG_SYSTEM_UTC=y + +# +# OS support for events +# +CONFIG_EVENT=y # # General build options @@ -884,3 +899,7 @@ CONFIG_APPS_DIR="../apps" # Application configuration CONFIG_APPS_DIR="../apps" + +# Application configuration + +CONFIG_APPS_DIR="../apps" diff --git a/nuttx/drivers/wireless/chipcon_cc1101.c b/nuttx/drivers/wireless/chipcon_cc1101.c index 5c492a4fd..1f5a2015a 100755 --- a/nuttx/drivers/wireless/chipcon_cc1101.c +++ b/nuttx/drivers/wireless/chipcon_cc1101.c @@ -51,8 +51,6 @@ #include <nuttx/kmalloc.h> #include <nuttx/wireless/chipcon_cc1101.h> -#include <nuttx/ptimer.h> - /************************************************************************************ * Chipcon CC1101 Internal Registers |