summaryrefslogtreecommitdiffstats
path: root/net
Commit message (Collapse)AuthorAgeFilesLines
* switch all platform_bus device/driver registering to ↵Jean-Christophe PLAGNIOL-VILLARD2012-10-041-1/+1
| | | | | | | | platform_driver/device_register now register_driver and register_device are for bus only usage. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* Merge branch 'for-next/tftp'Sascha Hauer2012-10-034-439/+0
|\
| * net: remove old tftp supportSascha Hauer2012-09-284-439/+0
| | | | | | | | | | | | | | The old tftp suppoer has been replaced with filesystem based tftp support, so remove the old code. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/remove-fsf-address'Sascha Hauer2012-10-034-14/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/net/miidev.c include/miidev.h
| * | Treewide: remove address of the Free Software FoundationSascha Hauer2012-09-174-14/+0
| |/ | | | | | | | | | | | | The FSF address has changed in the past. Instead of updating it each time the address changes, just drop it completely treewide. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | Merge branch 'for-next/boot-sequence-dhcp'Sascha Hauer2012-10-031-25/+142
|\ \ | | | | | | | | | | | | Conflicts: drivers/net/miidev.c
| * | dhcp: add retries limit supportJean-Christophe PLAGNIOL-VILLARD2012-10-021-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via -r opt, global.dhcp.retries or dhcp_retries set the priority order; This will allow to do not stay infinite loop if no dhcp available for boot sequence as example Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | dhcp: add copy_only_if_valid supportJean-Christophe PLAGNIOL-VILLARD2012-10-021-1/+6
| | | | | | | | | | | | | | | | | | | | | This will allow to only update a var if recive a valid data. This is need for hostname. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | dhcp: switch to global var supportJean-Christophe PLAGNIOL-VILLARD2012-10-021-19/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way you can specify as previously set the dhcp parameter via global.dhcp.xxx and get the result via global.dhcp.xxx This is need for the defaultenv-2 to add the bootp suppport. Use it on defaultenv too to have only one set of var. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * | defaultenv: switch hostname to global.hostnameJean-Christophe PLAGNIOL-VILLARD2012-10-021-2/+2
| | | | | | | | | | | | | | | | | | Udpate dhcp with it too. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | net/eth: fix link handlingSascha Hauer2012-09-271-18/+57
| | | | | | | | | | | | | | | | | | | | | Check link status on eth device open time and then periodically every 5 seconds. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | | net: introduce phylibJean-Christophe PLAGNIOL-VILLARD2012-09-251-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt phylib from linux switch all the driver to it reimplement mii bus This will allow to have - phy drivers - to only connect the phy at then opening of the device - if the phy is not ready or not up fail on open Same behaviour as in linux and will allow to share code and simplify porting. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | | net: catch error on eth_sendJean-Christophe PLAGNIOL-VILLARD2012-09-161-7/+11
| |/ |/| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | net: tftp: timeout only after a proper amount of timeWolfram Sang2012-09-141-1/+2
|/ | | | | | | | | Currently, the timeout when waiting for packages is smaller than the timeout communicated to the TFTP server for retransmitting. Make sure we wait at least for two retransmissions before giving up. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'for-next/ethernet'Sascha Hauer2012-07-022-3/+3
|\
| * eth: eth MAC addresses are six bytesJohannes Stezenbach2012-06-302-3/+3
| | | | | | | | | | | | | | | | Reduce confusion by making clear six bytes are passed, not a string. Signed-off-by: Johannes Stezenbach <js@sig21.net> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: Use dev_name directlySascha Hauer2012-06-281-3/+1
|/ | | | | | eth_get_byname uses a selfmade dev_name, use dev_name directly instead. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dns: fix recursive loopSascha Hauer2012-05-161-2/+9
| | | | | | | resolv() uses getenv_ip() which in turn calls resolv(). Fix this inifinite loop by not using getenv_ip directly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* complete: eth typo fixJean-Christophe PLAGNIOL-VILLARD2012-05-021-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge tag 'complete_update_support' of git://git.jcrosoft.org/barebox into nextSascha Hauer2012-05-012-0/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | improve complete support The following patch serie improve the complete support by adding a complete framework to allow commands complete support. The add also car complete support for eval and setting and executable file support This also include an update of the stringlist API to support asprintf API
| * complete: add eth interface complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+21
| | | | | | | | | | | | use it on ethact Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
| * complete: add empty complete supportJean-Christophe PLAGNIOL-VILLARD2012-04-301-0/+2
| | | | | | | | | | | | | | | | | | | | for cpuinfo, clear, dhcp, false, login, lsmod, meminfo, passwd, pwd, reginfo, reset, true, usb, version for mach-imx and mach-mxs: dump_clocks for u_serial: mycdev Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* | dhcp: set start timeSascha Hauer2012-04-301-0/+1
|/ | | | | | | | | The dhcp command starts with an unitialized start time. The start time is often long in the past which results in an immediate timeout and resend of the dhcp packet. Fix this by initializing the start time correctly. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* dhcp: fix typo introduce during rebase of hostname patchJean-Christophe PLAGNIOL-VILLARD2012-04-181-1/+1
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: add support to send the hostname to the dhcp serverJean-Christophe PLAGNIOL-VILLARD2012-04-181-2/+12
| | | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* Merge branch 'work/dns' into nextSascha Hauer2012-04-165-23/+24
|\
| * Use DEVICE_ID_DYNAMIC where applicableSascha Hauer2012-04-161-1/+1
| | | | | | | | | | | | | | We now have DEVICE_ID_DYNAMIC for dynamic allocation of device ids, Use it where applicable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: remove unused getenv_ip_dnsSascha Hauer2012-04-151-4/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * dns: use global nameserver/domainnameSascha Hauer2012-04-151-3/+3
| | | | | | | | | | | | | | nameserver and domainname are now globally available in the 'net' device. use these variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * dhcp: set global nameserver/domainnameSascha Hauer2012-04-151-4/+2
| | | | | | | | | | | | | | The nameserver and domainname are now globally available using the 'net' device. Use it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: register a 'net' device to store network specific variablesSascha Hauer2012-04-151-0/+9
| | | | | | | | | | | | | | 'nameserver' and 'domainname' should be globally available variables specific to networking. Register a 'net' device to store these variables. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net: use static string in string_to_ipSascha Hauer2012-04-152-10/+7
| | | | | | | | | | | | Simplify usage of ip_to_string by using a static string. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
| * net dns: remove debug codeSascha Hauer2012-04-151-1/+1
| | | | | | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* | net: use net_alloc_packet to allocate packetJean-Christophe PLAGNIOL-VILLARD2012-04-151-2/+2
|/ | | | | | | Was missing in net_init and net_new. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* netconsole: bail out if console_register failsSascha Hauer2012-04-131-1/+7
| | | | Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: dhcp: add private extention 224 to pass the oftree file via dhcp.Jean-Christophe PLAGNIOL-VILLARD2012-04-101-0/+5
| | | | | | | | | | | | | | | | | | | | | DHCP option 224 to 254 are for private use, so use one. Export it via env dhcp_oftree_file. E.g. the ISC dhcp server can be configured with | option oftree-path code 224 = string | class "at91sam9x5ek" { | match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek"; | | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage"; | option tftp-server-name "192.168.200.98"; | option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target"; | option oftree-path "/tftpboot/atmel/at91sam9x5/sam9x5ek/sam9g25ek/dtb"; | } Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: eth: don't say that MAC comes from EEPROMWolfram Sang2012-04-051-1/+1
| | | | | | | Because it can also come in via other means. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: ping: do not retry endlesslyWolfram Sang2012-04-051-0/+7
| | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: tftp: do not retry endlesslyWolfram Sang2012-04-051-0/+10
| | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: arp_request: do not retry endlesslyWolfram Sang2012-04-051-0/+5
| | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: tftp: check for error when retryingWolfram Sang2012-04-051-1/+3
| | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: ping: remove unneeded initializationWolfram Sang2012-04-051-1/+1
| | | | | Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: ping: send PING packets with 1-second intervalWolfram Sang2012-04-051-1/+2
| | | | | | | Like standard ping does by default. Signed-off-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* net: env: getenv_ip use resolvJean-Christophe PLAGNIOL-VILLARD2012-04-032-4/+7
| | | | | | | Introduce getenv_ip_dns to be able to do not do the resolv when using it in resolv for the nameserver (Do not loop). Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* net: dhcp: allow to set transmitted user classJean-Christophe PLAGNIOL-VILLARD2012-04-031-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For net boot setups it is useful to submit boot params like server or bootfile over dhcp. To distinguish diffrent type of OS running on the same hardware, a custom vendor id can be sent in dhcp discover/request messages. E.g. the ISC dhcp server can be configured with | option client-uuid code 97 = { unsigned integer 8, string }; | class "at91sam9x5ek" { | match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek"; | | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage"; | if substring (option dhcp-client-identifier,0,7) = "ser2net" { | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net"; | } | if substring (option client-uuid,0,7) = "test" { | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net"; | } | if substring (option user-class,0,4) = "toto" { | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-toto"; | } | option tftp-server-name "192.168.200.98"; | option option-150 192.168.200.98; | next-server 192.168.200.98; | option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target"; | } Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* net: dhcp: allow to set transmitted client uuidJean-Christophe PLAGNIOL-VILLARD2012-04-031-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | For net boot setups it is useful to submit boot params like server or bootfile over dhcp. To distinguish diffrent type of OS running on the same hardware, a custom client uuid can be sent in dhcp discover/request messages. E.g. the ISC dhcp server can be configured with | option client-uuid code 97 = { unsigned integer 8, string }; | class "at91sam9x5ek" { | match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek"; | | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage"; | if substring (option dhcp-client-identifier,0,7) = "ser2net" { | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net"; | } | if substring (option client-uuid,0,7) = "test" { | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net"; | } | option tftp-server-name "192.168.200.98"; | option option-150 192.168.200.98; | next-server 192.168.200.98; | option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target"; | } Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* net: dhcp: allow to set transmitted client idJean-Christophe PLAGNIOL-VILLARD2012-04-031-1/+9
| | | | | | | | | | | | | | | | | | | | | | | For net boot setups it is useful to submit boot params like server or bootfile over dhcp. To distinguish diffrent type of OS running on the same hardware, a custom client id can be sent in dhcp discover/request messages. E.g. the ISC dhcp server can be configured with | class "at91sam9x5ek" { | match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x5ek"; | | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage"; | if substring (option dhcp-client-identifier,0,7) = "ser2net" { | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage-ser2net"; | } | option tftp-server-name "192.168.200.98"; | option option-150 192.168.200.98; | next-server 192.168.200.98; | option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target"; | } Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* net: dhcp: factorise setting option codeJean-Christophe PLAGNIOL-VILLARD2012-04-031-34/+87
| | | | | | This will allow to add more easly new option with less impact in the binary. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* net: dhcp: add support of tftp name serverJean-Christophe PLAGNIOL-VILLARD2012-04-031-3/+17
| | | | | | | | | | | | | | | | | | | if the DNS is enable resolve it. The server ip will be set if no server ip it is set in the bootp. Export it via env dhcp_tftp_server_name. E.g. the ISC dhcp server can be configured with | class "at91sam9x5ek" { | match if substring (option vendor-class-identifier,0,20) = "barebox-at91sam9x | | filename "/tftpboot/atmel/at91sam9x5/sam9x5ek/zImage"; | option tftp-server-name "192.168.200.98"; | option root-path "192.168.200.98:/opt/work/buildroot/build/sam9x5/target"; | } | } Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
* net: dhcp: reset env variable before do a dhcp requestJean-Christophe PLAGNIOL-VILLARD2012-04-031-0/+16
| | | | Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>