Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247458
b: refs/heads/master
c: d64a6f4
h: refs/heads/master
v: v3
  • Loading branch information
Bruce Allan authored and Jeff Kirsher committed May 15, 2011
1 parent 68e7393 commit 58341c7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 30 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4dc6ec26fe7d9f89349d4c0c654e2f07420f4b27
refs/heads/master: d64a6f4dca0b45495dd5be8116b618d9cc004eea
4 changes: 2 additions & 2 deletions trunk/drivers/net/e1000e/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ void e1000_write_vfta_generic(struct e1000_hw *hw, u32 offset, u32 value)
* @hw: pointer to the HW structure
* @rar_count: receive address registers
*
* Setups the receive address registers by setting the base receive address
* Setup the receive address registers by setting the base receive address
* register to the devices MAC address and clearing all the other receive
* address registers to 0.
**/
Expand Down Expand Up @@ -1181,7 +1181,7 @@ s32 e1000e_config_fc_after_link_up(struct e1000_hw *hw)
* of pause frames. In this case, we had to advertise
* FULL flow control because we could not advertise Rx
* ONLY. Hence, we must now check to see if we need to
* turn OFF the TRANSMISSION of PAUSE frames.
* turn OFF the TRANSMISSION of PAUSE frames.
*/
if (hw->fc.requested_mode == e1000_fc_full) {
hw->fc.current_mode = e1000_fc_full;
Expand Down
14 changes: 3 additions & 11 deletions trunk/net/batman-adv/aggregation.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "aggregation.h"
#include "send.h"
#include "routing.h"
#include "hard-interface.h"

/* calculate the size of the tt information for a given packet */
static int tt_len(struct batman_packet *batman_packet)
Expand Down Expand Up @@ -106,23 +105,20 @@ static void new_aggregated_packet(unsigned char *packet_buff, int packet_len,
struct forw_packet *forw_packet_aggr;
unsigned char *skb_buff;

if (!atomic_inc_not_zero(&if_incoming->refcount))
return;

/* own packet should always be scheduled */
if (!own_packet) {
if (!atomic_dec_not_zero(&bat_priv->batman_queue_left)) {
bat_dbg(DBG_BATMAN, bat_priv,
"batman packet queue full\n");
goto out;
return;
}
}

forw_packet_aggr = kmalloc(sizeof(struct forw_packet), GFP_ATOMIC);
if (!forw_packet_aggr) {
if (!own_packet)
atomic_inc(&bat_priv->batman_queue_left);
goto out;
return;
}

if ((atomic_read(&bat_priv->aggregated_ogms)) &&
Expand All @@ -137,7 +133,7 @@ static void new_aggregated_packet(unsigned char *packet_buff, int packet_len,
if (!own_packet)
atomic_inc(&bat_priv->batman_queue_left);
kfree(forw_packet_aggr);
goto out;
return;
}
skb_reserve(forw_packet_aggr->skb, sizeof(struct ethhdr));

Expand Down Expand Up @@ -168,10 +164,6 @@ static void new_aggregated_packet(unsigned char *packet_buff, int packet_len,
queue_delayed_work(bat_event_workqueue,
&forw_packet_aggr->delayed_work,
send_time - jiffies);

return;
out:
hardif_free_ref(if_incoming);
}

/* aggregate a new packet into the existing aggregation */
Expand Down
19 changes: 3 additions & 16 deletions trunk/net/batman-adv/send.c
Original file line number Diff line number Diff line change
Expand Up @@ -377,8 +377,6 @@ static void forw_packet_free(struct forw_packet *forw_packet)
{
if (forw_packet->skb)
kfree_skb(forw_packet->skb);
if (forw_packet->if_incoming)
hardif_free_ref(forw_packet->if_incoming);
kfree(forw_packet);
}

Expand Down Expand Up @@ -421,7 +419,7 @@ int add_bcast_packet_to_list(struct bat_priv *bat_priv, struct sk_buff *skb)

primary_if = primary_if_get_selected(bat_priv);
if (!primary_if)
goto out_and_inc;
goto out;

forw_packet = kmalloc(sizeof(struct forw_packet), GFP_ATOMIC);

Expand Down Expand Up @@ -541,7 +539,6 @@ void purge_outstanding_packets(struct bat_priv *bat_priv,
{
struct forw_packet *forw_packet;
struct hlist_node *tmp_node, *safe_tmp_node;
bool pending;

if (hard_iface)
bat_dbg(DBG_BATMAN, bat_priv,
Expand Down Expand Up @@ -570,13 +567,8 @@ void purge_outstanding_packets(struct bat_priv *bat_priv,
* send_outstanding_bcast_packet() will lock the list to
* delete the item from the list
*/
pending = cancel_delayed_work_sync(&forw_packet->delayed_work);
cancel_delayed_work_sync(&forw_packet->delayed_work);
spin_lock_bh(&bat_priv->forw_bcast_list_lock);

if (pending) {
hlist_del(&forw_packet->list);
forw_packet_free(forw_packet);
}
}
spin_unlock_bh(&bat_priv->forw_bcast_list_lock);

Expand All @@ -599,13 +591,8 @@ void purge_outstanding_packets(struct bat_priv *bat_priv,
* send_outstanding_bat_packet() will lock the list to
* delete the item from the list
*/
pending = cancel_delayed_work_sync(&forw_packet->delayed_work);
cancel_delayed_work_sync(&forw_packet->delayed_work);
spin_lock_bh(&bat_priv->forw_bat_list_lock);

if (pending) {
hlist_del(&forw_packet->list);
forw_packet_free(forw_packet);
}
}
spin_unlock_bh(&bat_priv->forw_bat_list_lock);
}

0 comments on commit 58341c7

Please sign in to comment.