]> git.baikalelectronics.ru Git - kernel.git/commit
iwlwifi: refactor packet reception code
authorDaniel C Halperin <daniel.c.halperin@intel.com>
Thu, 13 Aug 2009 20:30:56 +0000 (13:30 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Thu, 20 Aug 2009 15:33:11 +0000 (11:33 -0400)
commit1877d08289e982fd85c05c5c58a00558f843da02
tree9ce669ba936410be62cefb29cda708428d30cf90
parent5e4ae89deb7d6110a7c7806a517e3e7e93ce1d6d
iwlwifi: refactor packet reception code

This patch fixes a number of issues in iwl_rx_reply_rx and
iwl_pass_packet_to_mac80211.  These issues stem from the complexities of
managing two different types of packet commands for different hardware.

- Unify code handling rx_phy_res in SKB or cached to eliminate redundancy and
remove potential NULL pointer accesses
- Replace magic number with proper constant
- Optimize functions by moving early exit conditions before computation
- Comment code and improve some variable names
- Remove redundant computation in iwl_pass_packet_to_mac80211 by passing in the
correct, already-computed arguments.

Signed-off-by: Daniel C Halperin <daniel.c.halperin@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-commands.h
drivers/net/wireless/iwlwifi/iwl-rx.c