aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/batman-adv/aggregation.c
diff options
context:
space:
mode:
authorMarek Lindner <lindner_marek@yahoo.de>2010-05-07 21:47:18 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-11 13:42:39 -0700
commit47fdf097c348673dced571da8a15939005219da0 (patch)
treef5fbc972cf243db502a225a08ed18bd6eee56834 /drivers/staging/batman-adv/aggregation.c
parentStaging: batman-adv: fix whitespace style issues (diff)
downloadlinux-dev-47fdf097c348673dced571da8a15939005219da0.tar.xz
linux-dev-47fdf097c348673dced571da8a15939005219da0.zip
Staging: batman-adv: convert multiple /proc files to use sysfs
This is the first patch in a series of patches which aim to convert all batman-adv /proc files to sysfs. To keep the changes in a digestable size it has been split up into smaller chunks. During the transition period batman-adv will use /proc as well as sysfs. As a first step the following files have been converted: aggregate_ogm, originators, transtable_global, transtable_local Signed-off-by: Marek Lindner <lindner_marek@yahoo.de> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/batman-adv/aggregation.c')
-rw-r--r--drivers/staging/batman-adv/aggregation.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/staging/batman-adv/aggregation.c b/drivers/staging/batman-adv/aggregation.c
index b8338ce23c84..c94683908780 100644
--- a/drivers/staging/batman-adv/aggregation.c
+++ b/drivers/staging/batman-adv/aggregation.c
@@ -167,7 +167,8 @@ static void aggregate(struct forw_packet *forw_packet_aggr,
void add_bat_packet_to_list(unsigned char *packet_buff, int packet_len,
struct batman_if *if_incoming, char own_packet,
- unsigned long send_time)
+ unsigned long send_time,
+ struct bat_priv *bat_priv)
{
/**
* _aggr -> pointer to the packet we want to aggregate with
@@ -183,7 +184,7 @@ void add_bat_packet_to_list(unsigned char *packet_buff, int packet_len,
/* find position for the packet in the forward queue */
spin_lock_irqsave(&forw_bat_list_lock, flags);
/* own packets are not to be aggregated */
- if ((atomic_read(&aggregation_enabled)) && (!own_packet)) {
+ if ((atomic_read(&bat_priv->aggregation_enabled)) && (!own_packet)) {
hlist_for_each_entry(forw_packet_pos, tmp_node, &forw_bat_list,
list) {
if (can_aggregate_with(batman_packet,
@@ -210,7 +211,7 @@ void add_bat_packet_to_list(unsigned char *packet_buff, int packet_len,
* later on
*/
if ((!own_packet) &&
- (atomic_read(&aggregation_enabled)))
+ (atomic_read(&bat_priv->aggregation_enabled)))
send_time += msecs_to_jiffies(MAX_AGGREGATION_MS);
new_aggregated_packet(packet_buff, packet_len,