Commit graph

41120 commits

Author SHA1 Message Date
Benjamin Walsh
4634871832 samples: speed up philosophers demo
Cut wait times by 4, in chunks in 25ms instead of 100ms. This allows to
see what is going on, but with much faster transitions, which makes the
demo slightly less boring.

Change-Id: I32fdd6e41a9af1fe9aa8a8f186de7945986b3a71
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:56 +00:00
Benjamin Walsh
66b99f1486 kernel: add _timeout_q dump before and after adding timeout
Kernel debugging aid.

Change-Id: I852ba2f626f133d943be2ecac41354fecca478d6
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:27 +00:00
Benjamin Walsh
99eef25815 kernel: do not use sys_dlist_insert_at() in _add_timeout()
Similar to _pend_queue, it's more efficient to do the logic inline.

Change-Id: I68ac4fbc26c97b6ec9322caef98504ff6ccc8727
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:26 +00:00
Benjamin Walsh
b8c2160a2b kernel: do not use sys_dlist_insert_at() in _pend_thread()
It's calling a function on every iteration, it's more efficient to just
do the logic inline.

Change-Id: I166e377d4ffb3056749fd625cb789173030904ac
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:26 +00:00
Benjamin Walsh
8ecd3e071b dlist: add sys_dlist_peek_tail()
Change-Id: I8f9335169531e61324d88bf98cdc002a9c24711e
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:25 +00:00
Benjamin Walsh
1774f62eda nios2: remove unused INT_ACTIVE/EXC_ACTIVE thread flags
Change-Id: I884e87107cf30a6b8a064bc1da3c1ea26380fe03
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:25 +00:00
Benjamin Walsh
d779f3d240 kernel/arch: streamline thread flag bits used
Use least significant bits for common flags and high bits for
arch-specific ones.

Change-Id: I982719de4a24d3588c19a0d30bbe7a27d9a99f13
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:24 +00:00
Benjamin Walsh
e6a69cae54 kernel/arch: reverse polarity on sched_locked
This will allow for an enhancement when checking if the thread is
preemptible when exiting an interrupt.

Change-Id: If93ccd1916eacb5e02a4d15b259fb74f9800d6f4
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:24 +00:00
Benjamin Walsh
04ed860c68 kernel: make _thread.sched_locked a non-atomic operator variable
Not needed, since only the thread itself can modifiy its own
sched_locked count.

Change-Id: I3d3d8be548d2b24ca14f51637cc58bda66f8b9ee
Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
2017-01-06 17:32:23 +00:00
Tomasz Bursztyka
53d8555430 Merge net branch into master
Main changes:

- MQTT improvements
- TCP fixes
- IEEE 802.15.4 RFD preliminary features (active/passive scan,
  association, disassociation), plus a dedicated "ieee15_4" shell
  module.

----------------------------------------------------------------
Andy Ross (3):
      net: tcp: Select correct source address for SYNACK packets
      net: tcp: Swap tcp->context backpointers
      net: tcp: Precompute appdata properly

Flavio Santes (14):
      net/protocols: Remove unnecessary assignement in Makefiles
      net/nbuf: Introduce the net_nbuf_linear_copy routine
      net/mqtt: Make input arguments const
      net/mqtt: Improve indentation
      net/mqtt: Use the right data type
      net/mqtt: Add missing function prototypes
      net/mqtt: Add the mqtt_rx_publish routine
      net/mqtt: Improve buffer error handling in mqtt_tx routines
      net/mqtt: Improve error handling in mqtt_rx_connack routine
      net/mqtt: Add the reception callback
      net/mqtt: Allow an MQTT publisher app to receive msgs
      net/mqtt: Allow an MQTT subscriber app to receive msgs
      net/dns: Introduce the qname_copy routine
      net/dns: Fix documentation issues

Leandro Pereira (4):
      net: tcp: Be more consistent with namespaces for private funcs
      net: tcp: Remove unused `retransmit_timer` field from `net_tcp`
      net: tcp: Store return value of net_buf_frags_len() on a size_t
      net: tcp: Use appdatalen when acknowledging packets

Luiz Augusto von Dentz (2):
      net: if: Add NET_IF_UP flag
      net: l2: Add enable callback

Maureen Helm (1):
      net: samples: Fix stale yaip references

Tomasz Bursztyka (15):
      net: event: Fix misplaced comment
      net: event: Notify on interface being put down or up
      net: ieee802154: Add grounds for passive scan
      net: ieee802154: Integrate beacon frame handling
      samples: net: ieee802154: Once cc2520 is up, let's initiate a scan
      net: ieee802154: Add PAN association request
      net: ieee802154: Integrate MAC Command frames handling
      net: ieee80215: Add Active Scan request
      net: ieee802154: Add PAN disassociation request
      net: ieee802154: Handle disassocation notification from PAN coordinator
      samples: ieee802154: Let's proceed with an active scan
      net: ieee802154: Fix logging primitive in mgmt part
      net: ieee802154: Expose basic network parameters through net mgmt API
      net: ieee802154: Add a shell module named 'ieee15_4'
      samples: net: Add IEEE 802.15.4 shell module on cc2520 sample

 include/net/dns_client.h                           |   7 +-
 include/net/ieee802154.h                           | 116 +++++-
 include/net/mqtt.h                                 |  60 +++-
 include/net/nbuf.h                                 |  16 +
 include/net/net_event.h                            |  21 +-
 include/net/net_if.h                               |  47 ++-
 include/net/net_l2.h                               |   9 +-
 samples/net/dhcpv4_client/src/Makefile             |   1 -
 samples/net/ieee802154/cc2520/prj.conf             |   6 +-
 .../net/ieee802154/cc2520/src/ieee802154_test.c    |  57 ++-
 samples/net/zperf/src/Makefile                     |   2 +-
 subsys/net/ip/ipv4.c                               |  14 +-
 subsys/net/ip/ipv4.h                               |   4 +-
 subsys/net/ip/ipv6.c                               |  16 +-
 subsys/net/ip/ipv6.h                               |   2 +
 subsys/net/ip/l2/bluetooth.c                       |  22 +-
 subsys/net/ip/l2/dummy.c                           |   2 +-
 subsys/net/ip/l2/ethernet.c                        |   2 +-
 subsys/net/ip/l2/ieee802154/Kconfig                |   9 +
 subsys/net/ip/l2/ieee802154/Makefile               |   1 +
 subsys/net/ip/l2/ieee802154/ieee802154.c           |  22 +-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c      | 390 +++++++++++++++++++++
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.h      |  66 ++++
 subsys/net/ip/l2/ieee802154/ieee802154_shell.c     | 289 +++++++++++++++
 subsys/net/ip/nbuf.c                               |  39 +++
 subsys/net/ip/net_context.c                        |  77 +++-
 subsys/net/ip/net_if.c                             |  89 ++++-
 subsys/net/ip/tcp.c                                |  33 +-
 subsys/net/ip/tcp.h                                |  10 +-
 subsys/net/lib/dns/Makefile                        |   2 -
 subsys/net/lib/dns/dns_client.c                    |  62 +---
 subsys/net/lib/dns/dns_pack.c                      |  66 ++++
 subsys/net/lib/dns/dns_pack.h                      |  22 ++
 subsys/net/lib/mqtt/Makefile                       |   2 -
 subsys/net/lib/mqtt/mqtt.c                         | 351 ++++++++++++++++---
 subsys/net/lib/mqtt/mqtt_pkt.c                     |  16 +-
 subsys/net/lib/mqtt/mqtt_pkt.h                     |   4 +-
 tests/net/tcp/src/main.c                           |  26 +-
 38 files changed, 1746 insertions(+), 234 deletions(-)
 create mode 100644 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.h
 create mode 100644 subsys/net/ip/l2/ieee802154/ieee802154_shell.c

Change-Id: I72434b20cec53c004d7e7c03a24eab03a1d52c25
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 18:29:55 +01:00
Leandro Pereira
fb02efb1c9 net: tcp: Use appdatalen when acknowledging packets
If the length of all fragments is used instead, the TCP header is also
considered; sequence numbers do not consider the header.

Change-Id: I19e77ac0fe62ca619b0903dd0265f8ea4878cdf7
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-01-06 14:27:48 +00:00
Leandro Pereira
162843f90a net: tcp: Store return value of net_buf_frags_len() on a size_t
The net_buf_frags_len() function returns a size_t, which is an unsigned
integer.  Store on an appropriate size_t variable instead.

Change-Id: I98aa4c0ddd7c464737436aa9ce13bdc86c11da2b
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-01-06 14:27:35 +00:00
Leandro Pereira
342f81b7e1 net: tcp: Remove unused retransmit_timer field from net_tcp
`retry_timer` is being used instead.

Change-Id: I53f8e724b48eca5e17bc9fec38f25c457b1492c9
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-01-06 14:27:25 +00:00
Leandro Pereira
84b68b8b21 net: tcp: Be more consistent with namespaces for private funcs
Change-Id: Ie2699e01c5cc19cd04eed8383d6c73769366a55e
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-06 14:27:13 +00:00
Andy Ross
3a8b73067d net: tcp: Precompute appdata properly
TCP packets need the computed packet length early so they can fill in
a correct sequence number in their generated ACKs.  Waiting for
packet_received() is too late.  Precompute it before needed, and skip
the evaluation later.

Change-Id: I25547009f88277e0042c74f2005a141819797886
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-01-06 14:25:58 +00:00
Andy Ross
02174b8e0f net: tcp: Swap tcp->context backpointers
On accepting a new connection, the stack does an odd "swap" trick
where it updates the struct net_tcp record on the *listening* context
with the values from the new connection, and then swaps it with the
empty one that got allocated for the *new* context.

Unfortunately this swap forgot to swap the net_tcp "context" field
backpointers, so the net_context retrieved at runtime was for the
wrong connection.  Surprisingly, this actually almost worked for a
long time, except that the destination address would be wrong in the
newer setup.

Change-Id: I0c1812ddb9f9ff3e7deb60d1fd67cafd9ba96997
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-01-06 13:56:02 +00:00
Andy Ross
a5b694fbbc net: tcp: Select correct source address for SYNACK packets
The source address for a TCP SYNACK must (obviously) be the same as
the destination address of the SYN that produced it.  But the existing
IP packet creation routines would simply fill in a default address
from the net_context struct, which is correct for *established*
connections, but for the listening socket is generally INADDR_ANY
(i.e. all zeroes) and will result in an arbitrary choice for source
address (e.g. a link-local address on the same interface) which can
easily be wrong.

So we need to pass the correct address all the way down from the SYN
packet handler code through the net_ipv*_create() packet creation
functions.  This requires lots of API plumbing, but relatively little
logic change.

Change-Id: Ic368f8cef6689f8a27cbafd5933a4964d5cc457e
Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2017-01-06 08:21:15 -05:00
Tomasz Bursztyka
20404131aa samples: net: Add IEEE 802.15.4 shell module on cc2520 sample
This is easier to test the 15.4 layer instead of hard-coding sample
logic.

Change-Id: I2376dec3dad9e2ceca3f61bd88bf5709f1bc1390
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 12:27:01 +01:00
Tomasz Bursztyka
336e3f8721 net: ieee802154: Add a shell module named 'ieee15_4'
This one exposes IEEE 802.15.4 net mgmt requests through the shell. User
has then the ability to directly make relevant requests like raising a
scan, associating, etc...

For now, it assumes the 15.4 interface is the only one on the system and
thus will rely on net_if_get_default().

Change-Id: I8eb20565b8231e6cfcba6c1479179cc85ff1d8e5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 12:27:01 +01:00
Tomasz Bursztyka
6b41aecd99 net: ieee802154: Expose basic network parameters through net mgmt API
It is then possible to set the channel, pan_id and short address through
this API. Such features are mainly useful for testing purposes.

Change-Id: I41aeb397afdb231458a3b13638f3e13d3ac28a6c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 12:27:01 +01:00
Tomasz Bursztyka
415afe130e net: ieee802154: Fix logging primitive in mgmt part
Change-Id: I9a97acfc06b7836cce622e374e21efcecbd99bd5
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 11:02:26 +01:00
Flavio Santes
30225d5ef1 net/dns: Fix documentation issues
Fix some documentation issues found at the dns_client.h file.

Change-Id: I3c1138f55b182ad2507b2cc3a4a50dc874a0d730
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
e86b6c23af net/dns: Introduce the qname_copy routine
When a CNAME is part of the DNS answer RR, sometimes a label with
a pointer is found. The CNAME must be reused to create a new DNS
query and that CNAME will become the new DNS Query QNAME. This new
QNAME must not include pointers.

This patch introduces the qname_copy routine that "linearizes" a
given QNAME (perhaps with pointers).

The dns_read routine is also updated to reflect these changes.

Change-Id: I8e8f64e85e2cbf494fd589e2b7a67d470d34604b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
e8eb62b87b net/mqtt: Allow an MQTT subscriber app to receive msgs
This patch adds the mqtt_subscriber_parser routine and modifies the
mqtt_init routine to allow an MQTT subscriber app to receive MQTT msgs.

Change-Id: Ie54ab892dacbc4386acab78a8991eba1850d8171
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
76e479974a net/mqtt: Allow an MQTT publisher app to receive msgs
Changes applied by this patch:

- Add the mqtt_publisher_parser routine
- Add the MQTT_PACKET_TYPE macro to get the MQTT msg packet type
  (required by mqtt_publisher_parser)
- Add the mqtt_linearize_buffer (required by mqtt_publisher_parser)
- Add the mqtt_recv callback for reception
- Modify the mqtt_init routine to install the reception callback

The mqtt_publisher_parser routine is a callback used internally
to execute the appropriate mqtt_rx routine. Only the following
messages are handled by this routine:

MQTT_CONNACK, MQTT_PUBACK, MQTT_PUBREC, MQTT_PUBCOMP and MQTT_PINGRESP.

On error, it executes the ctx->malformed cb, if defined.

This commit also introduces the mqtt_linearize_buffer routine that
will be used to linearize an IP stack fragmented buffer. This patch
makes use of the net_nbuf_linear_copy routine to linearize the
incoming buffer. mqtt_rx_xxxx routines are also updated to handle
linear buffers (no fragmentation).

Currently, all the network protocol routines assume that the input
buffer is not fragmented. Future versions will remove that assumption
and the mqtt_linearize_buffer routine will be removed as well.

Public MQTT API is not affected by this patch.

Change-Id: I02fece67052ffbc7cb393d5ca545c503da463c4b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
bf88fe5118 net/mqtt: Add the reception callback
The reception cb: internal use only cb that will be set according to
the application profile: PUBLISHER, SUBSCRIBER, PUBLISHER & SUBSCRIBER
or SERVER.

Change-Id: Ib36b0686deb9220e507f9e468aae1b1191c35d31
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
8619d9d625 net/mqtt: Improve error handling in mqtt_rx_connack routine
Avoid undesired behaviors by exiting once an error is detected.

Change-Id: Id8e6accd6cd096274fe1c40a615d290967f1d4b9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
e4e74be208 net/mqtt: Improve buffer error handling in mqtt_tx routines
This commit improves the buffer error handling in the mqtt_tx
routines.

Change-Id: Ic8e5761d927fe881b2376b6ac948a412e3b1168a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
d490ff27ad net/mqtt: Add the mqtt_rx_publish routine
The mqtt_rx_publish is used to process incoming MQTT PUBLISH
messages. This routine performes the following steps:

- take ownership of the rx buffer containing the MQTT PUBLISH msg,
- call the MQTT parser routine, and
- determine, based on the incoming message's MQTT QoS,
  the next action.

Change-Id: I3cc011cf0c280205161d0484f12a2cfa79fdf44a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
ab042f2997 net/mqtt: Add missing function prototypes
Some public function prototypes are missing, so this commit adds
them to the mqtt.h header.

Change-Id: I57a50ce346f086f55e499bfc8c815fd161a52f7b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:45 +01:00
Flavio Santes
edfaeba73d net/mqtt: Use the right data type
Use the appropriate data type for some variables:

- const input arguments
- int32_t instead of uint32_t for timeout
- uint8_t instead of int for variables that take just a few
  possitive values.

Change-Id: Id7d762b400fa17e6751829ac401cd7c13aabb7b2
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00
Flavio Santes
4cfd7f7fe2 net/mqtt: Improve indentation
Replace tabs by spaces to improve code alignment in mqtt_pkt.c.

Change-Id: If586b91ba67b8075ddc7e0203dc538420e96b49a
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00
Flavio Santes
51a48d2d07 net/mqtt: Make input arguments const
This commit changes some function signatures found at the private
MQTT Packet Lib. Input arguments representing arrays can be considered
'const', avoiding compiler warnings when passing "const arrays" in
MQTT applications.

Change-Id: I3ebaa9c7ff5fba74324bf79c55027cdd82669eaa
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00
Flavio Santes
c015c0e2c8 net/nbuf: Introduce the net_nbuf_linear_copy routine
This commit adds one routine previously found at the DNS resolver
library. The net_nbuf_linear_copy routine allows to "linearize"
an IP stack network buffer. This routine is required by functions
that must jump between big chunks of data that in this case may
lie between many fragments. Tracking fragments may be a tedious
task, so getting a linear copy of the buffer will reduce code
complexity altough it increases memory consumption.

The DNS client library is updated to reflect these changes.

Change-Id: Iae321f99fa9b05fae7e722b6d41baac427d82d7e
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00
Flavio Santes
a46548ec31 net/protocols: Remove unnecessary assignement in Makefiles
Change-Id: Ifea85ebdaf5f1ac6b17abddc0311306c31c36b37
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
2017-01-06 09:11:44 +01:00
Tomasz Bursztyka
db1ee31c04 samples: ieee802154: Let's proceed with an active scan
It's currently hard to find a Beacon enabled network. So let's switch to
active scan for now.

Change-Id: I192e7c3128f9488fb680ea7f23221b2b4aa52188
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:44 +01:00
Tomasz Bursztyka
5d0503fa30 net: ieee802154: Handle disassocation notification from PAN coordinator
PAN coordinator can decide to eject a client device from the PAN by
disassocating it.

Change-Id: Ia868554d40a7aceb4c75a0b426db45f56003fbb7
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:44 +01:00
Tomasz Bursztyka
820713239a net: ieee802154: Add PAN disassociation request
If associated, this will request to disassociate from the PAN. That's
only client side, PAN coordinator can also disassociate a client, which
case is not handled here.

Change-Id: If308f51b62c5006b4a2db53d0c891e8192f3c198
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:44 +01:00
Tomasz Bursztyka
d8b874b0c7 net: ieee80215: Add Active Scan request
Active scan differs from passive scan by sending a Beacon request (thus
the "active" part) and wait for beacons in reply to it.

Taking the opportunity to add debugging output to scanning logic.

Change-Id: I85001b1ea17f4ec4cd315dc39524c4d8f053cee2
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Tomasz Bursztyka
df4fa6557e net: ieee802154: Integrate MAC Command frames handling
Now we can handle incoming MAC command frames.
Association result ONLY for now.

Change-Id: Ib54b1757185ed079fe6914fa7939347020e006d9
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Tomasz Bursztyka
b53e48de1b net: ieee802154: Add PAN association request
Such management request will enable association the 15.4 device to an
existing PAN.

Change-Id: I61ffd5e4d8192716e067c5225b3327f08944063b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Tomasz Bursztyka
792c29a376 samples: net: ieee802154: Once cc2520 is up, let's initiate a scan
It will print-out the results, if any.

Change-Id: If988a6dc3c4504a8d4aa947d3d3f949870b638c8
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Tomasz Bursztyka
8a2bc07af8 net: ieee802154: Integrate beacon frame handling
This is used only for scanning at this point. But will be needed to get
slots information and else in the future.

Change-Id: Ib917469134c6ba5a54485847c612d3755f62ed35
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Tomasz Bursztyka
88d4f1f543 net: ieee802154: Add grounds for passive scan
Currently, as only CC2520 device is supported: it will loop over the 16
channels present in 2.4Ghz spectrum. However, this will need refinement
as soon as other spectrums will be in use: L2 layer could request
capabilites from the device in order to know which range to use.

Scan result is done one at a time for now. It's unlikely going to fit
all production use case, so it's going to change in the future.

Change-Id: I2fafec49eb5cbfca1a4f04107ba3b6511d7d956d
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Tomasz Bursztyka
ef041c10b6 net: event: Notify on interface being put down or up
It can be thus used to track the status of network interfaces in order
to act accordingly (no need to try sending things on network if the
interface is down for instance).

Change-Id: Ie160ef0dfdad6679d531d05a7abada96ad1de7db
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Tomasz Bursztyka
81bbfa1995 net: event: Fix misplaced comment
Change-Id: I6ab966461b98351d5207ec53054c62eebd6b44dc
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-01-06 09:11:43 +01:00
Maureen Helm
87bc9eb010 net: samples: Fix stale yaip references
Fixes two references to yaip that were were left behind after net/yaip
was renamed to subsys/net/ip. The zperf sample needs net_private.h, so
the include path is updated. The dhcpv4_client sample doesn't need it,
so the path is removed.

Change-Id: I189f1b58191524330254a5b7b31a9a4974956728
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2017-01-06 09:11:43 +01:00
Luiz Augusto von Dentz
8a16c6681a net: l2: Add enable callback
This adds enable callback which can be used to notify the L2 driver about
changes of interface state, the L2 driver can then check if the new state
is allowed and reject otherwise.

Change-Id: I4bb6b1e32be2633f24694c0246585f803f8c645d
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-01-06 09:11:42 +01:00
Luiz Augusto von Dentz
bf4fb51f44 net: if: Add NET_IF_UP flag
This adds NET_IF_UP flag support indicating the interface is up,
currently this shall only be used internally by the driver, later on it
shall be possible to make it public by using dedicated functions.

Change-Id: I38090da4030395b2341733b846004789416d61c1
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
2017-01-06 09:11:42 +01:00
Anas Nashif
c0f0dd9734 samples: env sensing: restrurcture and cleanup docs
- move documentation to rst
- add a top level Makefile
- remove obsolete configurations

Change-Id: I8674b67e0383497cbbb0b6e861b78d8c7f7378a5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-01-05 19:56:37 -05:00