aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2008-06-11 21:47:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-14 12:18:10 -0400
commitbe1f3ab6e5e9788fd2985117b40755130058a2be (patch)
treebfb3f526195076f866723880dc59dba4a82a49b0 /drivers/net/wireless/iwlwifi/iwl-dev.h
parent808e72a088d164cf0030f593d9a5fc23306fb6b6 (diff)
iwlwifi: general code clean up
This patch cleans up iwlwifi's code: Add missing include, remove empty lines etc... Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h62
1 files changed, 3 insertions, 59 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 70018545591b..e6188f087ea6 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -29,8 +29,8 @@
29 * Please use iwl-4965-hw.h for hardware-related definitions. 29 * Please use iwl-4965-hw.h for hardware-related definitions.
30 */ 30 */
31 31
32#ifndef __iwl_4965_h__ 32#ifndef __iwl_dev_h__
33#define __iwl_4965_h__ 33#define __iwl_dev_h__
34 34
35#include <linux/pci.h> /* for struct pci_device_id */ 35#include <linux/pci.h> /* for struct pci_device_id */
36#include <linux/kernel.h> 36#include <linux/kernel.h>
@@ -593,15 +593,8 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap,
593 u8 flags, struct ieee80211_ht_info *ht_info); 593 u8 flags, struct ieee80211_ht_info *ht_info);
594extern int iwl4965_is_network_packet(struct iwl_priv *priv, 594extern int iwl4965_is_network_packet(struct iwl_priv *priv,
595 struct ieee80211_hdr *header); 595 struct ieee80211_hdr *header);
596extern int iwl4965_power_init_handle(struct iwl_priv *priv);
597extern void iwl4965_handle_data_packet_monitor(struct iwl_priv *priv,
598 struct iwl_rx_mem_buffer *rxb,
599 void *data, short len,
600 struct ieee80211_rx_status *stats,
601 u16 phy_flags);
602extern int iwl4965_is_duplicate_packet(struct iwl_priv *priv, 596extern int iwl4965_is_duplicate_packet(struct iwl_priv *priv,
603 struct ieee80211_hdr *header); 597 struct ieee80211_hdr *header);
604extern int iwl4965_calc_db_from_ratio(int sig_ratio);
605extern int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm); 598extern int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm);
606extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv, 599extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
607 struct ieee80211_hdr *hdr, 600 struct ieee80211_hdr *hdr,
@@ -609,18 +602,7 @@ extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
609extern void iwl4965_update_chain_flags(struct iwl_priv *priv); 602extern void iwl4965_update_chain_flags(struct iwl_priv *priv);
610int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src); 603int iwl4965_set_pwr_src(struct iwl_priv *priv, enum iwl_pwr_src src);
611 604
612int iwl4965_init_geos(struct iwl_priv *priv);
613void iwl4965_free_geos(struct iwl_priv *priv);
614
615extern const u8 iwl_bcast_addr[ETH_ALEN]; 605extern const u8 iwl_bcast_addr[ETH_ALEN];
616int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd);
617
618/*
619 * Currently used by iwl-3945-rs... look at restructuring so that it doesn't
620 * call this... todo... fix that.
621*/
622extern u8 iwl4965_sync_station(struct iwl_priv *priv, int sta_id,
623 u16 tx_rate, u8 flags);
624 606
625/****************************************************************************** 607/******************************************************************************
626 * 608 *
@@ -638,35 +620,16 @@ extern u8 iwl4965_sync_station(struct iwl_priv *priv, int sta_id,
638 * iwl4965_mac_ <-- mac80211 callback 620 * iwl4965_mac_ <-- mac80211 callback
639 * 621 *
640 ****************************************************************************/ 622 ****************************************************************************/
641extern void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv);
642extern void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv);
643extern int iwl4965_hw_set_hw_params(struct iwl_priv *priv);
644extern int iwl_rxq_stop(struct iwl_priv *priv); 623extern int iwl_rxq_stop(struct iwl_priv *priv);
645extern void iwl_txq_ctx_stop(struct iwl_priv *priv); 624extern void iwl_txq_ctx_stop(struct iwl_priv *priv);
646extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv, 625extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
647 struct iwl_frame *frame, u8 rate); 626 struct iwl_frame *frame, u8 rate);
648extern void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
649 struct iwl_cmd *cmd,
650 struct ieee80211_tx_info *info,
651 struct ieee80211_hdr *hdr,
652 int sta_id, int tx_id);
653extern void iwl4965_hw_rx_statistics(struct iwl_priv *priv, 627extern void iwl4965_hw_rx_statistics(struct iwl_priv *priv,
654 struct iwl_rx_mem_buffer *rxb); 628 struct iwl_rx_mem_buffer *rxb);
655extern void iwl4965_disable_events(struct iwl_priv *priv); 629extern void iwl4965_disable_events(struct iwl_priv *priv);
656extern int iwl4965_get_temperature(const struct iwl_priv *priv);
657extern void iwl4965_rx_reply_rx(struct iwl_priv *priv, 630extern void iwl4965_rx_reply_rx(struct iwl_priv *priv,
658 struct iwl_rx_mem_buffer *rxb); 631 struct iwl_rx_mem_buffer *rxb);
659 632
660/**
661 * iwl_find_station - Find station id for a given BSSID
662 * @bssid: MAC address of station ID to find
663 *
664 * NOTE: This should not be hardware specific but the code has
665 * not yet been merged into a single common layer for managing the
666 * station tables.
667 */
668extern u8 iwl_find_station(struct iwl_priv *priv, const u8 *bssid);
669
670extern int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel); 633extern int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel);
671extern int iwl_queue_space(const struct iwl_queue *q); 634extern int iwl_queue_space(const struct iwl_queue *q);
672static inline int iwl_queue_used(const struct iwl_queue *q, int i) 635static inline int iwl_queue_used(const struct iwl_queue *q, int i)
@@ -694,16 +657,8 @@ extern int iwl4965_radio_kill_sw(struct iwl_priv *priv, int disable_radio);
694/* 657/*
695 * Forward declare iwl-4965.c functions for iwl-base.c 658 * Forward declare iwl-4965.c functions for iwl-base.c
696 */ 659 */
697extern int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
698 struct iwl_tx_queue *txq,
699 u16 byte_cnt);
700extern int iwl4965_alive_notify(struct iwl_priv *priv);
701extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode);
702extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv); 660extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
703 661
704extern void iwl4965_init_ht_hw_capab(const struct iwl_priv *priv,
705 struct ieee80211_ht_info *ht_info,
706 enum ieee80211_band band);
707int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw, 662int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
708 enum ieee80211_ampdu_mlme_action action, 663 enum ieee80211_ampdu_mlme_action action,
709 const u8 *addr, u16 tid, u16 *ssn); 664 const u8 *addr, u16 tid, u16 *ssn);
@@ -1174,17 +1129,6 @@ static inline const char *iwl_get_tx_fail_reason(u32 status) { return ""; }
1174#endif 1129#endif
1175 1130
1176 1131
1177static inline int iwl_get_ra_sta_id(struct iwl_priv *priv,
1178 struct ieee80211_hdr *hdr)
1179{
1180 if (priv->iw_mode == IEEE80211_IF_TYPE_STA) {
1181 return IWL_AP_ID;
1182 } else {
1183 u8 *da = ieee80211_get_DA(hdr);
1184 return iwl_find_station(priv, da);
1185 }
1186}
1187
1188static inline struct ieee80211_hdr *iwl_tx_queue_get_hdr(struct iwl_priv *priv, 1132static inline struct ieee80211_hdr *iwl_tx_queue_get_hdr(struct iwl_priv *priv,
1189 int txq_id, int idx) 1133 int txq_id, int idx)
1190{ 1134{
@@ -1254,4 +1198,4 @@ extern const struct iwl_channel_info *iwl_get_channel_info(
1254 1198
1255/* Requires full declaration of iwl_priv before including */ 1199/* Requires full declaration of iwl_priv before including */
1256 1200
1257#endif /* __iwl4965_4965_h__ */ 1201#endif /* __iwl_dev_h__ */