staging: udlfb: fbdev character read and write support
Restore fbdev character read and write support
Enables access to the framebuffer from simple reads and writes
to /dev/fb0 (or fb1, ...). Low performance, because of extra copy
and because udlfb must scan every pixel for changes. But very
useful for testing and simple image display, etc.
Sven Eckelmann [Sat, 4 Sep 2010 23:58:38 +0000 (01:58 +0200)]
Staging: batman-adv: Update mtu of bat device by changing mtu of slave device
We must reduce our own mtu when we reduce the mtu of any device we use
to transfer our packets. Otherwise we may accept to large packets which
gets dropped by the actual device.
Sven Eckelmann [Sat, 4 Sep 2010 23:58:37 +0000 (01:58 +0200)]
Staging: batman-adv: Don't inform about dropped packets in nodebug
Information about dropped packets are usually only interesting for
debugging purposes and otherwise open the possibility to flood the logs
of the target machine with useless information.
pr_debug will not output those information on a nodebug kernel.
Sven Eckelmann [Sat, 4 Sep 2010 23:58:36 +0000 (01:58 +0200)]
Staging: batman-adv: Remove duplicate of attached device name
batman_if has the name of the net_dev as extra string in its own
structure, but also holds a reference to the actual net_device structure
which always has the current name of the device. This makes it
unneccessary and also more complex because we must update the name in
situations when we receive a NETDEV_CHANGENAME event.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Lindner [Sat, 4 Sep 2010 23:58:35 +0000 (01:58 +0200)]
Staging: batman-adv: multiple mesh clouds
This patch removes all remaining global variables and includes the
necessary bits into the bat_priv structure. It is the last
remaining piece to allow multiple concurrent mesh clouds on the
same device.
A few global variables have been rendered obsolete during the process
and have been removed entirely.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Lindner [Sat, 4 Sep 2010 23:58:34 +0000 (01:58 +0200)]
Staging: batman-adv: attach each hard-interface to a soft-interface
This patch replaces the static bat0 interface with a dynamic/abstracted
approach. It is now possible to create multiple batX interfaces by
assigning hard interfaces to them. Each batX interface acts as an
independent mesh network. A soft interface is removed once no hard
interface references it any longer.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:33 +0000 (01:58 +0200)]
Staging: batman-adv: Provide full headers and packets as linear skb
We must ensure that all interesting data is linear and not paged out to
access all information in a header or a full batman-adv related packet.
Otherwise we may drop packets which have non-linear headers but which
hold valid data.
This doesn't affect non-linear skbs which have all headers in a linear
head unless we must process the whole packet like in ogms or vis
packets.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:32 +0000 (01:58 +0200)]
Staging: batman-adv: Create copy of skb with pre-allocated headroom
We can use skb_cow instead of a handwritten function to test and create
a writable skb buffer. This also allows us to pre-allocate headroom to
be able to send the data without re-allocating the buffer again to add
the ethernet header.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:31 +0000 (01:58 +0200)]
Staging: batman-adv: Prepare vis packets directly inside a skb
The vis information structure is used in a way that it can be transfered
directly as packet. It still had to be copied into a skb because of an
extra buffer used for the actual preparation of the data. This is
unnecessary and can be replaced by a simple clone instead of an full
copy before each send.
This makes also the send_raw_packet function obsolete.
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:30 +0000 (01:58 +0200)]
Staging: batman-adv: Aggregate batman packets directly in skb
All originator messages are send through aggregation buffers. Those
buffers can directly be allocated as skb to reduce the cost of
allocation an extra buffer and copying them to a new allocated skb
directly before it gets send.
Now only the skb must be cloned in case of send_packet_to_if as it gets
called by send_packet for each interface. Non-primary ogms must not
cloned at all because they will only send once and the forward_packet
structure is freed by send_outstanding_bat_packet afterwards.
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:29 +0000 (01:58 +0200)]
Staging: batman-adv: Only clone skb data for multiple broadcasts
batman-adv tries to resend broadcasts on all interfaces up to three
times. For each round and each interface it must provide a skb which
gets consumed by the sending function.
It is unnecessary to copy the data of each broadcast because the actual
data is either not shared or already copied by add_bcast_packet_to_list.
So it is enough to just copy the skb control data
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:28 +0000 (01:58 +0200)]
Staging: batman-adv: Keep header writable and unshared
my_skb_push provided an easy way to allocate enough headroom in
situation were we don't have enough space left and move the data pointer
to the new position, but we didn't checked wether we are allowed to
write to the new pushed header. This is for example a problem when the
skb was cloned and thus doesn't have a private data part.
my_skb_head_push now replaces my_skb_push by using skb_cow_head to
provide only a large enough, writable header without testing for the
rest of the (maybe shared) data. It will also move the data pointer
using skb_push when skb_cow_head doesn't fail.
This should give us enough flexibility in situation were skbs will be
queued by underlying layers and still doesn't unnecessarily copy the
data in situations when the skb was consumed right away during
dev_queue_xmit.
Reported-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Marek Lindner [Sat, 4 Sep 2010 23:58:27 +0000 (01:58 +0200)]
Staging: batman-adv: register the batman-adv packet type per interface
Batman-adv globally registered the batman-adv packet type and installed
a hook to batman_skb_recv(). Each interface receiving a packet with that
type would end up in this function which then had to loop through all
batman-adv internal interface structures to find the its meta data. The
more interfaces a system had the longer the loops might take. Each and
every packet goes through this function making it a performance critical
loop.
This patch installs the hook for each activated interface. The called
batman_skb_recv() can distinguish these calls, therefore avoiding the
loop through the interface structures.
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This patch implements a simple layer2 fragmentation to allow traffic
exchange over network interfaces with a MTU smaller than 1500 bytes. The
fragmentation splits the big packets into two parts and marks the frames
accordingly. The receiving end buffers the packets to reassemble the
orignal packet before passing it to the higher layers. This feature
makes it necessary to modify the batman-adv encapsulation for unicast
packets by adding a sequence number, flags and the originator address.
This modifcation is part of a seperate packet type for fragemented
packets to keep the original overhead as low as possible. This patch
enables the feature by default to ensure the data traffic can travel
through the network. But it also prints a warning to notify the user
about the performance implications.
Note: Fragmentation should be avoided at all costs since it has a
dramatic impact on the performance, especially when it comes wifi
networks. Instead of a single packet, 2 packets have to be sent! Not
only valuable airtime is wasted but also packetloss decreases the
throughput. A link with 50% packetloss and fragmentation enabled is
pretty much unusable.
Signed-off-by: Andreas Langer <an.langer@gmx.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: batman-adv: move queue counters into bat_priv
to support multiple mesh devices later, we need to move global variables
like the queues into corresponding private structs bat_priv of the soft
devices.
Note that this patch still has a lot of FIXMEs and depends on the global
soft_device variable. This should be resolved later, e.g. by referencing
the parent soft device in batman_if.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
[sven.eckelmann@gmx.de: Rework on top of current version] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:22 +0000 (01:58 +0200)]
Staging: batman-adv: Calculate hamming weight using optimized kernel functions
The Kernighan algorithm is not able to calculate the number of set bits
in parallel and the compiler cannot replace it with optimized
instructions.
The kernel provides specialised functions for each cpu which can either
use a software implementation or hardware instruction depending on the
target cpu.
Reported-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: batman-adv: Count Ethernet header for incoming packets
The Ethernet header is counted when transmitting a packet, so it should also
be counted when receiving a packet. With this patch, the rx_bytes and tx_bytes
statistics behave like an ordinary Ethernet interface.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sven Eckelmann [Sat, 4 Sep 2010 23:58:20 +0000 (01:58 +0200)]
Staging: batman-adv: Start new development cycle
Version 2010.1.0 of the extra kernel module was released and thus the
documentation should be updated and everything prepared for the the
upcoming patchset.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
The netfilter hook seems to be misused and may leak skbs in situations
when NF_HOOK returns NF_STOLEN. It may not filter everything as
expected. Also the ethernet bridge tables are not yet capable to
understand batman-adv packet correctly.
It was only added for testing purposes and can be removed again.
Staging: xgifb: fixed many style issues in vb_util.c
This is a patch to the vb_util.c file that fixes many style
issues found by the checkpatch.pl tool.
- extra spaces
- invalid code indent
- extra braces
- invalid comment style
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: xgifb: fixed many style issues in vb_init.c
This is a patch to the vb_init.c file that fixes many style
issues found by the checkpatch.pl tool.
- extra spaces
- invalid code indent
- extra braces
- invalid comment style
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: xgifb: fixed many style issue in vb_setmode.c
This is a patch to the vb_setmode.c file that fixes many style
issues found by the checkpatch.pl tool.
- extra spaces
- invalid code indent
- extra braces
- invalid comment style
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Staging: xgifb: fixed many style issue in vb_ext.c
This is a patch to the vb_ext.c file that fixes many style
issues found by the checkpatch.pl tool.
- extra spaces
- invalid code indent
- extra braces
- invalid comment style
Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1) There is a missing return or goto statement in one fail path in
sasem_probe, so that the code contiues its normal execution (and
unlocks a mutex twice). Fix that by jumping to the right place.
Anyway the code is very broken on its fail paths and there are many
leaks. But that's a different story.
2) There is an omitted unlock in one fail path in vfd_write, jump to
the right place to unlock the lock.
3) In the probe function, there is one more error where the lock is
not unlocked. Fix that by jumping to the proper place.
AR6003 is a single stream, SDIO based 802.11 chipset from
Atheros optimized for mobile and embedded devices. ath6kl is a
cfg80211 driver for AR6003 and supports both the station and
AP mode of operation.
Station mode supports 802.11 a/b/g/n with HT20 on 2.4/5GHz and
HT40 only on 5GHz. Some of the other features include WPA/WPA2,
WPS, WMM, WMM-PS, and BT coexistence. AP mode can be operated
only in b/g mode with support for a subset of features mentioned
above.
The driver supports cfg80211 but comes with its own set of
wext ioctls which have historically supported some of our
customers with features like BT 3.0 and AP mode of operation.
The driver requires firmware that runs on the chip's network
processor. The majority of it is stored in ROM. The binaries
that are downloaded and executed from RAM are as follows:
1) Patch against the code in ROM for bug fixes and feature
enhancements.
2) Code to copy the data from the OTP region of the memory
into RAM.
3) Calibration file carrying board specific data.
The above files need to be present in the directory
'/lib/firmware/ath6k/AR6003/hw2.0/' for the driver to initialize
the chip upon enumeration. The files can be downloaded from the
link specified at the following location:
This driver is only provided in the interim while we work on
the mac80211 replacement, ath6k. Once the mac80211 driver
achieves feature parity with the ath6kl driver, the ath6kl will
be deprecated and removed from staging.
Nitin Gupta [Mon, 9 Aug 2010 17:26:48 +0000 (22:56 +0530)]
Staging: zram: Remove need for explicit device initialization
Currently, the user has to explicitly write a positive value to
initstate sysfs node before the device can be used. This event
triggers allocation of per-device metadata like memory pool,
table array and so on.
We do not pre-initialize all zram devices since the 'table' array,
mapping disk blocks to compressed chunks, takes considerable amount
of memory (8 bytes per page). So, pre-initializing all devices will
be quite wasteful if only few or none of the devices are actually
used.
This explicit device initialization from user is an odd requirement and
can be easily avoided. We now initialize the device when first write is
done to the device.
Nitin Gupta [Mon, 9 Aug 2010 17:26:47 +0000 (22:56 +0530)]
Staging: zram: Replace ioctls with sysfs interface
Creates per-device sysfs nodes in /sys/block/zram<id>/
Currently following stats are exported:
- disksize
- num_reads
- num_writes
- invalid_io
- zero_pages
- orig_data_size
- compr_data_size
- mem_used_total
By default, disksize is set to 0. So, to start using
a zram device, fist write a disksize value and then
initialize device by writing any positive value to
initstate. For example:
# initialize /dev/zram0 with 50MB disksize
echo 50*1024*1024 | bc > /sys/block/zram0/disksize
echo 1 > /sys/block/zram0/initstate
When done using a disk, issue reset to free its memory
by writing any positive value to reset node:
echo 1 > /sys/block/zram0/reset
This change also obviates the need for 'rzscontrol' utility.
Julia Lawall [Sat, 28 Aug 2010 15:41:00 +0000 (17:41 +0200)]
staging: rtl8193*: Remove double test
The 1 element of the array is tested twice. Change the code so that the
remaining 3 element of the array is tested instead of testing the 1 element
a second time.
The sematic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@expression@
expression E;
@@
(
* E
|| ... || E
|
* E
&& ... && E
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arjan van de Ven [Wed, 25 Aug 2010 14:22:10 +0000 (15:22 +0100)]
Staging: mrst-touchscreen: fix channel allocation in the touch screen driver
the touch screen driver tries to find a range of free channels (which
are an array of bytes), by scanning for the "end of used channel" marker.
however it tries to be WAAAAY too smart and does 32 bit logic on 8 bit
quantities, and in the process completely gets it wrong
(repeatedly read the same register instead of incrementing in the loop,
assuming that if any of the 4 bytes in the 32 byte quantity is free,
all four are free, returning the channel number divided by 4 rather than
the actual first free channel number)
On the setting side, the same mistakes are made by and large; changed
this to just use the byte SCU write functions....
with these fixes we go from a completely non detected touchscreen to
something that appears to completely get detected.
(after also fixing the ordering issue that Jacobs patch should solve)
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Pavan Savoy [Thu, 19 Aug 2010 18:08:51 +0000 (14:08 -0400)]
Staging: ti-st: remove st_get_plat_device
In order to support multiple ST platform devices, a new symbol
'st_get_plat_device' earlier needed to be exported by the arch/XX/brd-XX.c
file which intends to add the ST platform device.
On removing this dependency, now inside ST driver maintain the array of
ST platform devices that would be registered.
As of now let id=0, as and when we end up having such platforms
where mutliple ST devices can exist, id would come from
protocol drivers (BT, FM and GPS) as to on which platform device
they want to register to.
Neil Munro [Sat, 14 Aug 2010 22:39:51 +0000 (23:39 +0100)]
Staging: RT2860: Fixed all warnings and errors in the iface directory
I have cleaned both files inside the iface directory (fileo rtmp_pci.h
and rtmp_usb.h). I am not sure about some of the changes I have made
however my adjustments have solved all errors. There were also a few
issues on my machine with ap.h on my machine, however I have since
cleaned that too.
Signed-off-by: Neil Munro <neilmunro@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Randy Dunlap [Tue, 10 Aug 2010 15:46:44 +0000 (08:46 -0700)]
Staging: xgifb: fix lots of sparse warnings
Fix many sparse warnings about data or functions being static.
Fix many sparse warnings about data or functions not being used
(put them inside #if 0/#endif blocks).
Fix sparse warnings about 0 being used for NULL.
Fixed a small bit of source formatting when those lines were being
modified anyway, but there is still lots of this yet to be done.
Jarod Wilson [Tue, 17 Aug 2010 21:41:08 +0000 (17:41 -0400)]
Staging: lirc: fix compiler warning
On Fri, Aug 13, 2010 at 03:38:40PM +0200, Dan Carpenter wrote:
> Speak of left over stuff, it's weird that I didn't notice this before
> but gcc complains about an unitialized variable in
> imon_incoming_packet().
>
> drivers/staging/lirc/lirc_imon.c: In function ‘imon_incoming_packet’:
> drivers/staging/lirc/lirc_imon.c:661: warning: ‘chunk_num’ may be used
> uninitialized in this function
>
> I don't know how to fix that, but it looks important.
Ew. Yeah, that doesn't look so hot like it is right now. The old lirc_imon
driver had chunk_num = buf[7], and made much more extensive use of
chunk_num. Simply removing chunk_num and using buf[7] should be fine.
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Kulikov Vasiliy [Fri, 6 Aug 2010 19:52:57 +0000 (23:52 +0400)]
staging: cx25821: call disable_pci_device() if pci_probe() failed
Driver should call disable_pci_device() if it returns from pci_probe()
with error. Also it must not be called if pci_request_region() fails as
it means that somebody uses device resources and rules the device.
Dan Carpenter [Tue, 10 Aug 2010 05:42:25 +0000 (07:42 +0200)]
Staging: quickstart: acpi_status is unsigned
acpi_bus_register_driver() returns an int, not acpi_status. It returns
zero on success and negative error codes on failure, but acpi_status is
unsigned. We can just use "ret" here.
Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dan Carpenter [Tue, 10 Aug 2010 06:15:52 +0000 (08:15 +0200)]
Staging: rtl8192e: add curly braces to if statement
In the original code there was some extra semicolons after the if
statement:
if (!channel_map[ieee->current_network.channel]);
^^^
>From the indenting it looked like that should be curly braces instead.
Also I made some white space changes to stop checkpatch.pl from
complaining.
Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>