<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot.git/net/net.c, branch v2011.06</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/'/>
<entry>
<title>net/net.c: Update ipaddr if the environment has changed</title>
<updated>2011-06-01T20:17:49+00:00</updated>
<author>
<name>Enric Balletbo i Serra</name>
<email>eballetbo@iseebcn.com</email>
</author>
<published>2011-05-31T21:01:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=23a70bf9c352ec5b6ac52d5be8087b963c2073dd'/>
<id>23a70bf9c352ec5b6ac52d5be8087b963c2073dd</id>
<content type='text'>
At least on ARM the ipaddr is only set in board_init_r function. The
problem is if ipaddr is not defined in environment importing another
environment defined don't update the ipaddr value.

For example, suppose we've a default environment without net variables
defined and we want to import an uEnv.txt environment from SD-card like
this:

  ipaddr=192.168.2.240
  netmask=255.255.255.0
  gatewayip=192.168.2.1
  serverip=192.168.2.114

Then if you try boot from NFS results in:

  Importing environment from mmc ...
  Running uenvcmd ...
  smc911x: detected LAN9221 controller
  smc911x: phy initialized
  smc911x: MAC ac:de:48:00:00:00
  *** ERROR: `ipaddr' not set

The ipaddr at this point is NULL beacause is only set at board_init_r
function. This patch updates the ipaddr value if the environment has
changed.

Signed-off-by: Enric Balletbo i Serra &lt;eballetbo@iseebcn.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At least on ARM the ipaddr is only set in board_init_r function. The
problem is if ipaddr is not defined in environment importing another
environment defined don't update the ipaddr value.

For example, suppose we've a default environment without net variables
defined and we want to import an uEnv.txt environment from SD-card like
this:

  ipaddr=192.168.2.240
  netmask=255.255.255.0
  gatewayip=192.168.2.1
  serverip=192.168.2.114

Then if you try boot from NFS results in:

  Importing environment from mmc ...
  Running uenvcmd ...
  smc911x: detected LAN9221 controller
  smc911x: phy initialized
  smc911x: MAC ac:de:48:00:00:00
  *** ERROR: `ipaddr' not set

The ipaddr at this point is NULL beacause is only set at board_init_r
function. This patch updates the ipaddr value if the environment has
changed.

Signed-off-by: Enric Balletbo i Serra &lt;eballetbo@iseebcn.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>TFTP: add tftpsrv command</title>
<updated>2011-05-19T19:38:32+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-17T00:03:40+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=7a83af07aef3c924cfb2d36e68eea8b86d22f2a1'/>
<id>7a83af07aef3c924cfb2d36e68eea8b86d22f2a1</id>
<content type='text'>
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Acked-by: Detlev Zundel &lt;dzu@denx.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Acked-by: Detlev Zundel &lt;dzu@denx.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: do not use assignment in if condition</title>
<updated>2011-05-12T20:07:41+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-04T02:40:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=ccb9ebefbec68f18b4f479b774fa5f6edc2ad819'/>
<id>ccb9ebefbec68f18b4f479b774fa5f6edc2ad819</id>
<content type='text'>
This removes the following checkpatch issue:
 - ERROR: do not use assignment in if condition

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch issue:
 - ERROR: do not use assignment in if condition

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: fix indentation</title>
<updated>2011-05-12T20:07:31+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-04T02:40:46+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c819abeef7e8d924baf3d15a1eef51525d90182e'/>
<id>c819abeef7e8d924baf3d15a1eef51525d90182e</id>
<content type='text'>
This removes the following checkpatch issues:
 - ERROR: switch and case should be at the same indent
 - WARNING: suspect code indent for conditional statements
 - WARNING: labels should not be indented

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch issues:
 - ERROR: switch and case should be at the same indent
 - WARNING: suspect code indent for conditional statements
 - WARNING: labels should not be indented

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: parentheses not required for return</title>
<updated>2011-05-12T20:06:04+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-04T02:40:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=92895de9782e17172deca2ad0b6fff6d7425ed38'/>
<id>92895de9782e17172deca2ad0b6fff6d7425ed38</id>
<content type='text'>
This removes the following checkpatch issue:
 - ERROR: return is not a function, parentheses are not required

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch issue:
 - ERROR: return is not a function, parentheses are not required

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: fix pointer syntax issues</title>
<updated>2011-05-12T20:03:47+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-04T02:40:44+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=6b147d1139dbf7e0a42746bbf8d925a863854ef8'/>
<id>6b147d1139dbf7e0a42746bbf8d925a863854ef8</id>
<content type='text'>
This removes the following checkpatch issues:
 - ERROR: "foo * bar" should be "foo *bar"
 - ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch issues:
 - ERROR: "foo * bar" should be "foo *bar"
 - ERROR: "(foo*)" should be "(foo *)"

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: fix brace issues</title>
<updated>2011-05-12T20:01:34+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-04T02:40:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=d3c65b015a20d0b2686c9961a6dc457061cf619a'/>
<id>d3c65b015a20d0b2686c9961a6dc457061cf619a</id>
<content type='text'>
This removes the following checkpatch issues:
 - WARNING: braces {} are not necessary for single statement blocks
 - WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch issues:
 - WARNING: braces {} are not necessary for single statement blocks
 - WARNING: braces {} are not necessary for any arm of this statement

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: fix whitespace issues</title>
<updated>2011-05-12T20:01:05+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-11T03:59:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=4f63acd0625553dd87d3a8a5b434578026765793'/>
<id>4f63acd0625553dd87d3a8a5b434578026765793</id>
<content type='text'>
This removes the following checkpatch issues:
 - ERROR: space prohibited after that open parenthesis '('
 - ERROR: space prohibited before that close parenthesis ')'
 - ERROR: space prohibited after that open square bracket '['
 - ERROR: space prohibited after that '&amp;' (ctx:WxW)
 - ERROR: spaces required around that '=' (ctx:VxW)
 - ERROR: space required before the open parenthesis '('
 - ERROR: space required after that ',' (ctx:VxV)
 - ERROR: need consistent spacing around '+' (ctx:WxV)
 - WARNING: unnecessary whitespace before a quoted newline
 - WARNING: please, no spaces at the start of a line
 - WARNING: space prohibited between function name and open
   parenthesis '('

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch issues:
 - ERROR: space prohibited after that open parenthesis '('
 - ERROR: space prohibited before that close parenthesis ')'
 - ERROR: space prohibited after that open square bracket '['
 - ERROR: space prohibited after that '&amp;' (ctx:WxW)
 - ERROR: spaces required around that '=' (ctx:VxW)
 - ERROR: space required before the open parenthesis '('
 - ERROR: space required after that ',' (ctx:VxV)
 - ERROR: need consistent spacing around '+' (ctx:WxV)
 - WARNING: unnecessary whitespace before a quoted newline
 - WARNING: please, no spaces at the start of a line
 - WARNING: space prohibited between function name and open
   parenthesis '('

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: variable initializations</title>
<updated>2011-05-12T19:49:56+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-11T03:59:55+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=c586ce6e014907586c123454a5a4dcea6752e1c7'/>
<id>c586ce6e014907586c123454a5a4dcea6752e1c7</id>
<content type='text'>
This removes the following checkpatch errors:
 - ERROR: do not initialise globals to 0 or NULL
 - ERROR: spaces required around that '=' (ctx:VxV)
 - ERROR: that open brace { should be on the previous line

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch errors:
 - ERROR: do not initialise globals to 0 or NULL
 - ERROR: spaces required around that '=' (ctx:VxV)
 - ERROR: that open brace { should be on the previous line

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>net/net.c: cosmetic: fix lines over 80 characters</title>
<updated>2011-05-12T19:49:49+00:00</updated>
<author>
<name>Luca Ceresoli</name>
<email>luca.ceresoli@comelit.it</email>
</author>
<published>2011-05-11T03:59:54+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/u-boot.git/commit/?id=3e38e429fff1ba6a0947a2f547f9ebeeef6ff3b1'/>
<id>3e38e429fff1ba6a0947a2f547f9ebeeef6ff3b1</id>
<content type='text'>
This removes the following checkpatch warning:
 - WARNING: line over 80 characters

There are three such warnings left.

The first is hard to fix with cosmetic-only changes without compromising code
readability, so I'm leaving it as it is for now:
  WARNING: line over 80 characters
  #1537: FILE: net.c:1537:
  + [4 tabs] memcpy(((Ethernet_t *)NetArpWaitTxPacket)-&gt;et_dest, ...

The other two cannot be fixed without splitting string literals, so it is
preferred to keep them longer than 80 characters.

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This removes the following checkpatch warning:
 - WARNING: line over 80 characters

There are three such warnings left.

The first is hard to fix with cosmetic-only changes without compromising code
readability, so I'm leaving it as it is for now:
  WARNING: line over 80 characters
  #1537: FILE: net.c:1537:
  + [4 tabs] memcpy(((Ethernet_t *)NetArpWaitTxPacket)-&gt;et_dest, ...

The other two cannot be fixed without splitting string literals, so it is
preferred to keep them longer than 80 characters.

Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@comelit.it&gt;
Cc: Wolfgang Denk &lt;wd@denx.de&gt;
Cc: Ben Warren &lt;biggerbadderben@gmail.com&gt;
Cc: Mike Frysinger &lt;vapier@gentoo.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
