summaryrefslogtreecommitdiffstats
path: root/drivers/staging/batman-adv
Commit message (Collapse)AuthorAgeFilesLines
* Staging: batman-adv: removing redundant assignment of skb->devMarek Lindner2010-09-141-4/+1
| | | | | | Signed-off-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>
* Staging: batman-adv: Add rcu TODOSven Eckelmann2010-09-141-0/+5
| | | | | | | | | | Paul E. McKenney informed us that rcu is misused by leaking pointers to rcu related elements outside read-side protected critical sections. He also recommended that it should be checked against the rcu checklist. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Remove currently unused gw_* datastructuresSven Eckelmann2010-09-142-5/+0
| | | | | | | | | gw_list_lock, gw_list and curr_gw are currently unused members of struct bat_priv. They will be readded when gateway support is really implemented. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Always synchronize rcu's on module shutdownLinus Lüssing2010-09-141-3/+2
| | | | | | | | | | | | | | | | | | | | | During the module shutdown procedure in batman_exit(), a rcu callback is being scheduled (batman_exit -> hardif_remove_interfaces -> hardif_remove_interfae -> call_rcu). However, when the kernel unloads the module, the rcu callback might not have been executed yet, resulting in a "unable to handle kernel paging request" in __rcu_process_callback afterwards, causing the kernel to freeze. The synchronize_net and synchronize_rcu in mesh_free are currently called before the call_rcu in hardif_remove_interface and have no real effect on it. Therefore, we should always flush all rcu callback functions scheduled during the shutdown procedure using synchronize_net. The call to synchronize_rcu can be omitted because synchronize_net already calls it. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Update mtu of bat device by changing mtu of slave deviceSven Eckelmann2010-09-051-0/+4
| | | | | | | | | | 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. Reported-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Don't inform about dropped packets in nodebugSven Eckelmann2010-09-052-9/+8
| | | | | | | | | | | | 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. Reported-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Remove duplicate of attached device nameSven Eckelmann2010-09-055-32/+24
| | | | | | | | | | | 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>
* Staging: batman-adv: multiple mesh cloudsMarek Lindner2010-09-0520-599/+679
| | | | | | | | | | | | | | 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>
* Staging: batman-adv: attach each hard-interface to a soft-interfaceMarek Lindner2010-09-0523-348/+415
| | | | | | | | | | | | | 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>
* Staging: batman-adv: Provide full headers and packets as linear skbSven Eckelmann2010-09-052-9/+15
| | | | | | | | | | | | | | 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>
* Staging: batman-adv: Create copy of skb with pre-allocated headroomSven Eckelmann2010-09-051-53/+24
| | | | | | | | | | 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>
* Staging: batman-adv: Prepare vis packets directly inside a skbSven Eckelmann2010-09-055-96/+133
| | | | | | | | | | | | | | 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>
* Staging: batman-adv: Aggregate batman packets directly in skbSven Eckelmann2010-09-053-23/+24
| | | | | | | | | | | | | | | | 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>
* Staging: batman-adv: Only clone skb data for multiple broadcastsSven Eckelmann2010-09-051-1/+1
| | | | | | | | | | | | | | 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>
* Staging: batman-adv: Keep header writable and unsharedSven Eckelmann2010-09-054-17/+19
| | | | | | | | | | | | | | | | | | | | | | 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>
* Staging: batman-adv: register the batman-adv packet type per interfaceMarek Lindner2010-09-053-15/+9
| | | | | | | | | | | | | | | | | | | 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>
* Staging: batman-adv: Directly prepare icmp packets in socket bufferSven Eckelmann2010-09-051-22/+38
| | | | | | | | | | | It is unnecessary to generate an icmp packet in an extra memory region and than copying it to a new allocated skb. This also resolved the problem that we do inform the user that we couldn't send the packet because we couldn't allocate the socket buffer. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: layer2 unicast packet fragmentationAndreas Langer2010-09-0510-28/+416
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Staging: batman-adv: refactoring unicast payload codeMarek Lindner2010-09-054-62/+128
| | | | | | | 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_privSimon Wunderlich2010-09-056-15/+15
| | | | | | | | | | | | | | | 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>
* Staging: batman-adv: Calculate hamming weight using optimized kernel functionsSven Eckelmann2010-09-053-12/+7
| | | | | | | | | | | | | | 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 packetsSimon Wunderlich2010-09-051-1/+1
| | | | | | | | | | 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>
* Staging: batman-adv: Start new development cycleSven Eckelmann2010-09-052-24/+23
| | | | | | | | | 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>
* Staging: batman-adv: Remove CHANGELOGSven Eckelmann2010-09-051-63/+0
| | | | | | | | | The changelog is only generated on standalone releases. Thus it has no real value for the in-kernel version of batman-adv. Reported-by: Abraham Arce <abraham.arce.moreno@gmail.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Revert: "Staging: batman-adv: Adding netfilter-bridge hooks"Sven Eckelmann2010-09-052-19/+2
| | | | | | | | | | | | | | | This reverts commit 96d592ed599434d2d5f339a1d282871bc6377d2c. 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. Reported-by: Vasiliy Kulikov <segooon@gmail.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Don't write in not allocated packet_buffSven Eckelmann2010-08-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Each net_device in a system will automatically managed as a possible batman_if and holds different informations like a buffer with a prepared originator messages. To reduce the memory usage, the packet_buff will only be allocated when the interface is really added/enabled for batman-adv. The function to update the hw address information inside the packet_buff just assumes that the packet_buff is always initialised and thus the kernel will just oops when we try to change the hw address of a not already fully enabled interface. We must always check if the packet_buff is allocated before we try to change information inside of it. Reported-by: Tim Glaremin <Tim.Glaremin@web.de> Reported-by: Kazuki Shimada <zukky@bb.banban.jp> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Don't use net_dev after dev_putSven Eckelmann2010-08-231-5/+6
| | | | | | | | | | | | | | | | | | dev_put allows a device to be freed when all its references are dropped. After that we are not allowed to access that information anymore. Access to the data structure of a net_device must be surrounded a dev_hold and ended using dev_put. batman-adv adds a device to its own management structure in hardif_add_interface and will release it in hardif_remove_interface. Thus it must hold a reference all the time between those functions to prevent any access to the already released net_device structure. Reported-by: Tim Glaremin <Tim.Glaremin@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Create batman_if only on register eventSven Eckelmann2010-08-231-4/+2
| | | | | | | | | | | | | | | | We try to get all events for all net_devices to be able to add special sysfs folders for the batman-adv configuration. This also includes such events like NETDEV_POST_INIT which has no valid kobject according to v2.6.32-rc3-13-g7ffbe3f. This would create an oops in that situation. It is enough to create the batman_if only on NETDEV_REGISTER events because we will also receive those events for devices which already existed when we registered the notifier call. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: fix own mac address detectionMarek Lindner2010-08-231-2/+5
| | | | | | | | | | | | Earlier batman-adv versions would only create a batman_if struct after a corresponding interface had been activated by a user. Now each existing system interface has a batman_if struct and has to be checked by verifying the IF_ACTIVE flag. Signed-off-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>
* Staging: batman-adv: always reply batman icmp packets with primary macMarek Lindner2010-08-231-2/+14
| | | | | | | | | | | | | When receiving an batman icmp echo request or in case of a time-to-live exceeded batman would reply with the mac address of the outgoing interface which might be a secondary interface. Because secondary interfaces are not globally known this might lead to confusion. Now, replies are sent with the mac address of the primary interface. Signed-off-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>
* Staging: batman-adv: fix batman icmp originating from secondary interfaceMarek Lindner2010-08-232-4/+9
| | | | | | | | | | | | | | | | If a batman icmp packet had to be routed over a secondary interface at the first hop, the mac address of that secondary interface would be written in the 'orig' field of the icmp packet. A node which is more than one hop away is not aware of the mac address because secondary interfaces are not flooded through the whole mesh and therefore can't send a reply. This patch always sends the mac address of the primary interface in the 'orig' field of the icmp packet. Signed-off-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>
* Staging: batman-adv: unify orig_hash_lock spinlock handling to avoid deadlocksMarek Lindner2010-08-231-6/+8
| | | | | | | | | | | | | The orig_hash_lock spinlock always has to be locked with IRQs being disabled to avoid deadlocks between code that is being executed in IRQ context and code that is being executed in non-IRQ context. Reported-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: batman-adv: Fix merge of linus treeSven Eckelmann2010-08-232-8/+4
| | | | | | | | | | | Greg Kroah-Hartman merged Linus 2.6.36 tree in e9563355ac1175dd3440dc2ea5c28b27ed51a283 with his staging tree. Different parts of the merge conflicts were resolved incorrectly and may result in an abnormal behavior. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Staging: Merge staging-next into Linus's treeGreg Kroah-Hartman2010-08-0539-1099/+1930
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: drivers/staging/Kconfig drivers/staging/batman-adv/bat_sysfs.c drivers/staging/batman-adv/device.c drivers/staging/batman-adv/hard-interface.c drivers/staging/cx25821/cx25821-audups11.c Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: Remove unnecessary casts of private_dataJoe Perches2010-07-222-10/+6
| | | | | | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: Update TODO with new points from reviewSven Eckelmann2010-07-221-3/+6
| | | | | | | | | | | | | | | | | | David S. Miller provided some new ideas and found problems in his review 20100719.212625.255369607.davem@davemloft.net. These issues must be resolved before it can be merged into net. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: don't use default init_module/cleanup_module function namesRandy Dunlap2010-07-221-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix two staging drivers to use module_init()/module_exit() instead of default init_module() and cleanup_module() function names so that there are no name conflicts when both are built-in. drivers/staging/dt3155/built-in.o: In function `cleanup_module': (.text+0xc0): multiple definition of `cleanup_module' drivers/staging/batman-adv/built-in.o:(.text+0x330): first defined here drivers/staging/dt3155/built-in.o: In function `init_module': (.text+0xe60): multiple definition of `init_module' drivers/staging/batman-adv/built-in.o:(.text+0x400): first defined here Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> [sven.eckelmann@gmx.de: Mark module init and exit functions as static] Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: Don't increment stats of foreign deviceSven Eckelmann2010-07-221-7/+0
| | | | | | | | | | | | | | | | | | | | The receive hook for batman-adv ethernet frames tried to get the last device which processed the skb before us. It only used that information to update the rx_bytes and rx_packets stat of that foreign device which already has updated it using its own receive functions. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: Add last-seen in originator tableLinus Lüssing2010-07-081-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, there is no easy/intuitive way to find out whether a node might have vanished. This commit adds the time when a node was last seen to the originator table output, so that a common user is able to tell whether a node might have gone without having to wait PURGE_TIMEOUT seconds until that node gets "garbe-collected". It also puts the the versioning information in an extra line, as the first one of this debug output would otherwise get too long. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-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>
| * Staging: batman-adv: Move printk to simplified macrosSven Eckelmann2010-07-0811-121/+128
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each general printk which is not informative by itself for a specific batX device were moved to pr_(info|warning|err) as it provides an easy interface which for example resolves the problem to add the prefix "batman-adv: " before each line. All information which is specific to a batX device will be printed using a bat_(info|err|warning) macro to prefix it also with "batman-adv: batX:" in each line. Reported-by: Joe Perches <joe@perches.com> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: add routing debug log accessible via debugfsMarek Lindner2010-07-0813-73/+371
| | | | | | | | | | | | | | | | | | | | | | All routing debug messages are saved in a ring buffer that can be read via the debugfs file "log". Note that CONFIG_BATMAN_ADV_DEBUG must be activated to have the debug logs compiled in. Signed-off-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>
| * Staging: batman-adv: Remove dependency to PROCFSSven Eckelmann2010-07-081-1/+1
| | | | | | | | | | | | | | | | It is not need to depend on it as procfs support was removed during the transition to sysfs. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: Allow to build it inside the kernelSven Eckelmann2010-07-081-1/+1
| | | | | | | | | | | | | | | | We must use the user supplied information about how the code should be compiled instead of always trying to build it as module. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: fix early debugfs deinitializationMarek Lindner2010-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | The debugfs files are initialized at load time only but would get deinitialized when the module changed in it deactivate (sleeping) state. As a consequence the debugfs files are not accessible anymore. Signed-off-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>
| * Staging: batman-adv: Add include guards to all header filesSven Eckelmann2010-07-0817-12/+78
| | | | | | | | | | | | | | | | | | We include different header files indirectly to the same source file. This creates weird compiler errors from time to time. Include guards should prefend that functions/variables/... gets redefined by itself. Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: batman-adv: Add sysfs abi documentation about bondingMarek Lindner2010-07-081-0/+8
| | | | | | | | | | | | Signed-off-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>
| * Staging: batman-adv: adapting source version to revised versioning schemeMarek Lindner2010-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The new versioning scheme looks like this: * the trunk will simply be named "devel" followed by a revision number * the upcoming release branch will be "maint" followed by a revision number * the releases will carry their respective names (e.g. 2010.0.0) Signed-off-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>
| * Staging: batman-adv: Lower resolution for timeoutsSimon Wunderlich2010-07-085-10/+7
| | | | | | | | | | | | | | | | | | | | It is enough for our timeouts to keep them in seconds instead of miliseconds. With a too high resolution, we might even risk an integer overflow, so this patch should make things more safe. 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>
| * Staging: batman-adv: replace manual calculation by msecs_to_jiffies() for ↵Marek Lindner2010-07-081-4/+4
| | | | | | | | | | | | | | | | better readability Signed-off-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>
| * Staging: batman-adv: Avoid rounding issues for local hna timeoutLinus Lüssing2010-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | With the current default values, this patch is not critical, as LOCAL_HNA_TIMEOUT is a multiple of 1000 anyway. However, if someone would like to change this #define, the person could have some unexpected rounding issues. Therefore doing the multiplication before the division now. Signed-off-by: Linus Lüssing <linus.luessing@web.de> Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
OpenPOWER on IntegriCloud