Skip to content

Commit

Permalink
iwlegacy: merge common header files
Browse files Browse the repository at this point in the history
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
  • Loading branch information
Stanislaw Gruszka committed Nov 15, 2011
1 parent 98613be commit e94a409
Show file tree
Hide file tree
Showing 18 changed files with 2,007 additions and 2,027 deletions.
1 change: 0 additions & 1 deletion drivers/net/wireless/iwlegacy/3945-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*****************************************************************************/

#include "iwl-dev.h"
#include "common.h"
#include "3945.h"

Expand Down
7 changes: 2 additions & 5 deletions drivers/net/wireless/iwlegacy/3945-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,8 @@
#define DRV_NAME "iwl3945"

#include "commands.h"
#include "iwl-sta.h"
#include "3945.h"
#include "common.h"
#include "iwl-helpers.h"
#include "iwl-dev.h"
#include "3945.h"
#include "iwl-spectrum.h"

/*
Expand Down Expand Up @@ -1242,7 +1239,7 @@ static void il3945_rx_handle(struct il_priv *il)
PCI_DMA_FROMDEVICE);
pkt = rxb_addr(rxb);

len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
len = le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK;
len += sizeof(u32); /* account for status word */

/* Reclaim a command buffer only if this packet is a response
Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/iwlegacy/3945-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

#include "commands.h"
#include "3945.h"
#include "iwl-sta.h"

#define RS_NAME "iwl-3945-rs"

Expand Down
6 changes: 2 additions & 4 deletions drivers/net/wireless/iwlegacy/3945.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@
#include <asm/unaligned.h>
#include <net/mac80211.h>

#include "common.h"
#include "commands.h"
#include "iwl-sta.h"
#include "iwl-eeprom.h"
#include "common.h"
#include "iwl-helpers.h"
#include "iwl-led.h"
#include "3945.h"

Expand Down Expand Up @@ -417,7 +415,7 @@ void il3945_hdl_stats(struct il_priv *il,

D_RX("Statistics notification received (%d vs %d).\n",
(int)sizeof(struct il3945_notif_stats),
le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK);
le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK);
#ifdef CONFIG_IWLEGACY_DEBUGFS
il3945_accumulative_stats(il, (__le32 *)&pkt->u.raw);
#endif
Expand Down
9 changes: 1 addition & 8 deletions drivers/net/wireless/iwlegacy/3945.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
/* Hardware specific file defines the PCI IDs table for that hardware module */
extern const struct pci_device_id il3945_hw_card_ids[];

#include "common.h"
#include "iwl-prph.h"
#include "iwl-debug.h"
#include "iwl-power.h"
#include "iwl-dev.h"
#include "iwl-led.h"
#include "iwl-eeprom.h"

Expand Down Expand Up @@ -455,10 +455,6 @@ struct il3945_eeprom {
#define RFD_SIZE 4
#define NUM_TFD_CHUNKS 4

#define RX_QUEUE_SIZE 256
#define RX_QUEUE_MASK 255
#define RX_QUEUE_SIZE_LOG 8

#define TFD_CTL_COUNT_SET(n) (n << 24)
#define TFD_CTL_COUNT_GET(ctl) ((ctl >> 24) & 7)
#define TFD_CTL_PAD_SET(n) (n << 28)
Expand Down Expand Up @@ -659,7 +655,4 @@ static ssize_t il3945_ucode_general_stats_read(struct file *file,
}
#endif

/* Requires full declaration of il_priv before including */
#include "iwl-io.h"

#endif
1 change: 0 additions & 1 deletion drivers/net/wireless/iwlegacy/4965-calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
#include <linux/slab.h>
#include <net/mac80211.h>

#include "iwl-dev.h"
#include "common.h"
#include "4965.h"

Expand Down
1 change: 0 additions & 1 deletion drivers/net/wireless/iwlegacy/4965-debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
* Intel Linux Wireless <ilw@linux.intel.com>
* Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497
*****************************************************************************/
#include "iwl-dev.h"
#include "common.h"
#include "4965.h"

Expand Down
8 changes: 2 additions & 6 deletions drivers/net/wireless/iwlegacy/4965-mac.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@
#define DRV_NAME "iwl4965"

#include "iwl-eeprom.h"
#include "iwl-dev.h"
#include "common.h"
#include "iwl-io.h"
#include "iwl-helpers.h"
#include "iwl-sta.h"
#include "4965.h"


Expand Down Expand Up @@ -1362,7 +1358,7 @@ void il4965_hdl_stats(struct il_priv *il,
"Statistics notification received (%d vs %d).\n",
(int)sizeof(struct il_notif_stats),
le32_to_cpu(pkt->len_n_flags) &
FH_RSCSR_FRAME_SIZE_MSK);
IL_RX_FRAME_SIZE_MSK);

change = ((il->_4965.stats.general.common.temperature !=
pkt->u.stats.general.common.temperature) ||
Expand Down Expand Up @@ -4009,7 +4005,7 @@ void il4965_rx_handle(struct il_priv *il)
PCI_DMA_FROMDEVICE);
pkt = rxb_addr(rxb);

len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
len = le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK;
len += sizeof(u32); /* account for status word */

/* Reclaim a command buffer only if this packet is a response
Expand Down
2 changes: 0 additions & 2 deletions drivers/net/wireless/iwlegacy/4965-rs.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@

#include <linux/workqueue.h>

#include "iwl-dev.h"
#include "iwl-sta.h"
#include "common.h"
#include "4965.h"

Expand Down
6 changes: 1 addition & 5 deletions drivers/net/wireless/iwlegacy/4965.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,8 @@
#include <linux/etherdevice.h>
#include <asm/unaligned.h>

#include "iwl-eeprom.h"
#include "iwl-dev.h"
#include "common.h"
#include "iwl-io.h"
#include "iwl-helpers.h"
#include "iwl-sta.h"
#include "iwl-eeprom.h"
#include "4965.h"

#define IL_AC_UNSET -1
Expand Down
2 changes: 2 additions & 0 deletions drivers/net/wireless/iwlegacy/commands.h
Original file line number Diff line number Diff line change
Expand Up @@ -3355,6 +3355,8 @@ struct il_led_cmd {
*
*****************************************************************************/

#define IL_RX_FRAME_SIZE_MSK 0x00003fff

struct il_rx_pkt {
/*
* The first 4 bytes of the RX frame header contain both the RX frame
Expand Down
6 changes: 1 addition & 5 deletions drivers/net/wireless/iwlegacy/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,9 @@
#include <net/mac80211.h>

#include "iwl-eeprom.h"
#include "iwl-dev.h"
#include "iwl-debug.h"
#include "common.h"
#include "iwl-io.h"
#include "iwl-power.h"
#include "iwl-sta.h"
#include "iwl-helpers.h"

const char *il_get_cmd_string(u8 cmd)
{
Expand Down Expand Up @@ -4351,7 +4347,7 @@ void il_hdl_pm_debug_stats(struct il_priv *il,
struct il_rx_buf *rxb)
{
struct il_rx_pkt *pkt = rxb_addr(rxb);
u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK;
u32 len = le32_to_cpu(pkt->len_n_flags) & IL_RX_FRAME_SIZE_MSK;
D_RADIO("Dumping %d bytes of unhandled "
"notification for %s:\n", len,
il_get_cmd_string(pkt->hdr.cmd));
Expand Down
Loading

0 comments on commit e94a409

Please sign in to comment.