Skip to content

Commit

Permalink
iwlwifi: earlier rx allocation
Browse files Browse the repository at this point in the history
Value of count is used to decide when to replenish rx buffers. If it is
equal or above 8 we replenish the buffers. Ensure there is no starvation
by initializing count to 8 - thus forcing replenish at first iteration.

This is helpful when rx receives batches of buffers smaller than 8.

Signed-off-by: Mohamed Abbas <mabbas@linux.intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Mohamed Abbas authored and John W. Linville committed Feb 15, 2008
1 parent c342a1b commit d68ab68
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl3945-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -4287,7 +4287,7 @@ static void iwl3945_rx_handle(struct iwl3945_priv *priv)
int reclaim;
unsigned long flags;
u8 fill_rx = 0;
u32 count = 0;
u32 count = 8;

/* uCode's read index (stored in shared DRAM) indicates the last Rx
* buffer that the driver may process (last buffer filled by ucode). */
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/iwl4965-base.c
Original file line number Diff line number Diff line change
Expand Up @@ -4669,7 +4669,7 @@ static void iwl4965_rx_handle(struct iwl4965_priv *priv)
int reclaim;
unsigned long flags;
u8 fill_rx = 0;
u32 count = 0;
u32 count = 8;

/* uCode's read index (stored in shared DRAM) indicates the last Rx
* buffer that the driver may process (last buffer filled by ucode). */
Expand Down

0 comments on commit d68ab68

Please sign in to comment.