]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/log
linux-2.6-omap-h63xx.git
17 years agonetns xfrm: finding states in netns
Alexey Dobriyan [Wed, 26 Nov 2008 01:31:51 +0000 (17:31 -0800)]
netns xfrm: finding states in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: fixup xfrm_alloc_spi()
Alexey Dobriyan [Wed, 26 Nov 2008 01:31:18 +0000 (17:31 -0800)]
netns xfrm: fixup xfrm_alloc_spi()

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: state lookup in netns
Alexey Dobriyan [Wed, 26 Nov 2008 01:30:50 +0000 (17:30 -0800)]
netns xfrm: state lookup in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: state flush in netns
Alexey Dobriyan [Wed, 26 Nov 2008 01:30:18 +0000 (17:30 -0800)]
netns xfrm: state flush in netns

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: trivial netns propagations
Alexey Dobriyan [Wed, 26 Nov 2008 01:29:47 +0000 (17:29 -0800)]
netns xfrm: trivial netns propagations

Take netns from xfrm_state or xfrm_policy.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: propagate netns into bydst/bysrc/byspi hash functions
Alexey Dobriyan [Wed, 26 Nov 2008 01:29:21 +0000 (17:29 -0800)]
netns xfrm: propagate netns into bydst/bysrc/byspi hash functions

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns policy hash resizing work
Alexey Dobriyan [Wed, 26 Nov 2008 01:28:57 +0000 (17:28 -0800)]
netns xfrm: per-netns policy hash resizing work

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns policy counts
Alexey Dobriyan [Wed, 26 Nov 2008 01:24:15 +0000 (17:24 -0800)]
netns xfrm: per-netns policy counts

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_policy_bydst hash
Alexey Dobriyan [Wed, 26 Nov 2008 01:23:48 +0000 (17:23 -0800)]
netns xfrm: per-netns xfrm_policy_bydst hash

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns inexact policies
Alexey Dobriyan [Wed, 26 Nov 2008 01:23:26 +0000 (17:23 -0800)]
netns xfrm: per-netns inexact policies

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_policy_byidx hashmask
Alexey Dobriyan [Wed, 26 Nov 2008 01:22:58 +0000 (17:22 -0800)]
netns xfrm: per-netns xfrm_policy_byidx hashmask

Per-netns hashes are independently resizeable.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_policy_byidx hash
Alexey Dobriyan [Wed, 26 Nov 2008 01:22:35 +0000 (17:22 -0800)]
netns xfrm: per-netns xfrm_policy_byidx hash

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns policy list
Alexey Dobriyan [Wed, 26 Nov 2008 01:22:11 +0000 (17:22 -0800)]
netns xfrm: per-netns policy list

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: add struct xfrm_policy::xp_net
Alexey Dobriyan [Wed, 26 Nov 2008 01:21:45 +0000 (17:21 -0800)]
netns xfrm: add struct xfrm_policy::xp_net

Again, to avoid complications with passing netns when not necessary.
Again, ->xp_net is set-once field, once set it never changes.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns km_waitq
Alexey Dobriyan [Wed, 26 Nov 2008 01:21:01 +0000 (17:21 -0800)]
netns xfrm: per-netns km_waitq

Disallow spurious wakeups in __xfrm_lookup().

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns state GC work
Alexey Dobriyan [Wed, 26 Nov 2008 01:20:36 +0000 (17:20 -0800)]
netns xfrm: per-netns state GC work

State GC is per-netns, and this is part of it.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns state GC list
Alexey Dobriyan [Wed, 26 Nov 2008 01:20:11 +0000 (17:20 -0800)]
netns xfrm: per-netns state GC list

km_waitq is going to be made per-netns to disallow spurious wakeups
in __xfrm_lookup().

To not wakeup after every garbage-collected xfrm_state (which potentially
can be from different netns) make state GC list per-netns.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_hash_work
Alexey Dobriyan [Wed, 26 Nov 2008 01:19:07 +0000 (17:19 -0800)]
netns xfrm: per-netns xfrm_hash_work

All of this is implicit passing which netns's hashes should be resized.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_state counts
Alexey Dobriyan [Wed, 26 Nov 2008 01:18:39 +0000 (17:18 -0800)]
netns xfrm: per-netns xfrm_state counts

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_state_hmask
Alexey Dobriyan [Wed, 26 Nov 2008 01:18:12 +0000 (17:18 -0800)]
netns xfrm: per-netns xfrm_state_hmask

Since hashtables are per-netns, they can be independently resized.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_state_byspi hash
Alexey Dobriyan [Wed, 26 Nov 2008 01:17:47 +0000 (17:17 -0800)]
netns xfrm: per-netns xfrm_state_byspi hash

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_state_bysrc hash
Alexey Dobriyan [Wed, 26 Nov 2008 01:17:24 +0000 (17:17 -0800)]
netns xfrm: per-netns xfrm_state_bysrc hash

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_state_bydst hash
Alexey Dobriyan [Wed, 26 Nov 2008 01:16:58 +0000 (17:16 -0800)]
netns xfrm: per-netns xfrm_state_bydst hash

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: per-netns xfrm_state_all list
Alexey Dobriyan [Wed, 26 Nov 2008 01:16:11 +0000 (17:16 -0800)]
netns xfrm: per-netns xfrm_state_all list

This is done to get
a) simple "something leaked" check
b) cover possible DoSes when other netns puts many, many xfrm_states
   onto a list.
c) not miss "alien xfrm_state" check in some of list iterators in future.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: add struct xfrm_state::xs_net
Alexey Dobriyan [Wed, 26 Nov 2008 01:15:16 +0000 (17:15 -0800)]
netns xfrm: add struct xfrm_state::xs_net

To avoid unnecessary complications with passing netns around.

* set once, very early after allocating
* once set, never changes

For a while create every xfrm_state in init_net.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns xfrm: add netns boilerplate
Alexey Dobriyan [Wed, 26 Nov 2008 01:14:31 +0000 (17:14 -0800)]
netns xfrm: add netns boilerplate

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoxfrm: initialise xfrm_policy_gc_work statically
Alexey Dobriyan [Wed, 26 Nov 2008 01:13:59 +0000 (17:13 -0800)]
xfrm: initialise xfrm_policy_gc_work statically

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years ago3c523: fix warning in drivers/net/3c523.c
Ingo Molnar [Wed, 26 Nov 2008 01:02:20 +0000 (17:02 -0800)]
3c523: fix warning in drivers/net/3c523.c

fix warning:

  drivers/net/3c523.c:582: warning: ‘cleanup_card’ defined but not used

No code changed:

md5:
   ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.before.asm
   ebe4a1b27d3f21b0b12a78c58463b0d7  3c523.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agodepca: fix warning in drivers/net/depca.c
Ingo Molnar [Wed, 26 Nov 2008 01:00:39 +0000 (17:00 -0800)]
depca: fix warning in drivers/net/depca.c

fix warning:

  drivers/net/depca.c: In function ‘depca_eisa_probe’:
  drivers/net/depca.c:1564: warning: ‘mem_start’ may be used uninitialized in this function

this seems to be a real bug - depca_eisa_probe() does not check
for failure. Add it, symmetric to depca_isa_probe().

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoatlx: fix warning in drivers/net/atlx/atl2.c
Ingo Molnar [Wed, 26 Nov 2008 01:00:05 +0000 (17:00 -0800)]
atlx: fix warning in drivers/net/atlx/atl2.c

fix this warning:

  drivers/net/atlx/atl2.c: In function ‘atl2_request_irq’:
  drivers/net/atlx/atl2.c:644: warning: unused variable ‘err’

'err' is unused in the !CONFIG_PCI_MSI case.

Instead of further increasing the #ifdeffery in this function,
restructure the code a bit and get rid of the #ifdef. This
relies on the fact that pci_enable_msi() will always fail in
the !CONFIG_PCI_MSI case.

There should be no change in driver behavior.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotracing/function-return-tracer: set a more human readable output
Frederic Weisbecker [Tue, 25 Nov 2008 23:57:25 +0000 (00:57 +0100)]
tracing/function-return-tracer: set a more human readable output

Impact: feature

This patch sets a C-like output for the function graph tracing.
For this aim, we now call two handler for each function: one on the entry
and one other on return. This way we can draw a well-ordered call stack.

The pid of the previous trace is loosely stored to be compared against
the one of the current trace to see if there were a context switch.

Without this little feature, the call tree would seem broken at
some locations.
We could use the sched_tracer to capture these sched_events but this
way of processing is much more simpler.

2 spaces have been chosen for indentation to fit the screen while deep
calls. The time of execution in nanosecs is printed just after closed
braces, it seems more easy this way to find the corresponding function.
If the time was printed as a first column, it would be not so easy to
find the corresponding function if it is called on a deep depth.

I plan to output the return value but on 32 bits CPU, the return value
can be 32 or 64, and its difficult to guess on which case we are.
I don't know what would be the better solution on X86-32: only print
eax (low-part) or even edx (high-part).

Actually it's thee same problem when a function return a 8 bits value, the
high part of eax could contain junk values...

Here is an example of trace:

sys_read() {
  fget_light() {
  } 526
  vfs_read() {
    rw_verify_area() {
      security_file_permission() {
        cap_file_permission() {
        } 519
      } 1564
    } 2640
    do_sync_read() {
      pipe_read() {
        __might_sleep() {
        } 511
        pipe_wait() {
          prepare_to_wait() {
          } 760
          deactivate_task() {
            dequeue_task() {
              dequeue_task_fair() {
                dequeue_entity() {
                  update_curr() {
                    update_min_vruntime() {
                    } 504
                  } 1587
                  clear_buddies() {
                  } 512
                  add_cfs_task_weight() {
                  } 519
                  update_min_vruntime() {
                  } 511
                } 5602
                dequeue_entity() {
                  update_curr() {
                    update_min_vruntime() {
                    } 496
                  } 1631
                  clear_buddies() {
                  } 496
                  update_min_vruntime() {
                  } 527
                } 4580
                hrtick_update() {
                  hrtick_start_fair() {
                  } 488
                } 1489
              } 13700
            } 14949
          } 16016
          msecs_to_jiffies() {
          } 496
          put_prev_task_fair() {
          } 504
          pick_next_task_fair() {
          } 489
          pick_next_task_rt() {
          } 496
          pick_next_task_fair() {
          } 489
          pick_next_task_idle() {
          } 489

------------8<---------- thread 4 ------------8<----------

finish_task_switch() {
} 1203
do_softirq() {
  __do_softirq() {
    __local_bh_disable() {
    } 669
    rcu_process_callbacks() {
      __rcu_process_callbacks() {
        cpu_quiet() {
          rcu_start_batch() {
          } 503
        } 1647
      } 3128
      __rcu_process_callbacks() {
      } 542
    } 5362
    _local_bh_enable() {
    } 587
  } 8880
} 9986
kthread_should_stop() {
} 669
deactivate_task() {
  dequeue_task() {
    dequeue_task_fair() {
      dequeue_entity() {
        update_curr() {
          calc_delta_mine() {
          } 511
          update_min_vruntime() {
          } 511
        } 2813

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agotracing/function-return-tracer: change the name into function-graph-tracer
Frederic Weisbecker [Tue, 25 Nov 2008 20:07:04 +0000 (21:07 +0100)]
tracing/function-return-tracer: change the name into function-graph-tracer

Impact: cleanup

This patch changes the name of the "return function tracer" into
function-graph-tracer which is a more suitable name for a tracing
which makes one able to retrieve the ordered call stack during
the code flow.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agobluetooth: fix warning in net/bluetooth/rfcomm/sock.c
Ingo Molnar [Wed, 26 Nov 2008 00:59:21 +0000 (16:59 -0800)]
bluetooth: fix warning in net/bluetooth/rfcomm/sock.c

fix this warning:

  net/bluetooth/rfcomm/sock.c: In function ‘rfcomm_sock_ioctl’:
  net/bluetooth/rfcomm/sock.c:795: warning: unused variable ‘sk’

perhaps BT_DEBUG() should be improved to do printf format checking
instead of the #ifdef, but that looks quite intrusive: each bluetooth
.c file undefines the macro.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosunrpc: fix warning in net/sunrpc/xprtrdma/verbs.c
Ingo Molnar [Wed, 26 Nov 2008 00:58:42 +0000 (16:58 -0800)]
sunrpc: fix warning in net/sunrpc/xprtrdma/verbs.c

fix this warning:

  net/sunrpc/xprtrdma/verbs.c: In function ‘rpcrdma_conn_upcall’:
  net/sunrpc/xprtrdma/verbs.c:279: warning: unused variable ‘addr’

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoax25: fix warning in net/ax25/sysctl_net_ax25.c
Ingo Molnar [Wed, 26 Nov 2008 00:58:19 +0000 (16:58 -0800)]
ax25: fix warning in net/ax25/sysctl_net_ax25.c

fix this warning:

  net/ax25/sysctl_net_ax25.c:27: warning: ‘min_ds_timeout’ defined but not used
  net/ax25/sysctl_net_ax25.c:27: warning: ‘max_ds_timeout’ defined but not used

These are only used in the CONFIG_AX25_DAMA_SLAVE case.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoMerge branches 'tracing/hw-branch-tracing' and 'tracing/branch-tracer' into tracing...
Ingo Molnar [Wed, 26 Nov 2008 00:58:05 +0000 (01:58 +0100)]
Merge branches 'tracing/hw-branch-tracing' and 'tracing/branch-tracer' into tracing/core

17 years agomlx4: fix warning in drivers/net/mlx4/mcg.c
Ingo Molnar [Wed, 26 Nov 2008 00:57:59 +0000 (16:57 -0800)]
mlx4: fix warning in drivers/net/mlx4/mcg.c

fix warning:

  drivers/net/mlx4/mcg.c: In function ‘mlx4_multicast_attach’:
  drivers/net/mlx4/mcg.c:217: warning: integer overflow in expression

there was no real danger of overflow here though.

md5:
   db8eb55620f886c03854a2abb2ce6c3f  mcg.o.before.asm
   db8eb55620f886c03854a2abb2ce6c3f  mcg.o.after.asm

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agodccp: fix warning in net/dccp/options.c
Ingo Molnar [Wed, 26 Nov 2008 00:57:30 +0000 (16:57 -0800)]
dccp: fix warning in net/dccp/options.c

this warning:

  net/dccp/options.c: In function ‘dccp_parse_options’:
  net/dccp/options.c:67: warning: ‘value’ may be used uninitialized in this function

is a bogus GCC warning. The compiler does not recognize the relation
between "value" and "mandatory" variables: the code flow can ever reach
the "out_invalid_option:" label if 'mandatory' is set to 1, and when
'mandatory' is non-zero, we'll always have 'value' initialized.

Help out the compiler by annotating the variable.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agocassini: fix warning in drivers/net/cassini.c
Ingo Molnar [Wed, 26 Nov 2008 00:57:05 +0000 (16:57 -0800)]
cassini: fix warning in drivers/net/cassini.c

this warning:

  drivers/net/cassini.c: In function ‘cas_rx_ringN’:
  drivers/net/cassini.c:2350: warning: ‘skb’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between cas_rx_process_pkt() and 'skb'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agomlx4: fix error path in drivers/net/mlx4/en_rx.c
Ingo Molnar [Wed, 26 Nov 2008 00:53:32 +0000 (16:53 -0800)]
mlx4: fix error path in drivers/net/mlx4/en_rx.c

this warning:

  drivers/net/mlx4/en_rx.c: In function ‘mlx4_en_activate_rx_rings’:
  drivers/net/mlx4/en_rx.c:412: warning: ‘err’ may be used uninitialized in this function

Triggers because 'err' is uninitialized in the following input
conditions: priv->rx_ring_num is zero and mlx4_en_fill_rx_buffers()
fails.

But even if ->rx_ring_num is nonzero, 'err' will be zero if
mlx4_en_fill_rx_buffers() fails and mlx4_en_activate_rx_rings() returns
success - incorrectly.

So it's best to keep the error code uptodate on mlx4_en_fill_rx_buffers()
calls as well.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoz85230: fix warning in drivers/net/wan/z85230.c
Ingo Molnar [Wed, 26 Nov 2008 00:53:08 +0000 (16:53 -0800)]
z85230: fix warning in drivers/net/wan/z85230.c

this warning:

  drivers/net/wan/z85230.c: In function ‘z8530_interrupt’:
  drivers/net/wan/z85230.c:713: warning: ‘intr’ may be used uninitialized in this function

is clearly bogus - annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosis900: fix warning in drivers/net/sis900.c
Ingo Molnar [Wed, 26 Nov 2008 00:52:13 +0000 (16:52 -0800)]
sis900: fix warning in drivers/net/sis900.c

this warning:

  drivers/net/sis900.c: In function ‘sis900_timer’:
  drivers/net/sis900.c:1280: warning: ‘speed’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between sis900_read_mode(), 'speed' and 'duplex'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agofix warning in fs/dlm/netlink.c
Ingo Molnar [Wed, 26 Nov 2008 00:51:45 +0000 (16:51 -0800)]
fix warning in fs/dlm/netlink.c

this warning:

  fs/dlm/netlink.c: In function ‘dlm_timeout_warn’:
  fs/dlm/netlink.c:131: warning: ‘send_skb’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between prepare_data() and send_skb.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agodsa: fix warning in net/dsa/mv88e6060.c
Ingo Molnar [Wed, 26 Nov 2008 00:51:13 +0000 (16:51 -0800)]
dsa: fix warning in net/dsa/mv88e6060.c

this warning:

  net/dsa/mv88e6060.c: In function ‘mv88e6060_poll_link’:
  net/dsa/mv88e6060.c:225: warning: ‘port_status’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between 'link' and 'port_status'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agodsa: fix warning in net/dsa/mv88e6xxx.c
Ingo Molnar [Wed, 26 Nov 2008 00:50:49 +0000 (16:50 -0800)]
dsa: fix warning in net/dsa/mv88e6xxx.c

this warning:

  net/dsa/mv88e6xxx.c: In function ‘mv88e6xxx_poll_link’:
  net/dsa/mv88e6xxx.c:361: warning: ‘port_status’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between 'link' and 'port_status'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoipv6: fix warning in net/ipv6/ip6_flowlabel.c
Ingo Molnar [Wed, 26 Nov 2008 00:50:30 +0000 (16:50 -0800)]
ipv6: fix warning in net/ipv6/ip6_flowlabel.c

this warning:

  net/ipv6/ip6_flowlabel.c: In function ‘ipv6_flowlabel_opt’:
  net/ipv6/ip6_flowlabel.c:467: warning: ‘err’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between fl_create() and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agopkt_sched: fix warning in net/sched/sch_hfsc.c
Ingo Molnar [Wed, 26 Nov 2008 00:50:02 +0000 (16:50 -0800)]
pkt_sched: fix warning in net/sched/sch_hfsc.c

this warning:

  net/sched/sch_hfsc.c: In function ‘hfsc_enqueue’:
  net/sched/sch_hfsc.c:1577: warning: ‘err’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between hfsc_classify(), 'cl' and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosunrpc: fix warning in net/sunrpc/xprtrdma/svc_rdma_transport.c
Ingo Molnar [Wed, 26 Nov 2008 00:49:37 +0000 (16:49 -0800)]
sunrpc: fix warning in net/sunrpc/xprtrdma/svc_rdma_transport.c

this warning:

  net/sunrpc/xprtrdma/svc_rdma_transport.c: In function ‘svc_rdma_accept’:
  net/sunrpc/xprtrdma/svc_rdma_transport.c:830: warning: ‘dma_mr_acc’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) flow connection
between need_dma_mr and dma_mr_acc.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoqla3xxx: fix warning in drivers/net/qla3xxx.c
Ingo Molnar [Wed, 26 Nov 2008 00:49:07 +0000 (16:49 -0800)]
qla3xxx: fix warning in drivers/net/qla3xxx.c

this warning:

  drivers/net/qla3xxx.c: In function ‘ql3xxx_probe’:
  drivers/net/qla3xxx.c:3912: warning: ‘pci_using_dac’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between 'pci_using_dac' and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoniu: fix another warning in drivers/net/niu.c
Ingo Molnar [Wed, 26 Nov 2008 00:48:42 +0000 (16:48 -0800)]
niu: fix another warning in drivers/net/niu.c

this warning:

  drivers/net/niu.c: In function ‘esr_reset’:
  drivers/net/niu.c:741: warning: ‘reset’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between:

 - esr_read_reset() and 'reset'

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoniu: fix warnings in drivers/net/niu.c
Ingo Molnar [Wed, 26 Nov 2008 00:48:12 +0000 (16:48 -0800)]
niu: fix warnings in drivers/net/niu.c

these warnings:

  drivers/net/niu.c: In function ‘serdes_init_niu_1g_serdes’:
  drivers/net/niu.c:451: warning: ‘sig’ may be used uninitialized in this function
  drivers/net/niu.c: In function ‘serdes_init_niu_10g_serdes’:
  drivers/net/niu.c:550: warning: ‘sig’ may be used uninitialized in this function

triggers because GCC does not recognize that the max_retry loop
always initializes 'sig', due to max_retry != 0.

Annotate them.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agos2io: fix warning in drivers/net/s2io.c
Ingo Molnar [Wed, 26 Nov 2008 00:47:35 +0000 (16:47 -0800)]
s2io: fix warning in drivers/net/s2io.c

this warning:

  drivers/net/s2io.c: In function ‘rx_intr_handler’:
  drivers/net/s2io.c:7369: warning: ‘lro’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between:

 - s2io_club_tcp_session()and 'lro'

Annotate it.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonetns: filter out uevent not belonging to init_net
Daniel Lezcano [Wed, 26 Nov 2008 00:46:37 +0000 (16:46 -0800)]
netns: filter out uevent not belonging to init_net

This patch will filter out the uevent not related to the init_net.
Without this patch if a network device is created in a network
namespace with the same name as one network device belonging to the
initial network namespace (eg. eth0), when the network namespace
will die and the network device will be destroyed, an event will
be sent and catched by the udevd daemon. That will result to have
the real network device to be shutdown because the udevd/uevent are
not namespace aware.

Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Acked-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoixgbe: Naming interrupt vectors
Robert Olsson [Wed, 26 Nov 2008 00:43:52 +0000 (16:43 -0800)]
ixgbe: Naming interrupt vectors

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agoniu: Naming interrupt vectors.
Robert Olsson [Wed, 26 Nov 2008 00:41:57 +0000 (16:41 -0800)]
niu: Naming interrupt vectors.

 A patch to put names on the niu interrupt vectors according the syntax below.
 This is needed to assign correct affinity.

 > So on a multiqueue card with 2 RX queues and 2 TX queues we'd
 > have names like:
 >
 >  eth0-rx-0
 >  eth0-rx-1
 >  eth0-tx-0
 >  eth0-tx-1

Signed-off-by: Robert Olsson <robert.olsson@its.uu.se>
Tested-by: Jesper Dangaard Brouer <jdb@comx.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agosync isp1301_omap with mainlne
David Brownell [Mon, 24 Nov 2008 18:32:49 +0000 (10:32 -0800)]
sync isp1301_omap with mainlne

Sync OMAP git with mainline ... build tested.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoremove gpio_expander_omap
David Brownell [Mon, 24 Nov 2008 18:29:34 +0000 (10:29 -0800)]
remove gpio_expander_omap

Now that H3 is converted to use GPIO calls, get rid of the
legacy gpio_expander_omap code ... it has no more users.

One more needless divergence from mainline gone!

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoH3 stops using <mach/gpioexpander.h>
David Brownell [Mon, 24 Nov 2008 18:28:15 +0000 (10:28 -0800)]
H3 stops using <mach/gpioexpander.h>

Update board-h3.c to use standard GPIO calls to set up the
IRDA transceiver, not legacy OMAP-only gpioexpander code.

Also, move the #include <.../ov9640.h>; the header is gone,
there's currently no driver for that camera sensor.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl4030 cleanup symbols and OMAP dependency
David Brownell [Thu, 20 Nov 2008 01:29:59 +0000 (17:29 -0800)]
twl4030 cleanup symbols and OMAP dependency

Finish removing dependency of TWL driver stack on platform-specific
IRQ definitions ... and remove the build dependency on OMAP.

This lets the TWL4030 code be included in test builds for most
platforms, and will make it easier for non-OMAP folk to update
most of this code for new APIs etc.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl4030 power button irq
David Brownell [Thu, 20 Nov 2008 01:28:58 +0000 (17:28 -0800)]
twl4030 power button irq

Disable the TWL4030_PWRIRQ_PWRBTN symbol from the system headers;
initialization of the power button handler still needs work, so
an equivalent symbol is defined in its driver.

Power IRQs now properly handle trigger specs from request_irq();
stop goofing with registers reserved to the IRQ infrastructure.

Minor cleanup:  switch several messages to pr_debug().

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl4030 MADC irq
David Brownell [Thu, 20 Nov 2008 01:28:16 +0000 (17:28 -0800)]
twl4030 MADC irq

Disable the TWL4030_MODIRQ_MADC symbol and remove all its uses.
It's not needed any more now that platform_get_irq() works for
these MADC devices.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl4030 BCI irq and dependencies
David Brownell [Thu, 20 Nov 2008 01:27:36 +0000 (17:27 -0800)]
twl4030 BCI irq and dependencies

Disable the TWL4030_MODIRQ_BCI symbol and remove all its uses.
It's not needed any more now that platform_get_irq() works for
these BCI devices.

Also remove inappropriate board-specific Kconfig dependencies.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl4030 keypad irq & dependencies
David Brownell [Thu, 20 Nov 2008 01:11:01 +0000 (17:11 -0800)]
twl4030 keypad irq & dependencies

Disable the TWL4030_MODIRQ_KEYPAD symbol and remove all its uses.
It's not needed any more now that platform_get_irq() works for
these keypad devices.

Also remove inappropriate board-specific Kconfig dependencies.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl: beagle regulator updates
David Brownell [Sat, 15 Nov 2008 20:41:34 +0000 (12:41 -0800)]
twl: beagle regulator updates

Add init data for the LDO regulators used on Beagle boards:

 - VMMC1 is the main MMC1 power
 - VSIM powers MMC1 too:  DAT4-DAT7 pins, for HSMMC cards
 - VDAC for S-Video output

Those regulators need to be hooked up to the MMC1 and FB (?) devices
through the regulator framework.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl: create regulator devices
David Brownell [Sat, 15 Nov 2008 20:40:35 +0000 (12:40 -0800)]
twl: create regulator devices

Initial code to create twl4030 voltage regulator devices, using
the new regulator framework.  Note that this now starts to care
what name is used to declare the TWL chip:

 - TWL4030 is the "old" chip; newer ones have a bigger variety
   of VAUX2 voltages.

 - The tps65930 and tps65920 are cost-reduced catalog versions of
   the TWL5030 parts ... fewer regulators, no BCI, etc.  (Rev C
   Beagles were anticipated to use '930 parts...)

Board-specific regulator configuration should be provided, listing
which regulators are used and their constraints (e.g. 1.8V only).

Code that could ("should"?) leverage the regulator stuff includes
twl4030 USB transceiver support and MMC glue, LCD support for the
3430SDP and Labrador boards, and S-Video output.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotwl: update overo and pandora i2c data
David Brownell [Sat, 15 Nov 2008 20:38:43 +0000 (12:38 -0800)]
twl: update overo and pandora i2c data

Update Pandora and Overo board-specific code to report that
they use catalog versions of the twl5030 ... this affects
the range of usable VAUX2 voltages.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Typo fix for clock_allow_idle
Amit Kucheria [Tue, 25 Nov 2008 23:11:12 +0000 (15:11 -0800)]
ARM: OMAP: Typo fix for clock_allow_idle

The second clk_deny_idle instance should be clk_allow_idle instead.

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoTypo fix for clock_allow_idle
Amit Kucheria [Mon, 22 Sep 2008 07:23:09 +0000 (10:23 +0300)]
Typo fix for clock_allow_idle

Signed-off-by: Amit Kucheria <amit.kucheria@verdurent.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Extend gpio label column width in omap_gpio debugfs file
Jarkko Nikula [Wed, 12 Nov 2008 08:02:39 +0000 (10:02 +0200)]
ARM: OMAP: Extend gpio label column width in omap_gpio debugfs file

There are already various drivers having bigger label than 10 bytes. Most
of them fit well under 20 bytes but make column width exact so that
oversized labels don't mess up output alignment.

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Tue, 25 Nov 2008 22:27:58 +0000 (14:27 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6

17 years agoUSB: OHCI-OMAP: Switch to gpio_request/free calls (OMAP and mainline)
Jarkko Nikula [Tue, 25 Nov 2008 14:12:14 +0000 (16:12 +0200)]
USB: OHCI-OMAP: Switch to gpio_request/free calls (OMAP and mainline)

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agoARM: OMAP: Switch to gpio_request/free calls (OMAP and mainline)
Jarkko Nikula [Tue, 25 Nov 2008 14:12:13 +0000 (16:12 +0200)]
ARM: OMAP: Switch to gpio_request/free calls (OMAP and mainline)

Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
17 years agotcp: skb_shift cannot cache frag ptrs past pskb_expand_head
Ilpo Järvinen [Tue, 25 Nov 2008 21:57:01 +0000 (13:57 -0800)]
tcp: skb_shift cannot cache frag ptrs past pskb_expand_head

Since pskb_expand_head creates copy of the shared area we
cannot keep any frag ptr past de-cloning. This fixes the
tcpdump recvfrom -EFAULT problem.

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agopkt_sched: sch_api: Remove qdisc_list_lock
Jarek Poplawski [Tue, 25 Nov 2008 21:56:06 +0000 (13:56 -0800)]
pkt_sched: sch_api: Remove qdisc_list_lock

After implementing qdisc->ops->peek() there is no more calling
qdisc_tree_decrease_qlen() without rtnl_lock(), so qdisc_list_lock
added by commit: f6e0b239a2657ea8cb67f0d83d0bfdbfd19a481b "pkt_sched:
Fix qdisc list locking" can be removed.

Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonet: udp_unhash() can test if sk is hashed
Eric Dumazet [Tue, 25 Nov 2008 21:55:15 +0000 (13:55 -0800)]
net: udp_unhash() can test if sk is hashed

Impact: Optimization

Like done in inet_unhash(), we can avoid taking a chain lock if
socket is not hashed in udp_unhash()

Triggered by close(socket(AF_INET, SOCK_DGRAM, 0));

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agonet: Make sure BHs are disabled in sock_prot_inuse_add()
Eric Dumazet [Tue, 25 Nov 2008 21:53:27 +0000 (13:53 -0800)]
net: Make sure BHs are disabled in sock_prot_inuse_add()

prot->destroy is not called with BH disabled. So we must add
explicit BH disable around call to sock_prot_inuse_add()
in sctp_destroy_sock()

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agotcp: tcp_limit_reno_sacked can become static
Ilpo Järvinen [Tue, 25 Nov 2008 21:45:29 +0000 (13:45 -0800)]
tcp: tcp_limit_reno_sacked can become static

Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
17 years agomac80211: don't assume driver has been attached on registration
Luis R. Rodriguez [Fri, 14 Nov 2008 22:44:22 +0000 (14:44 -0800)]
mac80211: don't assume driver has been attached on registration

mac80211's ieee80211_register_hw() is often called within the
probe path so it cannot assume the device's driver structure
has been attached yet so to create a workqueue instead of
using driver->name use the wiphy's phy%d name. The name doesn't
really matter anyway.

This should fix sporadic oopses found when we race to beat the
driver pointer setting. Not even sure how this was working properly.

http://www.kerneloops.org/search.php?search=ieee80211_register_hw

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Configure AR_PHY_SWITCH_COM with apropriate antenna control
Vasanthakumar Thiagarajan [Fri, 14 Nov 2008 19:19:49 +0000 (00:49 +0530)]
ath9k: Configure AR_PHY_SWITCH_COM with apropriate antenna control

This fixes the poor wireless connection which happens even
if we are very well in the range.

Signed-off-by: Don.breslin@atheros.com
Signed-off-by: Vasanthakumar Thiagarajan <vasanth@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: honour bss_info_changed's basic_rates and other settings
Christian Lamparter [Fri, 14 Nov 2008 18:42:39 +0000 (19:42 +0100)]
p54: honour bss_info_changed's basic_rates and other settings

As was pointed out in "p54: honour bss_info_changed's short slot time settings",
bss_info_changed provides more useful settings that can be used by the driver.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54pci: cache firmware for suspend/resume
Christian Lamparter [Sun, 16 Nov 2008 11:20:32 +0000 (12:20 +0100)]
p54pci: cache firmware for suspend/resume

Johannes pointed out that the driver has cache the firmware for
suspend/resume cycles.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: minor fixes
Christian Lamparter [Fri, 14 Nov 2008 18:41:22 +0000 (19:41 +0100)]
p54: minor fixes

This patch contains only contains a one-liner fixes and enhancements

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agop54: enable Mesh Point support
Christian Lamparter [Sat, 15 Nov 2008 16:02:31 +0000 (17:02 +0100)]
p54: enable Mesh Point support

This patch enables Mesh Point operation for any p54 device.

Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agomac80211: Use the HT capabilities from the IE instead of the station's caps.
Sujith [Fri, 14 Nov 2008 10:57:53 +0000 (16:27 +0530)]
mac80211: Use the HT capabilities from the IE instead of the station's caps.

Signed-off-by: Sujith <Sujith.Manoharan@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: make DMA memory consistent
Luis R. Rodriguez [Fri, 14 Nov 2008 03:11:57 +0000 (19:11 -0800)]
ath9k: make DMA memory consistent

Make the DMAable mameory consistent with pci_set_consistent_dma_mask().
The DMA-mapping.txt Documentation recommends this but for PCI-X
considerations and on strange architecture like SGI SN2, not sure
why it would fix an issue but lets see if it does, just in case.

Before this, this driver was tested with x86_64 with about
7 GB of RAM, not sure if this is really needed.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Clarify we only want 32-bit DMA
Luis R. Rodriguez [Fri, 14 Nov 2008 03:11:56 +0000 (19:11 -0800)]
ath9k: Clarify we only want 32-bit DMA

Use DMA_32BIT_MASK to clarify we only want 32-bit DMA
memory. What was there before is also 32-bit but this makes it
clearer

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agort2x00: Detect USB BULK in/out endpoints
Ivo van Doorn [Thu, 13 Nov 2008 22:07:33 +0000 (23:07 +0100)]
rt2x00: Detect USB BULK in/out endpoints

Instead of hardcoding the used in/out endpoints
we should detect them by walking through all
available endpoints.

rt2800usb will gain the most out of this, because
the legacy drivers indicate that there are multiple
endpoints available.
However this code might benefit at least rt73usb as
well for the MIMO queues, and if we are really lucky
rt2500usb will benefit because for the TX and PRIO
queues.

Even if rt2500usb and rt73usb do not get better performance
after this patch, the endpoint detection still belongs to
rt2x00usb, and it shouldn't hurt to always try to detect
the available endpoints.

Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: Remove module warning and dependence on CONFIG_EXPERIMENTAL
Larry Finger [Thu, 13 Nov 2008 18:30:41 +0000 (12:30 -0600)]
rtl8187: Remove module warning and dependence on CONFIG_EXPERIMENTAL

After considerable testing, the initial fears that the driver might damage
some flavors of RTL8187B hardware seem to be groundless. Accordingly, the
logged warning is removed. In addition, Kconfig is changed to remove the
dependence on EXPERIMENTAL.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger>
Acked-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: feedback transmitted packets using tx close descriptor for 8187B
Herton Ronaldo Krzesinski [Thu, 13 Nov 2008 15:39:16 +0000 (10:39 -0500)]
rtl8187: feedback transmitted packets using tx close descriptor for 8187B

Realtek 8187B has a receive command queue to feedback beacon interrupt
and transmitted packet status. Use it to feedback mac80211 about status
of transmitted packets. Unfortunately in the course of testing I found
that the sequence number reported by hardware includes entire sequence
control in a 12 bit only field, so a workaround is done to check only
lowest bits.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: implement conf_tx callback to configure tx queues
Herton Ronaldo Krzesinski [Thu, 13 Nov 2008 15:39:15 +0000 (10:39 -0500)]
rtl8187: implement conf_tx callback to configure tx queues

Add conf_tx callback and use it to configure tx queues of 8187L/8187B.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agortl8187: fix 8187B throughput regression
Herton Ronaldo Krzesinski [Thu, 13 Nov 2008 15:39:14 +0000 (10:39 -0500)]
rtl8187: fix 8187B throughput regression

Hin-Tak Leung reported that after the change "rtl8187: add short slot
handling for 8187B" his RTL8187B started to give low throughput on
network transfers. Turns out that the SIFS setting used isn't ok, it
doesn't look to be the real aSIFSTime, using the "magical" 0x22 value
like on other 818x variants as the vendor does too fixes the issue.

Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: Hin-Tak Leung <htl10@users.sourceforge.net>
Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Race condition in accessing TX and RX buffers.
Senthil Balasubramanian [Thu, 13 Nov 2008 12:31:08 +0000 (18:01 +0530)]
ath9k: Race condition in accessing TX and RX buffers.

Race condition causes RX buffers to be accessed even before it is
initialized. The RX and TX buffers are initialized immediately after
the hardware is registered with mac80211. The mac80211 start callback
is ready to be fired once the device is registered for a case when the
wpa_supplicant is also running at the same time.

The same race condition is also possible for RKFILL registration
as RFKILL init happens after the device registration with mac80211
and it is possible that rfkill_register would be called even before
it is initialized.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: IRQ should be disabled before calling free_irq()
Senthil Balasubramanian [Thu, 13 Nov 2008 12:30:37 +0000 (18:00 +0530)]
ath9k: IRQ should be disabled before calling free_irq()

ath9k frees irq even before IRQs are disabled and existing IRQs
are flushed when rfkill_register() fails.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: Build RFKILL feature even when RFKILL subsystem is a MODULE
Senthil Balasubramanian [Thu, 13 Nov 2008 12:30:02 +0000 (18:00 +0530)]
ath9k: Build RFKILL feature even when RFKILL subsystem is a MODULE

Currently, ath9k builds RFKILL feature only when the RFKILL subsystem
is built part of the kernel. Build RFKILL feature regardless of whether
RFKILL subsystem is built as a MODULE or part of the kernel.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: incorrect noise floor threshold values.
Senthil Balasubramanian [Thu, 13 Nov 2008 12:29:36 +0000 (17:59 +0530)]
ath9k: incorrect noise floor threshold values.

This patch fixes incorrect noise floor threshold values.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoath9k: INI update for atheros chipets.
Senthil Balasubramanian [Thu, 13 Nov 2008 12:28:41 +0000 (17:58 +0530)]
ath9k: INI update for atheros chipets.

init values update for various atheros chipsets.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agoiwlwifi: enable custom fw regulatory solution
Luis R. Rodriguez [Wed, 12 Nov 2008 22:22:04 +0000 (14:22 -0800)]
iwlwifi: enable custom fw regulatory solution

This enables the custom firmware regulatory solution option
on iwlwifi drivers. These devices are uncapable of mapping their
EEPROM regulatory domain to a specific ISO / IEC alpha2.
Although the new 11n devices (>= iwl 5000) have only
3 regultaory SKUs -- MOW, ABG (no N) and BG -- the older
devices (3945 and 4965) have a more complex SKU arrangement
and therefore its not practical to move this to the driver.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agocfg80211: add support for custom firmware regulatory solutions
Luis R. Rodriguez [Wed, 12 Nov 2008 22:22:03 +0000 (14:22 -0800)]
cfg80211: add support for custom firmware regulatory solutions

This adds API to cfg80211 to allow wireless drivers to inform
us if their firmware can handle regulatory considerations *and*
they cannot map these regulatory domains to an ISO / IEC 3166
alpha2. In these cases we skip the first regulatory hint instead
of expecting the driver to build their own regulatory structure,
providing us with an alpha2, or using the reg_notifier().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agocfg80211/mac80211: Add 802.11d support
Luis R. Rodriguez [Wed, 12 Nov 2008 22:22:02 +0000 (14:22 -0800)]
cfg80211/mac80211: Add 802.11d support

This adds country IE parsing to mac80211 and enables its usage
within the new regulatory infrastructure in cfg80211. We parse
the country IEs only on management beacons for the BSSID you are
associated to and disregard the IEs when the country and environment
(indoor, outdoor, any) matches the already processed country IE.

To avoid following misinformed or outdated APs we build and use
a regulatory domain out of the intersection between what the AP
provides us on the country IE and what CRDA is aware is allowed
on the same country.

A secondary device is allowed to follow only the same country IE
as it make no sense for two devices on a system to be in two
different countries.

In the case the AP is using country IEs for an incorrect country
the user may help compliance further by setting the regulatory
domain before or after the IE is parsed and in that case another
intersection will be performed.

CONFIG_WIRELESS_OLD_REGULATORY is supported but requires CRDA
present.

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
17 years agocfg80211: mark regdomains with > NL80211_MAX_SUPP_REG_RULES invalid
Luis R. Rodriguez [Wed, 12 Nov 2008 22:22:01 +0000 (14:22 -0800)]
cfg80211: mark regdomains with > NL80211_MAX_SUPP_REG_RULES invalid

Lets remain consistent and mark rds with > NL80211_MAX_SUPP_REG_RULES
number of reg rules as invalid in is_valid_rd().

Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>