aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2200.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ipw2200.h')
-rw-r--r--drivers/net/wireless/ipw2200.h83
1 files changed, 78 insertions, 5 deletions
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index 4b9804900702..6044c0be2c80 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -789,7 +789,7 @@ struct ipw_sys_config {
789 u8 bt_coexist_collision_thr; 789 u8 bt_coexist_collision_thr;
790 u8 silence_threshold; 790 u8 silence_threshold;
791 u8 accept_all_mgmt_bcpr; 791 u8 accept_all_mgmt_bcpr;
792 u8 accept_all_mgtm_frames; 792 u8 accept_all_mgmt_frames;
793 u8 pass_noise_stats_to_host; 793 u8 pass_noise_stats_to_host;
794 u8 reserved3; 794 u8 reserved3;
795} __attribute__ ((packed)); 795} __attribute__ ((packed));
@@ -1122,6 +1122,52 @@ struct ipw_fw_error {
1122 u8 payload[0]; 1122 u8 payload[0];
1123} __attribute__ ((packed)); 1123} __attribute__ ((packed));
1124 1124
1125#ifdef CONFIG_IPW2200_PROMISCUOUS
1126
1127enum ipw_prom_filter {
1128 IPW_PROM_CTL_HEADER_ONLY = (1 << 0),
1129 IPW_PROM_MGMT_HEADER_ONLY = (1 << 1),
1130 IPW_PROM_DATA_HEADER_ONLY = (1 << 2),
1131 IPW_PROM_ALL_HEADER_ONLY = 0xf, /* bits 0..3 */
1132 IPW_PROM_NO_TX = (1 << 4),
1133 IPW_PROM_NO_RX = (1 << 5),
1134 IPW_PROM_NO_CTL = (1 << 6),
1135 IPW_PROM_NO_MGMT = (1 << 7),
1136 IPW_PROM_NO_DATA = (1 << 8),
1137};
1138
1139struct ipw_priv;
1140struct ipw_prom_priv {
1141 struct ipw_priv *priv;
1142 struct ieee80211_device *ieee;
1143 enum ipw_prom_filter filter;
1144 int tx_packets;
1145 int rx_packets;
1146};
1147#endif
1148
1149#if defined(CONFIG_IPW2200_RADIOTAP) || defined(CONFIG_IPW2200_PROMISCUOUS)
1150/* Magic struct that slots into the radiotap header -- no reason
1151 * to build this manually element by element, we can write it much
1152 * more efficiently than we can parse it. ORDER MATTERS HERE
1153 *
1154 * When sent to us via the simulated Rx interface in sysfs, the entire
1155 * structure is provided regardless of any bits unset.
1156 */
1157struct ipw_rt_hdr {
1158 struct ieee80211_radiotap_header rt_hdr;
1159 u64 rt_tsf; /* TSF */
1160 u8 rt_flags; /* radiotap packet flags */
1161 u8 rt_rate; /* rate in 500kb/s */
1162 u16 rt_channel; /* channel in mhz */
1163 u16 rt_chbitmask; /* channel bitfield */
1164 s8 rt_dbmsignal; /* signal in dbM, kluged to signed */
1165 s8 rt_dbmnoise;
1166 u8 rt_antenna; /* antenna number */
1167 u8 payload[0]; /* payload... */
1168} __attribute__ ((packed));
1169#endif
1170
1125struct ipw_priv { 1171struct ipw_priv {
1126 /* ieee device used by generic ieee processing code */ 1172 /* ieee device used by generic ieee processing code */
1127 struct ieee80211_device *ieee; 1173 struct ieee80211_device *ieee;
@@ -1133,6 +1179,12 @@ struct ipw_priv {
1133 struct pci_dev *pci_dev; 1179 struct pci_dev *pci_dev;
1134 struct net_device *net_dev; 1180 struct net_device *net_dev;
1135 1181
1182#ifdef CONFIG_IPW2200_PROMISCUOUS
1183 /* Promiscuous mode */
1184 struct ipw_prom_priv *prom_priv;
1185 struct net_device *prom_net_dev;
1186#endif
1187
1136 /* pci hardware address support */ 1188 /* pci hardware address support */
1137 void __iomem *hw_base; 1189 void __iomem *hw_base;
1138 unsigned long hw_len; 1190 unsigned long hw_len;
@@ -1153,11 +1205,9 @@ struct ipw_priv {
1153 u32 config; 1205 u32 config;
1154 u32 capability; 1206 u32 capability;
1155 1207
1156 u8 last_rx_rssi;
1157 u8 last_noise;
1158 struct average average_missed_beacons; 1208 struct average average_missed_beacons;
1159 struct average average_rssi; 1209 s16 exp_avg_rssi;
1160 struct average average_noise; 1210 s16 exp_avg_noise;
1161 u32 port_type; 1211 u32 port_type;
1162 int rx_bufs_min; /**< minimum number of bufs in Rx queue */ 1212 int rx_bufs_min; /**< minimum number of bufs in Rx queue */
1163 int rx_pend_max; /**< maximum pending buffers for one IRQ */ 1213 int rx_pend_max; /**< maximum pending buffers for one IRQ */
@@ -1308,6 +1358,29 @@ struct ipw_priv {
1308 1358
1309/* debug macros */ 1359/* debug macros */
1310 1360
1361/* Debug and printf string expansion helpers for printing bitfields */
1362#define BIT_FMT8 "%c%c%c%c-%c%c%c%c"
1363#define BIT_FMT16 BIT_FMT8 ":" BIT_FMT8
1364#define BIT_FMT32 BIT_FMT16 " " BIT_FMT16
1365
1366#define BITC(x,y) (((x>>y)&1)?'1':'0')
1367#define BIT_ARG8(x) \
1368BITC(x,7),BITC(x,6),BITC(x,5),BITC(x,4),\
1369BITC(x,3),BITC(x,2),BITC(x,1),BITC(x,0)
1370
1371#define BIT_ARG16(x) \
1372BITC(x,15),BITC(x,14),BITC(x,13),BITC(x,12),\
1373BITC(x,11),BITC(x,10),BITC(x,9),BITC(x,8),\
1374BIT_ARG8(x)
1375
1376#define BIT_ARG32(x) \
1377BITC(x,31),BITC(x,30),BITC(x,29),BITC(x,28),\
1378BITC(x,27),BITC(x,26),BITC(x,25),BITC(x,24),\
1379BITC(x,23),BITC(x,22),BITC(x,21),BITC(x,20),\
1380BITC(x,19),BITC(x,18),BITC(x,17),BITC(x,16),\
1381BIT_ARG16(x)
1382
1383
1311#ifdef CONFIG_IPW2200_DEBUG 1384#ifdef CONFIG_IPW2200_DEBUG
1312#define IPW_DEBUG(level, fmt, args...) \ 1385#define IPW_DEBUG(level, fmt, args...) \
1313do { if (ipw_debug_level & (level)) \ 1386do { if (ipw_debug_level & (level)) \