rtos/tinyara.git
7 years agonet: modify network Kconfig entries for udp, icmp, mem
Sangsoon Lim [Thu, 13 Apr 2017 04:13:30 +0000 (13:13 +0900)]
net: modify network Kconfig entries for udp, icmp, mem

Configuration sync with Tizen RT spin git for udp, icmp, mem.

Change-Id: I43930d7de11f88c8e3d92e40c1aaa8512d91ce90
Signed-off-by: Sangsoon Lim <ssoon.lim@samsung.com>
7 years agowireless/scsc: introduce up_wlan_get_firmware()
Heesub Shin [Thu, 13 Apr 2017 08:20:58 +0000 (17:20 +0900)]
wireless/scsc: introduce up_wlan_get_firmware()

This commit adds a new board-specific function, up_wlan_get_firmware()
that returns the address to flash region WiFi Firmware is stored.

Change-Id: I2f73f12b9e31188ee5e0777ab042eb577256ef03
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: drop s5j_efuse.c
Heesub Shin [Thu, 13 Apr 2017 06:51:03 +0000 (15:51 +0900)]
s5j: drop s5j_efuse.c

Though it is stored in the internal e-fuse region of S5J chipset, how we
store and retrieve the MAC address on the actual board depends on the
actual board. In other words, managing MAC address is a board-specific
thing. On some board, MAC address might be stored to an external flash.
Thus, up_wlan_get_mac_addr() should be moved to BSP layer, not S5J.

Change-Id: I764e98c1dfb93ebcc227f6c5079731f34d5abd39
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agowireless/scsc: introduce up_wlan_get_mac_addr()
Heesub Shin [Thu, 13 Apr 2017 06:45:10 +0000 (15:45 +0900)]
wireless/scsc: introduce up_wlan_get_mac_addr()

This commit renames s5j_efuse_get_mac_addr() to up_wlan_get_mac_addr().

Change-Id: Ib46a169c4aa1527d6afab075d35c6005efe9be85
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: remove artik053_nvram.c
Heesub Shin [Thu, 13 Apr 2017 06:01:20 +0000 (15:01 +0900)]
artik053: remove artik053_nvram.c

artik053_nvram.c contains functions that access NVRAM configuration data
for WiFi. For consistency, move the contents of s5jt200_nvram.c to
s5jt200_wlan.c which is for wireless stuff.

Change-Id: I51cd1fc8cbae6e9cfc250998a549e373a42b1e52
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: remove s5jt200_nvram.c
Heesub Shin [Thu, 13 Apr 2017 05:49:31 +0000 (14:49 +0900)]
sidk_s5jt200: remove s5jt200_nvram.c

s5jt200_nvram.c contains functions that access NVRAM configuration data
for WiFi. For consistency, move the contents of s5jt200_nvram.c to
s5jt200_wlan.c which is for wireless stuff.

Change-Id: I2ca33c487f18e44d1a5708b77fd7baf62b7919cc
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agowireless/scsc: introduce up_wlan_init()
Heesub Shin [Thu, 13 Apr 2017 05:43:54 +0000 (14:43 +0900)]
wireless/scsc: introduce up_wlan_init()

wlan_initup() is called during wifi driver setup for initializing
board-specific things. To follow the convention, rename it to
up_wlan_init().

Change-Id: I7064aead73105ddb847af6aee30058efd7e6105e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: make wlan_init() static
Heesub Shin [Thu, 13 Apr 2017 05:40:10 +0000 (14:40 +0900)]
sidk_s5jt200: make wlan_init() static

wlan_init() is dereferenced by up_wlan_init() only. Let's make it
static.

Change-Id: Ia0e716a4d27e4c89ceb763f7a39314cb654dad6a
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: move wlan_initup() to s5jt200_wlan.c
Heesub Shin [Thu, 13 Apr 2017 05:37:35 +0000 (14:37 +0900)]
sidk_s5jt200: move wlan_initup() to s5jt200_wlan.c

wlan_initup() should be moved to s5jt200_wlan.c that contains
WiFi related functions.

Change-Id: Ic0148e29195d648d198ac187f6a72da3ece6ef2b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: rename wlan.c to s5jt200_wlan.c
Heesub Shin [Thu, 13 Apr 2017 05:32:30 +0000 (14:32 +0900)]
sidk_s5jt200: rename wlan.c to s5jt200_wlan.c

s/wlan.c/s5jt200_wlan.c/

Change-Id: I0578ae9288b838eb67ca65b9396c7635ebcd1b14
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: reorder #include
Heesub Shin [Thu, 13 Apr 2017 05:28:48 +0000 (14:28 +0900)]
artik053: reorder #include

Standard headers should appear before the other application-specific
things.

Change-Id: I430985ae495609ceb979c30478fdd89ed7373aa5
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: clean up wlan.c
Heesub Shin [Thu, 13 Apr 2017 05:27:19 +0000 (14:27 +0900)]
sidk_s5jt200: clean up wlan.c

Removes unnecessary code lines and #include.

Change-Id: Ie2b6cd2f2d8cff41753fde5ca52314df4eae52f7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoexamples/sensorbd_demo: fix spi example
Junhwan Park [Thu, 13 Apr 2017 02:36:43 +0000 (11:36 +0900)]
examples/sensorbd_demo: fix spi example

Fix spi examples on sensor board.

Change-Id: Ib44e4e3afd51aed12db958c03bacc18d95cb5a4a
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agobuild: renew "Build Time" whenever building a new image
Wonsang Ryou [Tue, 11 Apr 2017 08:55:47 +0000 (17:55 +0900)]
build: renew "Build Time" whenever building a new image

This patch renews .version and version.h whenever building a new
tizenrt image.

Change-Id: Idd6ddbc863ba98c42293599fb02d2bfcc3e69056
Signed-off-by: Wonsang Ryou <wonsang.yoo@samsung.com>
7 years agonet/tls: indicate the platform specific patch
Junyeon LEE [Wed, 12 Apr 2017 09:01:34 +0000 (18:01 +0900)]
net/tls: indicate the platform specific patch

This commit indicates the TIZENRT specific patch and fixes
minor bug in net.c

Change-Id: I2c8c2f44195077137118b87a40bccb43e2e838cd
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agotestcase: fix compilation error
Heesub Shin [Thu, 13 Apr 2017 02:23:50 +0000 (11:23 +0900)]
testcase: fix compilation error

TC_ASSERT_EQ_CLEANUP() was written wrongly and causes compilation errors
as following:

CC: ta_tc/systemio/itc/itc_uart.c
    In file included from ta_tc/systemio/itc/itc_internal.h:22:0,
                     from ta_tc/systemio/itc/itc_uart.c:34:
    ta_tc/systemio/itc/itc_uart.c: In function 'itc_iotbus_uart_write_read_p':
    ta_tc/systemio/itc/itc_uart.c:163:51: error: suggest parentheses around comparison in operand of '!=' [-Werror=parentheses]
         TC_ASSERT_EQ_CLEANUP("iotbus_uart_write", ret < 0, false, "Not able to write", iotbus_uart_stop(h_uart));
                                                       ^
    ta_tc/systemio/itc/../../../tc_common.h:48:6: note: in definition of macro 'TC_ASSERT_EQ_CLEANUP'
      if (var != ref) {\
          ^
    ta_tc/systemio/itc/itc_uart.c:168:50: error: suggest parentheses around comparison in operand of '!=' [-Werror=parentheses]
         TC_ASSERT_EQ_CLEANUP("iotbus_uart_read", ret < 0, false, "Not able to read", iotbus_uart_stop(h_uart));
                                                      ^
    ta_tc/systemio/itc/../../../tc_common.h:48:6: note: in definition of macro 'TC_ASSERT_EQ_CLEANUP'
      if (var != ref) {\
          ^
    cc1: all warnings being treated as errors

This commit fixes this.

Change-Id: I5b026b59e5e04925bec1c732cbb7de549d76fb7b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonetutils/wifi: fix data abort in monitor thread on exit
EunBong Song [Wed, 12 Apr 2017 23:29:05 +0000 (08:29 +0900)]
netutils/wifi: fix data abort in monitor thread on exit

Caused by the fact that both monitor and main task made calls to
supplicant and 'terminate' overtook 'remove network' comamnd. Solution
made by not ot release sem_wait until after completion.

Change-Id: Iccf1e4b8c6be350fd72c86f4c3e88a233171252e
Signed-off-by: Trine Borgbjerg Jensen <trine.jensen@samsung.com>
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonet: modify network Kconfig entries for socket
Sangsoon Lim [Tue, 11 Apr 2017 04:33:39 +0000 (13:33 +0900)]
net: modify network Kconfig entries for socket

Configuration sync with Tizen RT spin git for socket and tcp.

Change-Id: Iebfaf0d290e3dbb253d41c978a308469ee889092

7 years agonet/tls: clean up the security apis
Junyeon LEE [Tue, 11 Apr 2017 09:44:59 +0000 (18:44 +0900)]
net/tls: clean up the security apis

This commit cleans up the security apis.
 . Diversify return values for debugging
 . Remove all unused definitions

Change-Id: I1e7427dd5289b40c019e16411326d3292cf3a030
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: simplify sss certificate api
Junyeon LEE [Tue, 11 Apr 2017 08:59:41 +0000 (17:59 +0900)]
net/tls: simplify sss certificate api

By removing certificate type dependency, sss storage can store
all types of certificate.

Change-Id: I9ff8037fe840ba8a7f2d5465b2e7d5e31a0809d7
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet lwip: disable priority inheritance on all signaling semaphores
EunBong Song [Tue, 11 Apr 2017 06:55:05 +0000 (15:55 +0900)]
net lwip: disable priority inheritance on all signaling semaphores

Disable priority inheritance on all semaphores used for signaling in lwip.

Change-Id: I8c01ddf8c0ff588cbb9948085d6e08986f5b2886
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonetutils/dhcpc: minor patch for handling exception cases
Jin-Seong Kim [Tue, 11 Apr 2017 05:00:19 +0000 (14:00 +0900)]
netutils/dhcpc: minor patch for handling exception cases

This commit is the patch to handling exception cases
 - when abnormal interface name is coming from applications,
   dhcpc should not run
 - arguments used by dhcpc_request must not be null

Change-Id: I4c3639b9b18f4e5ceee91648241981622695c0d1
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/dhcpd: minor patch for handling exception cases
Jin-Seong Kim [Tue, 11 Apr 2017 04:47:39 +0000 (13:47 +0900)]
netutils/dhcpd: minor patch for handling exception cases

This commit is the patch to handling exception cases
 - when abnormal interface name is coming from applications,
   dhcpd should not run
 - dhcpd_run always return OK, it is not good to handle operation
   of dhcpd in application

Change-Id: I88249dabd727fdd1f8af5a6749efc99ded56406f
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonet/tls: removes unused files
Junyeon LEE [Tue, 11 Apr 2017 07:35:59 +0000 (16:35 +0900)]
net/tls: removes unused files

This commit removes all legacy files in tls library

Change-Id: I8fc6e509fb79a0785fc2793c228290b604711372
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/webserver: fix closing function
Junyeon LEE [Tue, 11 Apr 2017 01:52:29 +0000 (10:52 +0900)]
netutils/webserver: fix closing function

This commit fixes the way of closing webserver thread.
Sometimes webserver can't kill the child pthread properly
and it causes some problem.

Change-Id: I2a2b1d95970f1e84fdcd4a51b9fa5ab25f7b70fd
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: fix mutex bug with cookie context
Junyeon LEE [Tue, 11 Apr 2017 01:46:13 +0000 (10:46 +0900)]
net/tls: fix mutex bug with cookie context

Uninitialized mutex context has possible to make data abort and
fixes it with this commit. Excepts this patch, ssl context can't
get a mutex.

Change-Id: I942e8bf8e971206eeb58e5d68e3ec9458270f614
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoapps/examples: tidy up bit
Junyeon LEE [Tue, 11 Apr 2017 01:09:00 +0000 (10:09 +0900)]
apps/examples: tidy up bit

Fixes trivial coding style issues.

Change-Id: I597e99c043081b15d04ab17ea40558686d0084fc
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agos5j/pwrcal: add to support SPI frequency
Ivan [Tue, 11 Apr 2017 13:53:08 +0000 (22:53 +0900)]
s5j/pwrcal: add to support SPI frequency

Change-Id: I4a19d4a1e47e29ebf385983109bf6aa85f8efa6b
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agosidk_s5jt200: specify tagno when creating an mtd partition
EunBong Song [Mon, 10 Apr 2017 22:53:15 +0000 (07:53 +0900)]
sidk_s5jt200: specify tagno when creating an mtd partition

There is no knob for finding mtd part using get_mtd_partition().
This patch adds partno info for providing knob in
sidk_s5jt200_configure_partitions.

Change-Id: I482bc2919a14135555943369e7f42b4161d68557
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoartik053: specify tagno when creating an mtd partition
EunBong Song [Mon, 10 Apr 2017 22:52:30 +0000 (07:52 +0900)]
artik053: specify tagno when creating an mtd partition

There is no knob for finding mtd part using get_mtd_partition().
This patch adds partno info for providing knob in
artik053_configure_partitions.

Change-Id: Ifa1004a471c66f0a0ff6d42935985ad53a10c7f1
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agodrivers/serial: simplify signaling method
EunBong Song [Tue, 11 Apr 2017 23:32:52 +0000 (08:32 +0900)]
drivers/serial: simplify signaling method

Commit ca9015e7 set xmitsem as a signaling semaphore. So we do not need
to use sem_wait_for_isr and sem_post_from_isr for xmitsem.

Change-Id: I4d895429f5f55014be463721bf642d513593d3ae
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agos5j: remove NVRAM_WIFI_START Kconfig knob
Heesub Shin [Wed, 12 Apr 2017 09:07:16 +0000 (18:07 +0900)]
s5j: remove NVRAM_WIFI_START Kconfig knob

NVRAM_WIFI_START is a Kconfig knob for the physical address on the flash
where the NVRAM data is stored to. This commit removes it because we are
not using it any more. All other related code lines are also removed.

Change-Id: Ia6d87091d9063e726fe744c5d3fc62ad8cc9cf0b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonetutils/wifi: rework nvram interfaces
Heesub Shin [Wed, 12 Apr 2017 08:27:39 +0000 (17:27 +0900)]
netutils/wifi: rework nvram interfaces

Every boards that are based on S5J should implement Nv_Read/Write/Erase
that provide access NVRAM region WLAN configuration is stored to. The
interface names looks a little bit weird and their prototypes are
passing unnecessary parameters as well. Not only that, it is breaking
the OS design, specifying the physical address where the NVRAM data is
stored to. As flash partition layout might vary in board to board, upper
layer should not have any assumption on it. So, we need to redesign
those interfaces completely new.

This commit renames them to up_wlan_read/write/erase_config() and
changes function prototypes. Unnecessary or board-specific parameters
are dropped. They can be implemented in various manners suited to each
boards, though mtd_config device is being used to store the NVRAM data
in this commit.

Change-Id: I7d50de06f88a4b4ed58c16cc4f3634d5526633eb
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/wireless: clean up Kconfig hierarchy
Heesub Shin [Wed, 12 Apr 2017 07:33:01 +0000 (16:33 +0900)]
drivers/wireless: clean up Kconfig hierarchy

Kconfig entries for SCSC should be under drivers/wireless/scsc/Kconfig
as it is SCSC-specific.

Change-Id: I9bd0635080bec284e09eac8ecf97a18e8fc9a96e
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/wireless: simplify Kconfig
Heesub Shin [Wed, 12 Apr 2017 07:26:29 +0000 (16:26 +0900)]
drivers/wireless: simplify Kconfig

Removes unnecessary lines in Koncfig files for better readability and
maintainability.

Change-Id: I1ae7ddd400c26a7e01873261b619e6b6b3d5f944
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/wireless: fix incorrect Kconfig entry
Heesub Shin [Wed, 12 Apr 2017 07:18:20 +0000 (16:18 +0900)]
drivers/wireless: fix incorrect Kconfig entry

SCSC_PLATFORM should be a boolean, not a tristate. This commit fixes it
and set its default configuration as 'n'.

Change-Id: I0cc4b5d145d291e5d5ef3240e964f5e8718e235f
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/wireless: remove unused Kconfig entries
Heesub Shin [Wed, 12 Apr 2017 07:10:35 +0000 (16:10 +0900)]
drivers/wireless: remove unused Kconfig entries

SCSC_CORE_CM and SCSC_MMAP are not in use. This commit removes them.

Change-Id: I97bb01f1ddd957c2f3c1e35e0b163efe24f4ccb3
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agowifi: build wifi binaries from source code
Heesub Shin [Thu, 30 Mar 2017 01:19:11 +0000 (10:19 +0900)]
wifi: build wifi binaries from source code

So far, prebuilt libraries has been linked into the final output. This
is problematic because prebuilt libraries might get mismatched with
others when global OS configuration has changed.

To avoid this, we have decided to put the full source of those prebuilt
libraries into TizenRT, so that they can be built fresh from the ground
up.

Change-Id: I467c6fe9c85c3fc69132b7b745564198e3dfbac7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agolwip: fix a compilation error
Jin-Seong Kim [Tue, 11 Apr 2017 04:26:04 +0000 (13:26 +0900)]
lwip: fix a compilation error

This commit is to fix compilation error due to NET_ARP_TABLE_SIZE
according to lwipopts.h, CONFIG_NET_ARP_TABLESIZE is intended
configuration.

Change-Id: Id9fd2a52117c7c4b739e64c452e31d2aecb0a69e
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agodrivers/gpio: rename internal functions
Heesub Shin [Mon, 10 Apr 2017 05:27:54 +0000 (14:27 +0900)]
drivers/gpio: rename internal functions

Internal functions in the GPIO upper-half driver, gpio_fopen/fclose()
reminds me of fopen/fclose() in C runtime. To follow the convention in
other upper-half drivers, remove 'f' prefix from their name.

Change-Id: I87f2e707cce3320e6d45771eb902d04e004547e7
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/gpio: make macros uppercase
Heesub Shin [Mon, 10 Apr 2017 05:25:37 +0000 (14:25 +0900)]
drivers/gpio: make macros uppercase

Macro functions should be uppercase like in other parts of TizenRT or
NuttX.

Change-Id: Idd95577fa99149212cf9fbecf44a93f52ad01d85
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/gpio: split GPIO driver into two parts
Heesub Shin [Mon, 10 Apr 2017 05:15:24 +0000 (14:15 +0900)]
s5j/gpio: split GPIO driver into two parts

This commits splits the GPIO driver into two parts. The first part will
handle GPIO pinmux control and the other will have lower-half driver
implementation. This is a preparation step for redesigning GPIO stuff.
Subsequent commits will rework GPIO things.

Change-Id: Id90d6a806dc6ede98b6cf5b3c5d431152a7fb17b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonet: clean up network Kconfig entries
Sangsoon Lim [Mon, 10 Apr 2017 06:23:42 +0000 (15:23 +0900)]
net: clean up network Kconfig entries

Configuration sync with Tizen RT spin git

Change-Id: Ia92d83312c9b7e9c02fe8a197b894ce0c47de4b3
Signed-off-by: Sangsoon Lim <ssoon.lim@samsung.com>
7 years agodns: move dns_add_nameserver() to dhcpc
Jin-Seong Kim [Mon, 10 Apr 2017 06:10:30 +0000 (15:10 +0900)]
dns: move dns_add_nameserver() to dhcpc

This commit is to change the place dns_add_nameserver function

when CONFIG_NETDB_DNSSERVER_BY_DHCP enabled, dns server IP address
is configured by using received dhcp message
without using ifconfig command, dns server can not be configured
so that to prevent the dns server configuration problem
we've changed the place of dns_add_nameserver to dhcpc

Change-Id: Iccf8be5aa601d87fecf42e0f0662c09779312342
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/tls_client: support client key authentication
Junyeon LEE [Mon, 10 Apr 2017 08:42:55 +0000 (17:42 +0900)]
examples/tls_client: support client key authentication

This commit adds key parsing routine in client example. Because
sometimes server requires client's signature for authentication.

Change-Id: Iddcf87417bac0e4eba092df845ee20b00597fad5
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexternal/wakaama: fix a trivial compilation error
Jin-Seong Kim [Mon, 10 Apr 2017 02:13:05 +0000 (11:13 +0900)]
external/wakaama: fix a trivial compilation error

This commit fixes a build error. The length of socket address should be
sa->sa_len = p->ai_addrlen with CONFIG_NET_LWIP configuration.

Change-Id: I88f396abd32ae805a157a62198ba36750294d7d4
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexamples/sensorbd_demo: fix spi port
Junhwan Park [Mon, 10 Apr 2017 07:00:53 +0000 (16:00 +0900)]
examples/sensorbd_demo: fix spi port

The sensor board's lis3lv02qd is connected to spi2.

Change-Id: I6e42419e021ea16389f95d77becd2298aab6f1f4
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agonet/tls: change default cache entry number
Junyeon LEE [Mon, 10 Apr 2017 10:30:12 +0000 (19:30 +0900)]
net/tls: change default cache entry number

This commit minimizes the default maximum entry count for memory saving.

Change-Id: Ic7d7578fb5e41530d56dc86b0b46df573fe87e74
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoexamples/tls_self: simplify the selftest example
Junyeon LEE [Mon, 10 Apr 2017 09:48:28 +0000 (18:48 +0900)]
examples/tls_self: simplify the selftest example

This commit simplifies the tls selftest example and makes
result printing currectly.

Change-Id: I70cc9156b1f0e57ca6869095db8034b314b1c0df
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonetutils/websocket: adds websocket status update function
Junyeon LEE [Mon, 10 Apr 2017 08:40:44 +0000 (17:40 +0900)]
netutils/websocket: adds websocket status update function

This commit updates missing status change. Websocket server can't
establishes the websocket_handler thread without changing status.

Change-Id: I98999a30983a1936740923ef36b194589be9f179
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agotestcase: simplify vfork test
EunBong Song [Mon, 10 Apr 2017 10:07:57 +0000 (19:07 +0900)]
testcase: simplify vfork test

This patch simplify vfork test logic.

Change-Id: I571b25d89962fa9f45715406c48d5d5a1de46395
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agotestcase: fix up tc_roundrobin.c problem
EunBong Song [Mon, 10 Apr 2017 10:01:09 +0000 (19:01 +0900)]
testcase: fix up tc_roundrobin.c problem

tc_roundrobin try to create 15 pthread. In case of CONFIG_MAX_TASKS is
16 or smaller than 16. This should fail. This patch fix up this problem.

Change-Id: I0e773d275db29a262a0acf4cd7f66c1abdf3e734
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agotestcase: fix up tc_clock.c problem
EunBong Song [Mon, 10 Apr 2017 09:58:49 +0000 (18:58 +0900)]
testcase: fix up tc_clock.c problem

clock_initialize() function should be called when os startup.
So calling this function in testcase app is not proper. So remove this tc.
tc_clock_clock_abstime2ticks() verify clock_abstime2ticks() function.
And this function multiply current seconds 2 times. And this cause overflow.
I think it's enough just 1 second add for verification.

Change-Id: Ice56ec8df934565b6d4e7019c4708522648f581a
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agopthread: fix pthread_mutexattr_init()
EunBong Song [Mon, 10 Apr 2017 05:55:52 +0000 (14:55 +0900)]
pthread: fix pthread_mutexattr_init()

It was not initialzing the protocol field when priority inheritance is
enabled. All credits should go to Gregory Nutt who wrote the original
commit.

Change-Id: Ib50bf1c0e4d21d306492c50d944dc6a03e5e2bc7
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Song: backported 769427ed from NuttX]
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agos5j/spi: fix initialization bug of SPI driver
Ivan [Mon, 10 Apr 2017 18:41:33 +0000 (03:41 +0900)]
s5j/spi: fix initialization bug of SPI driver

Durung code rework, hardcoding was replaced by macro definitions.
Function setmode had to have inverted MASK to clear bitfields.
It was not invered, therefore all bits except mode were cleared.

Change-Id: Ib7ca3e00f81b55d7c8593a55091ea00e05047853
Signed-off-by: Ivan <ivan.galkin@samsung.com>
7 years agodrivers/gpio: tidy up a bit
Heesub Shin [Mon, 10 Apr 2017 02:12:03 +0000 (11:12 +0900)]
drivers/gpio: tidy up a bit

Fixes trivial coding styles.

Change-Id: I1fc80dce0cea0aa8f92ebff8bf79e5a2fef5bf11
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: s/s5j_gpioinitialize/board_gpio_initialize/
Heesub Shin [Mon, 10 Apr 2017 02:01:08 +0000 (11:01 +0900)]
sidk_s5jt200: s/s5j_gpioinitialize/board_gpio_initialize/

The name of s5j_gpioinitialize() seems so ambiguous that does not
represent its characteristics of board-specific. Let's rename it for
better consistency, removing the prefix 's5j'.

Change-Id: I8c77e9d93ae264a59825cacddcc39f5cb0bdd253
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: s/s5j_gpioinitialize/board_gpio_initialize/
Heesub Shin [Mon, 10 Apr 2017 01:55:05 +0000 (10:55 +0900)]
artik053: s/s5j_gpioinitialize/board_gpio_initialize/

The name of s5j_gpioinitialize() seems so ambiguous that does not
represent its characteristics of board-specific. Let's rename it for
better consistency, removing the prefix 's5j'.

Change-Id: Ieeef41afa84b27d79498dc26f680c831dce5881b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: remove unused code lines
Heesub Shin [Mon, 10 Apr 2017 01:32:34 +0000 (10:32 +0900)]
sidk_s5jt200: remove unused code lines

board_button_irq() and board_button_handler() are not in use, as
there is no Kconfig entry that enables them. Let's remove them. We can
add it later when we need it again.

Change-Id: Id1365e300926886aaa0eac010d9e6a482ed3fcdf
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: clean up s5jt200_buttons.c
Heesub Shin [Mon, 10 Apr 2017 01:26:36 +0000 (10:26 +0900)]
sidk_s5jt200: clean up s5jt200_buttons.c

Fixes trivial coding styles.

Change-Id: Iaaee10a7ee9363e8b4c2d066b4a81c00bfca3e5d
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sflash: fix a link error
Heesub Shin [Mon, 10 Apr 2017 00:28:14 +0000 (09:28 +0900)]
s5j/sflash: fix a link error

This commit fixes a link error that occurs on a specific combination of
configurations.

    /home/heesub/Documents/artik053/tizenrt/os/../build/output/libraries/libarch.a(s5j_sflash.o): In function `s5j_sflash_init':
    /home/heesub/Documents/artik053/tizenrt/os/arch/arm/src/chip/s5j_sflash.c:258: undefined reference to `lldbg'
    Makefile:187: recipe for target '../build/output/bin/tinyara' failed

Change-Id: I76047db6d86a2c244f245ba52380b45118ddb981
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoarm: s5j: remove up_gpioinitialize()
Heesub Shin [Sun, 9 Apr 2017 10:07:11 +0000 (19:07 +0900)]
arm: s5j: remove up_gpioinitialize()

up_gpioinitialize() was invented while we were working on the BSP for
BCM4390x. Its purpose was for initializing GPIO ports and registering
device nodes for them during the boot sequence, but it was a bad idea.
Available GPIO ports may varies from device to device. This means that
exporting which GPIO ports should be decided at board initialization,
not OS or chip initialization. Having up_gpioinitialize() at the
chip-specific layer is breaking the OS design.

This is why up_gpioinitialize() had been left abandoned for a long time
and finally become an empty function. It is time to remove it
completely. This commit does not make any functional differences.

Change-Id: I0217b377050613502933f4b6ba7b8024ff9937f1
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/i2c: remove s5j_i2c_reset()
Heesub Shin [Sun, 9 Apr 2017 09:32:58 +0000 (18:32 +0900)]
s5j/i2c: remove s5j_i2c_reset()

s5j_i2c_reset() is not in use. It is compiled only when we have enabled
CONFIG_I2C_RESET which depends on ARCH_HAVE_I2CRESET, but it is never
set in S5J platform. Both Kconfig knobs have never been enabled, so
there is no point in having s5j_i2c_reset(). This commit removes it.

This commit does not make any functional differences.

Change-Id: Ia14f169fee75d0b4bde60595b020f5a8bf93895f
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers: clean up duplicated Kconfig entries
Heesub Shin [Sun, 9 Apr 2017 09:24:03 +0000 (18:24 +0900)]
drivers: clean up duplicated Kconfig entries

I2C Kconfig entries are heavily duplicated. This commit fixes it.

Though some of them seems to be broken at this moment, this commit does
not fix it. It will be fixed subsequent commits if really needed.

Change-Id: I387c770d655605746d7947fe15ba5f366de6ce78
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/adc: check the number of configured channels
Heesub Shin [Fri, 7 Apr 2017 05:44:54 +0000 (14:44 +0900)]
s5j/adc: check the number of configured channels

S5J has 4 ADC channels maximum. If it is requested to be configured
greater than that, s5j_adc_initialize() should return an error.

Change-Id: I4dd071c288b530b90c86b55dca78a12b9cc1bde6
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agoartik053: register ADC driver at boot
Heesub Shin [Thu, 6 Apr 2017 12:02:34 +0000 (21:02 +0900)]
artik053: register ADC driver at boot

S5J supports 4 ADC channels and they are exported through GPIO pins of
ARTIK-053 starter kit. This commit initializes the ADC driver and
registers a device ndoe at boot stage, so that users may open it and get
conversion samples from ADC.

Change-Id: I0f01ca1bccdd39f10d704894fa1293936451b0fa
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agosidk_s5jt200: register ADC driver at boot
Heesub Shin [Thu, 6 Apr 2017 12:02:20 +0000 (21:02 +0900)]
sidk_s5jt200: register ADC driver at boot

S5J supports 4 ADC channels that are exported through GPIO pins. This
commit initializes the ADC driver and registers a device node at boot
stage.

Change-Id: Ida2f6932dc6a8d8b73b36eda735ff6d207b9aca4
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: add to support ADC
Junhwan Park [Thu, 6 Apr 2017 04:07:40 +0000 (13:07 +0900)]
s5j: add to support ADC

This commit adds an implementation of lower-half driver for ADC. Once
triggered, all configured channels are sampled. Sampling only a single
channel is not supported for now. Selecting conversion mode is also not
supported, operating in 4-time conversion mode only.

Change-Id: I5ffb626b25d04db4b8a68082670419f7e7b192f8
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agodrivers/adc: update upper-half layer
Heesub Shin [Thu, 6 Apr 2017 03:53:32 +0000 (12:53 +0900)]
drivers/adc: update upper-half layer

This commit updates the upper-half driver of ADC subsystem,
synchronizing with the latest version of NuttX. ADC drivers that
implements the lower-half can be broken with this commit, but in TizenRT
there is no lower-half driver of ADC. Thus, this commit does not cause
any harm. All credits should go to many other contributors who wrote the
original patches for NuttX. Sorry for not listing their names here.

Change-Id: I42dc6b1fa597ae74494ef635897b4bc695e1c343
[Shin: backported from the latest NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: fix compilation errors
Heesub Shin [Thu, 6 Apr 2017 02:27:06 +0000 (11:27 +0900)]
kernel/semaphore: fix compilation errors

Handle a case of missing proxy sem_setprotocol. Reorder so that (1) this
error is avoided, and (2) no proxy is needed if priority inheritance is
not enabled.

Change-Id: I4421e3e929567fcdb43fdd2e031e49ceb6fc252f
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 73fc186b from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: fix broken macros
Heesub Shin [Thu, 6 Apr 2017 02:11:50 +0000 (11:11 +0900)]
kernel/semaphore: fix broken macros

Fixes compilation errors that might happen when
CONFIG_PRIORITY_INHERITANCE is not set.

Change-Id: I926c32914e928de03c11015aa64a63164f19d25c
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 4c8ec0d2 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/sched: disable priority inheritance on all signaling semaphores
Heesub Shin [Thu, 6 Apr 2017 02:02:50 +0000 (11:02 +0900)]
kernel/sched: disable priority inheritance on all signaling semaphores

Disable priority inheritance on all semaphores used for signaling.

Change-Id: Iaaac2a321fb127e76d01c1eadf625f47134181b0
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 1da3a5f from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agofs: disable priority inheritance on all signaling semaphores
Heesub Shin [Thu, 6 Apr 2017 01:56:27 +0000 (10:56 +0900)]
fs: disable priority inheritance on all signaling semaphores

Disable priority inheritance on all semaphores used for signaling.

Change-Id: I2d032767bff07012d7724a2228705dc125d42fd8
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported dbbe46a2 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers: disable priority inheritance on all signaling semaphores
Heesub Shin [Thu, 6 Apr 2017 01:48:41 +0000 (10:48 +0900)]
drivers: disable priority inheritance on all signaling semaphores

Disable priority inheritance on all semaphores used for signaling.

Change-Id: Id395323d2856a20139c142daa7683d1a933fb877
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 4fcbe8e41 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agodrivers/serial: disable priority inheritance on some semaphores
Heesub Shin [Thu, 6 Apr 2017 01:19:54 +0000 (10:19 +0900)]
drivers/serial: disable priority inheritance on some semaphores

Make sure that priority inheritance is not enabled for the signaling
semaphores used in the serial driver.

Change-Id: Icab16a77b5370016f6cadf2f29853164511dc41d
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 47b043df from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: add macros for sem_get/setprotocol()
Heesub Shin [Thu, 6 Apr 2017 01:11:40 +0000 (10:11 +0900)]
kernel/semaphore: add macros for sem_get/setprotocol()

Provide macros for sem_setprotocol() and sem_getprotocol() if priority
inheritance is not enabled. More SEM_PRIO_* definitions to
include/tinyara/semaphore.h.

All credits should go to Gregory Nutt who wrote the original patch.

Change-Id: Id0f931210629e5b15db5c659b914794662f04adc
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 97bf82ee from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: move non-standard prototype
Heesub Shin [Thu, 6 Apr 2017 00:59:58 +0000 (09:59 +0900)]
kernel/semaphore: move non-standard prototype

Move prototypes for the non-standard include/semaphore.h file to the
non-standard include/tinyara/semaphore.h with the other non-standard
semaphore interfaces.

All credits should go to Gregory Nutt who wrote the original patch.

Change-Id: I970391b2a3510279e964db3cce2345a5db91f8eb
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported d5b4d848 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: update some comments on nsem_inode_s
Heesub Shin [Thu, 6 Apr 2017 00:51:43 +0000 (09:51 +0900)]
kernel/semaphore: update some comments on nsem_inode_s

Add more description on some field of struct nsem_inode_s.

Change-Id: Icb3f2fbaeba400a163787430c145c8b47586ff13
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 6c51544e from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: move sem_getprotocol() to libc
Heesub Shin [Thu, 6 Apr 2017 00:47:32 +0000 (09:47 +0900)]
kernel/semaphore: move sem_getprotocol() to libc

sem_getprotocol() can be in C library. Backported from NuttX. All
credits should go to Gregory Nutt.

Change-Id: Ic0725f246acaef3839142a460f5713c9fda4fdec
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backport b738a646a from upstream]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: add new APIs for priority inheritance
Heesub Shin [Thu, 6 Apr 2017 00:31:18 +0000 (09:31 +0900)]
kernel/semaphore: add new APIs for priority inheritance

This commit introduces new APIs, pthread_mutexattr_get/set_protocol and
non-standard sem_get/set_protocol, which allow to enable or disable
priority inheritance on a single semaphore. Backported from NuttX. All
credits should go to Gregory Nutt who wrote the original patch.

Change-Id: I05c62a6a4ee6fbdb00b0478bf8ef8cfe44487f92
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 92d30224 from the upstream]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agokernel/semaphore: add a new internal interface sem_reset()
Heesub Shin [Thu, 6 Apr 2017 02:42:57 +0000 (11:42 +0900)]
kernel/semaphore: add a new internal interface sem_reset()

Add an internal interface to reset a semaphore count.

Change-Id: I7d443a80833f06fd20e9baa200122a43569d4e8d
Signed-off-by: Gregory Nutt <gnutt@nuttx.org>
[Shin: backported 5d63cd85 from NuttX]
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agonetdb/dns: increase the response buffer size
Jin-Seong Kim [Fri, 7 Apr 2017 10:20:52 +0000 (19:20 +0900)]
netdb/dns: increase the response buffer size

Some DNS response has lots of canonical name. In this case, hostname
cannot be resolved due to insufficient size of DNS response message
buffer. To prevent DNS hostname resolving issue, increase DNS response
buffer size from 95 to 512.

Change-Id: I6aa269fe305753aba18c7b6bd275e5fc2bd2be03
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoapps: add the dnsclient_test as an example application
Jin-Seong Kim [Fri, 7 Apr 2017 10:13:44 +0000 (19:13 +0900)]
apps: add the dnsclient_test as an example application

This commit is initial commit to support dnsclient test example

Change-Id: I6e1dc5f4132f799c00df3cedfff88ed698f52405
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agonetutils/webclient: seperate wget_base()
Junyeon LEE [Fri, 7 Apr 2017 09:38:59 +0000 (18:38 +0900)]
netutils/webclient: seperate wget_base()

This commit seperates wget_base() to 3 parts for readabilty.

Change-Id: I2eb1a62852c76cf7cc488260deb8f0da9b546b21
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agoapps/system: fix trivial typo in Kconfig
EunBong Song [Fri, 7 Apr 2017 08:00:09 +0000 (17:00 +0900)]
apps/system: fix trivial typo in Kconfig

CONFIG_NET_LWIP should be changed to NET_LWIP.

Change-Id: I73629f713c5a04f3b949a67f9407862a48a6841b
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoartik053: initialize pwm at boot
Junhwan Park [Tue, 4 Apr 2017 12:40:36 +0000 (21:40 +0900)]
artik053: initialize pwm at boot

Initialize PWMs at board_initialize().

Change-Id: Ie399cc97bc2233c17318057594711c3e5c44614b
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoartik053: export GPIO pins at boot
Junhwan Park [Tue, 4 Apr 2017 12:27:10 +0000 (21:27 +0900)]
artik053: export GPIO pins at boot

Export GPIO pins that are actually supported on the ARTIK-053 starter
kit.

Change-Id: Ie06626bb89513f8b90d7f9d07acc33c1b4fcb0d6
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoapps/examples: add an application for sensor board
Junhwan Park [Tue, 4 Apr 2017 12:04:58 +0000 (21:04 +0900)]
apps/examples: add an application for sensor board

This patch adds an example application for the sensor board expansion to
the ARTIK-053 starter kit. It is only for internal development and
verification, testing external peripheral IPs.

Change-Id: Ie8c1aee7a8295bc927ff0a498838361b4d886af4
Signed-off-by: Junhwan Park <junhwan.park@samsung.com>
7 years agoapps/testcase: fix a link error
EunBong Song [Thu, 6 Apr 2017 07:57:04 +0000 (16:57 +0900)]
apps/testcase: fix a link error

This patch fixes a link error below:

    make[2]: Leaving directory `/home/ebsong/tizenrt/os/arch/arm/src/sidk_s5jt200/src'
    LD: tinyara
    /home/ebsong/tizenrt/os/../build/output/libraries/libapps.a(tc_tash_stackmonitor.o): In function `tc_tash_stackmonitor':
    /home/ebsong/tizenrt/apps/examples/testcase/le_tc/kernel/tc_tash_stackmonitor.c:64: undefined reference to `TC_ASSERT_EQ'
    /home/ebsong/tizenrt/apps/examples/testcase/le_tc/kernel/tc_tash_stackmonitor.c:68: undefined reference to `TC_SUCCESS_RESULT'

Change-Id: If6a7d19886cae779112b4b2165673d0547b6316a
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoapps/testcase: fix compilation warning
EunBong Song [Thu, 6 Apr 2017 07:49:17 +0000 (16:49 +0900)]
apps/testcase: fix compilation warning

This patch fixes a compilation warning below:

    le_tc/kernel/tc_tash_heapinfo.c: In function 'tc_tash_heapinfo':
    ./tc_common.h:61:3: error: 'return' with no value, in function returning non-void [-Werror=return-type]
       return; \
       ^
    le_tc/kernel/tc_tash_heapinfo.c:84:2: note: in expansion of macro 'TC_ASSERT_EQ'
       TC_ASSERT_EQ("pthread_create", ret, OK);

Change-Id: Iabba8b1c44d57b26b2b4ea067495cca773c3251d
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agoexternal/wakaama: add an lwm2m client application
Jin-Seong Kim [Fri, 7 Apr 2017 00:18:35 +0000 (09:18 +0900)]
external/wakaama: add an lwm2m client application

This commit is initial commit to support lwm2mclient example
 - lwm2mclient callback function for pthread is changed to lwm2m_client_run
 - to support arguments comes from pthread, add lwm2m_client_input structure

Change-Id: Ica1e930ec49c084e24e1af32ee750c35a0dfe3ac
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agoexternal: introduce wakaama
Jin-Seong Kim [Thu, 6 Apr 2017 01:45:46 +0000 (10:45 +0900)]
external: introduce wakaama

This commit is an initial commit to support lwm2m through wakaama[1].

[1] https://github.com/eclipse/wakaama

Change-Id: I615b4ef26a7baba86d492776f13a10e1be84003d
Signed-off-by: Jin-Seong Kim <jseong82.kim@samsung.com>
7 years agos5j: remove all CONFIG_S5J_FLASH_XXX
Heesub Shin [Fri, 7 Apr 2017 08:25:05 +0000 (17:25 +0900)]
s5j: remove all CONFIG_S5J_FLASH_XXX

CONFIG_S5J_FLASH_XXX should not be used. Those definitions are
pretending as they are configurable, but definitely not. For example,
the base address of flash region is constant, not configurable. This
makes people very confused and should be fixed.

Change-Id: Ica687298da211e1c5b0944a053f285f2a711f7bc
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j/sss: do not use Kconfig constants
Heesub Shin [Fri, 7 Apr 2017 08:20:55 +0000 (17:20 +0900)]
s5j/sss: do not use Kconfig constants

Instead of using constants that are defined by Kconfig, use geometry
information provided by underlying MTD device.

This is a prepration step for removing CONFIG_S5J_FLASH_XXX that are not
actually configurable, but in Kconfig so making people confused.

Change-Id: I02dd1e39e8e642a0eceeda72e217b5a7b376f85b
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: add constant definitions of memory regions
Heesub Shin [Fri, 7 Apr 2017 07:51:51 +0000 (16:51 +0900)]
s5j: add constant definitions of memory regions

This commit adds memory map constants that defines the base addresses
and sizes of each memory region in S5J.

Change-Id: Ida674263f8ccf89c7511eed65ddd90602089ac25
Signed-off-by: Heesub Shin <heesub.shin@samsung.com>
7 years agos5j: fix trivial typo in Kconfig
EunBong Song [Thu, 6 Apr 2017 04:29:23 +0000 (13:29 +0900)]
s5j: fix trivial typo in Kconfig

S5J_FLASH_SIZE and S5J_BOOTLOADER_REGION_SIZE are bytes unit, so Kconfig
entries should be changed to byte-unit.

Change-Id: I25ded972c5583328c0ec6d1b95455f77aecbfd15
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agos5j/sflash: fix compilation error when CONFIG_MTD_PROGMEM is not set
EunBong Song [Thu, 6 Apr 2017 01:29:09 +0000 (10:29 +0900)]
s5j/sflash: fix compilation error when CONFIG_MTD_PROGMEM is not set

This patch fixes a compilation error at s5j_sflash_init() when
CONFIG_MTD_PROGMEM is disabled, but CONFIG_S5J_SFLASH.

Change-Id: I173cd4a500b2817ed73bf441e38ebb65bff53e96
Signed-off-by: EunBong Song <eunb.song@samsung.com>
7 years agonetutils/webserver: fix potential memory leak
Junyeon LEE [Fri, 7 Apr 2017 03:48:07 +0000 (12:48 +0900)]
netutils/webserver: fix potential memory leak

When webserver receives a websocket packet, it generates websocket
handler for processing the packet and inherits its own context. In this
process, mbedtls network file descriptor (fd) context was not inherited
properly and changed it. Because of this problem, the websocket client
handler thread cannot be released sometimes.

Change-Id: I9e70bd506a61091f442e8da8e18c62400b1bb211
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: fix a potential security hole that bypasses signature verification
Junyeon LEE [Thu, 6 Apr 2017 13:19:41 +0000 (22:19 +0900)]
net/tls: fix a potential security hole that bypasses signature verification

This commit fixes a critical issue about ECDH_ANON key-exchange. When
MBEDTLS_KEY_EXCHANGE_ECDH_ANON_ENABLED is enabled, TLS client could
bypass the signature verification and it would makes security hole.

Change-Id: I6123552ab3e899919a6fc046a5c4600a3d1b9ca2
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>
7 years agonet/tls: fix log flooding and data aborts
Junyeon LEE [Thu, 6 Apr 2017 08:12:22 +0000 (17:12 +0900)]
net/tls: fix log flooding and data aborts

This commit fixes two minor tls issues:
 . Log flooding when CONFIG_HW_DH_PARAM is enabled
 . Data abort at security APIs when called before see_init()

Change-Id: Ied77bc66adc732b21c472a9005fb28fe3eb421e3
Signed-off-by: Junyeon LEE <junyeon2.lee@samsung.com>