aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwl8k.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2010-07-27 11:59:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2010-07-27 11:59:19 -0400
commit800f65bba8d2030b3fef62850e203f9f176625a8 (patch)
tree6507c4fe7a0826c253b4afb29375ab306a0fd9c8 /drivers/net/wireless/mwl8k.c
parent06b3cda0c12986f5bba578b918b188d731c4e191 (diff)
parentb3190df628617c7a4f188a9465aeabe1f5761933 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluetooth-next-2.6
Conflicts: drivers/net/wireless/iwlwifi/iwl-commands.h
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r--drivers/net/wireless/mwl8k.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index e3f130c4eaff..0e34260b22b1 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -428,7 +428,7 @@ struct mwl8k_cmd_pkt {
428 __u8 macid; 428 __u8 macid;
429 __le16 result; 429 __le16 result;
430 char payload[0]; 430 char payload[0];
431} __attribute__((packed)); 431} __packed;
432 432
433/* 433/*
434 * Firmware loading. 434 * Firmware loading.
@@ -634,7 +634,7 @@ struct mwl8k_dma_data {
634 __le16 fwlen; 634 __le16 fwlen;
635 struct ieee80211_hdr wh; 635 struct ieee80211_hdr wh;
636 char data[0]; 636 char data[0];
637} __attribute__((packed)); 637} __packed;
638 638
639/* Routines to add/remove DMA header from skb. */ 639/* Routines to add/remove DMA header from skb. */
640static inline void mwl8k_remove_dma_header(struct sk_buff *skb, __le16 qos) 640static inline void mwl8k_remove_dma_header(struct sk_buff *skb, __le16 qos)
@@ -713,7 +713,7 @@ struct mwl8k_rxd_8366_ap {
713 __u8 rx_status; 713 __u8 rx_status;
714 __u8 channel; 714 __u8 channel;
715 __u8 rx_ctrl; 715 __u8 rx_ctrl;
716} __attribute__((packed)); 716} __packed;
717 717
718#define MWL8K_8366_AP_RATE_INFO_MCS_FORMAT 0x80 718#define MWL8K_8366_AP_RATE_INFO_MCS_FORMAT 0x80
719#define MWL8K_8366_AP_RATE_INFO_40MHZ 0x40 719#define MWL8K_8366_AP_RATE_INFO_40MHZ 0x40
@@ -808,7 +808,7 @@ struct mwl8k_rxd_sta {
808 __u8 rx_ctrl; 808 __u8 rx_ctrl;
809 __u8 rx_status; 809 __u8 rx_status;
810 __u8 pad2[2]; 810 __u8 pad2[2];
811} __attribute__((packed)); 811} __packed;
812 812
813#define MWL8K_STA_RATE_INFO_SHORTPRE 0x8000 813#define MWL8K_STA_RATE_INFO_SHORTPRE 0x8000
814#define MWL8K_STA_RATE_INFO_ANTSELECT(x) (((x) >> 11) & 0x3) 814#define MWL8K_STA_RATE_INFO_ANTSELECT(x) (((x) >> 11) & 0x3)
@@ -1122,7 +1122,7 @@ struct mwl8k_tx_desc {
1122 __le16 rate_info; 1122 __le16 rate_info;
1123 __u8 peer_id; 1123 __u8 peer_id;
1124 __u8 tx_frag_cnt; 1124 __u8 tx_frag_cnt;
1125} __attribute__((packed)); 1125} __packed;
1126 1126
1127#define MWL8K_TX_DESCS 128 1127#define MWL8K_TX_DESCS 128
1128 1128
@@ -1668,7 +1668,7 @@ struct mwl8k_cmd_get_hw_spec_sta {
1668 __le32 caps2; 1668 __le32 caps2;
1669 __le32 num_tx_desc_per_queue; 1669 __le32 num_tx_desc_per_queue;
1670 __le32 total_rxd; 1670 __le32 total_rxd;
1671} __attribute__((packed)); 1671} __packed;
1672 1672
1673#define MWL8K_CAP_MAX_AMSDU 0x20000000 1673#define MWL8K_CAP_MAX_AMSDU 0x20000000
1674#define MWL8K_CAP_GREENFIELD 0x08000000 1674#define MWL8K_CAP_GREENFIELD 0x08000000
@@ -1812,7 +1812,7 @@ struct mwl8k_cmd_get_hw_spec_ap {
1812 __le32 wcbbase1; 1812 __le32 wcbbase1;
1813 __le32 wcbbase2; 1813 __le32 wcbbase2;
1814 __le32 wcbbase3; 1814 __le32 wcbbase3;
1815} __attribute__((packed)); 1815} __packed;
1816 1816
1817static int mwl8k_cmd_get_hw_spec_ap(struct ieee80211_hw *hw) 1817static int mwl8k_cmd_get_hw_spec_ap(struct ieee80211_hw *hw)
1818{ 1818{
@@ -1885,7 +1885,7 @@ struct mwl8k_cmd_set_hw_spec {
1885 __le32 flags; 1885 __le32 flags;
1886 __le32 num_tx_desc_per_queue; 1886 __le32 num_tx_desc_per_queue;
1887 __le32 total_rxd; 1887 __le32 total_rxd;
1888} __attribute__((packed)); 1888} __packed;
1889 1889
1890#define MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT 0x00000080 1890#define MWL8K_SET_HW_SPEC_FLAG_HOST_DECR_MGMT 0x00000080
1891#define MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP 0x00000020 1891#define MWL8K_SET_HW_SPEC_FLAG_HOSTFORM_PROBERESP 0x00000020
@@ -1987,7 +1987,7 @@ __mwl8k_cmd_mac_multicast_adr(struct ieee80211_hw *hw, int allmulti,
1987struct mwl8k_cmd_get_stat { 1987struct mwl8k_cmd_get_stat {
1988 struct mwl8k_cmd_pkt header; 1988 struct mwl8k_cmd_pkt header;
1989 __le32 stats[64]; 1989 __le32 stats[64];
1990} __attribute__((packed)); 1990} __packed;
1991 1991
1992#define MWL8K_STAT_ACK_FAILURE 9 1992#define MWL8K_STAT_ACK_FAILURE 9
1993#define MWL8K_STAT_RTS_FAILURE 12 1993#define MWL8K_STAT_RTS_FAILURE 12
@@ -2031,7 +2031,7 @@ struct mwl8k_cmd_radio_control {
2031 __le16 action; 2031 __le16 action;
2032 __le16 control; 2032 __le16 control;
2033 __le16 radio_on; 2033 __le16 radio_on;
2034} __attribute__((packed)); 2034} __packed;
2035 2035
2036static int 2036static int
2037mwl8k_cmd_radio_control(struct ieee80211_hw *hw, bool enable, bool force) 2037mwl8k_cmd_radio_control(struct ieee80211_hw *hw, bool enable, bool force)
@@ -2094,7 +2094,7 @@ struct mwl8k_cmd_rf_tx_power {
2094 __le16 current_level; 2094 __le16 current_level;
2095 __le16 reserved; 2095 __le16 reserved;
2096 __le16 power_level_list[MWL8K_TX_POWER_LEVEL_TOTAL]; 2096 __le16 power_level_list[MWL8K_TX_POWER_LEVEL_TOTAL];
2097} __attribute__((packed)); 2097} __packed;
2098 2098
2099static int mwl8k_cmd_rf_tx_power(struct ieee80211_hw *hw, int dBm) 2099static int mwl8k_cmd_rf_tx_power(struct ieee80211_hw *hw, int dBm)
2100{ 2100{
@@ -2123,7 +2123,7 @@ struct mwl8k_cmd_rf_antenna {
2123 struct mwl8k_cmd_pkt header; 2123 struct mwl8k_cmd_pkt header;
2124 __le16 antenna; 2124 __le16 antenna;
2125 __le16 mode; 2125 __le16 mode;
2126} __attribute__((packed)); 2126} __packed;
2127 2127
2128#define MWL8K_RF_ANTENNA_RX 1 2128#define MWL8K_RF_ANTENNA_RX 1
2129#define MWL8K_RF_ANTENNA_TX 2 2129#define MWL8K_RF_ANTENNA_TX 2
@@ -2184,7 +2184,7 @@ static int mwl8k_cmd_set_beacon(struct ieee80211_hw *hw,
2184 */ 2184 */
2185struct mwl8k_cmd_set_pre_scan { 2185struct mwl8k_cmd_set_pre_scan {
2186 struct mwl8k_cmd_pkt header; 2186 struct mwl8k_cmd_pkt header;
2187} __attribute__((packed)); 2187} __packed;
2188 2188
2189static int mwl8k_cmd_set_pre_scan(struct ieee80211_hw *hw) 2189static int mwl8k_cmd_set_pre_scan(struct ieee80211_hw *hw)
2190{ 2190{
@@ -2211,7 +2211,7 @@ struct mwl8k_cmd_set_post_scan {
2211 struct mwl8k_cmd_pkt header; 2211 struct mwl8k_cmd_pkt header;
2212 __le32 isibss; 2212 __le32 isibss;
2213 __u8 bssid[ETH_ALEN]; 2213 __u8 bssid[ETH_ALEN];
2214} __attribute__((packed)); 2214} __packed;
2215 2215
2216static int 2216static int
2217mwl8k_cmd_set_post_scan(struct ieee80211_hw *hw, const __u8 *mac) 2217mwl8k_cmd_set_post_scan(struct ieee80211_hw *hw, const __u8 *mac)
@@ -2242,7 +2242,7 @@ struct mwl8k_cmd_set_rf_channel {
2242 __le16 action; 2242 __le16 action;
2243 __u8 current_channel; 2243 __u8 current_channel;
2244 __le32 channel_flags; 2244 __le32 channel_flags;
2245} __attribute__((packed)); 2245} __packed;
2246 2246
2247static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw, 2247static int mwl8k_cmd_set_rf_channel(struct ieee80211_hw *hw,
2248 struct ieee80211_conf *conf) 2248 struct ieee80211_conf *conf)
@@ -2295,7 +2295,7 @@ struct mwl8k_cmd_update_set_aid {
2295 __u8 bssid[ETH_ALEN]; 2295 __u8 bssid[ETH_ALEN];
2296 __le16 protection_mode; 2296 __le16 protection_mode;
2297 __u8 supp_rates[14]; 2297 __u8 supp_rates[14];
2298} __attribute__((packed)); 2298} __packed;
2299 2299
2300static void legacy_rate_mask_to_array(u8 *rates, u32 mask) 2300static void legacy_rate_mask_to_array(u8 *rates, u32 mask)
2301{ 2301{
@@ -2366,7 +2366,7 @@ struct mwl8k_cmd_set_rate {
2366 /* Bitmap for supported MCS codes. */ 2366 /* Bitmap for supported MCS codes. */
2367 __u8 mcs_set[16]; 2367 __u8 mcs_set[16];
2368 __u8 reserved[16]; 2368 __u8 reserved[16];
2369} __attribute__((packed)); 2369} __packed;
2370 2370
2371static int 2371static int
2372mwl8k_cmd_set_rate(struct ieee80211_hw *hw, struct ieee80211_vif *vif, 2372mwl8k_cmd_set_rate(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
@@ -2399,7 +2399,7 @@ struct mwl8k_cmd_finalize_join {
2399 struct mwl8k_cmd_pkt header; 2399 struct mwl8k_cmd_pkt header;
2400 __le32 sleep_interval; /* Number of beacon periods to sleep */ 2400 __le32 sleep_interval; /* Number of beacon periods to sleep */
2401 __u8 beacon_data[MWL8K_FJ_BEACON_MAXLEN]; 2401 __u8 beacon_data[MWL8K_FJ_BEACON_MAXLEN];
2402} __attribute__((packed)); 2402} __packed;
2403 2403
2404static int mwl8k_cmd_finalize_join(struct ieee80211_hw *hw, void *frame, 2404static int mwl8k_cmd_finalize_join(struct ieee80211_hw *hw, void *frame,
2405 int framelen, int dtim) 2405 int framelen, int dtim)
@@ -2438,7 +2438,7 @@ struct mwl8k_cmd_set_rts_threshold {
2438 struct mwl8k_cmd_pkt header; 2438 struct mwl8k_cmd_pkt header;
2439 __le16 action; 2439 __le16 action;
2440 __le16 threshold; 2440 __le16 threshold;
2441} __attribute__((packed)); 2441} __packed;
2442 2442
2443static int 2443static int
2444mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int rts_thresh) 2444mwl8k_cmd_set_rts_threshold(struct ieee80211_hw *hw, int rts_thresh)
@@ -2468,7 +2468,7 @@ struct mwl8k_cmd_set_slot {
2468 struct mwl8k_cmd_pkt header; 2468 struct mwl8k_cmd_pkt header;
2469 __le16 action; 2469 __le16 action;
2470 __u8 short_slot; 2470 __u8 short_slot;
2471} __attribute__((packed)); 2471} __packed;
2472 2472
2473static int mwl8k_cmd_set_slot(struct ieee80211_hw *hw, bool short_slot_time) 2473static int mwl8k_cmd_set_slot(struct ieee80211_hw *hw, bool short_slot_time)
2474{ 2474{
@@ -2530,7 +2530,7 @@ struct mwl8k_cmd_set_edca_params {
2530 __u8 txq; 2530 __u8 txq;
2531 } sta; 2531 } sta;
2532 }; 2532 };
2533} __attribute__((packed)); 2533} __packed;
2534 2534
2535#define MWL8K_SET_EDCA_CW 0x01 2535#define MWL8K_SET_EDCA_CW 0x01
2536#define MWL8K_SET_EDCA_TXOP 0x02 2536#define MWL8K_SET_EDCA_TXOP 0x02
@@ -2581,7 +2581,7 @@ mwl8k_cmd_set_edca_params(struct ieee80211_hw *hw, __u8 qnum,
2581struct mwl8k_cmd_set_wmm_mode { 2581struct mwl8k_cmd_set_wmm_mode {
2582 struct mwl8k_cmd_pkt header; 2582 struct mwl8k_cmd_pkt header;
2583 __le16 action; 2583 __le16 action;
2584} __attribute__((packed)); 2584} __packed;
2585 2585
2586static int mwl8k_cmd_set_wmm_mode(struct ieee80211_hw *hw, bool enable) 2586static int mwl8k_cmd_set_wmm_mode(struct ieee80211_hw *hw, bool enable)
2587{ 2587{
@@ -2614,7 +2614,7 @@ struct mwl8k_cmd_mimo_config {
2614 __le32 action; 2614 __le32 action;
2615 __u8 rx_antenna_map; 2615 __u8 rx_antenna_map;
2616 __u8 tx_antenna_map; 2616 __u8 tx_antenna_map;
2617} __attribute__((packed)); 2617} __packed;
2618 2618
2619static int mwl8k_cmd_mimo_config(struct ieee80211_hw *hw, __u8 rx, __u8 tx) 2619static int mwl8k_cmd_mimo_config(struct ieee80211_hw *hw, __u8 rx, __u8 tx)
2620{ 2620{
@@ -2654,7 +2654,7 @@ struct mwl8k_cmd_use_fixed_rate_sta {
2654 __le32 rate_type; 2654 __le32 rate_type;
2655 __le32 reserved1; 2655 __le32 reserved1;
2656 __le32 reserved2; 2656 __le32 reserved2;
2657} __attribute__((packed)); 2657} __packed;
2658 2658
2659#define MWL8K_USE_AUTO_RATE 0x0002 2659#define MWL8K_USE_AUTO_RATE 0x0002
2660#define MWL8K_UCAST_RATE 0 2660#define MWL8K_UCAST_RATE 0
@@ -2696,7 +2696,7 @@ struct mwl8k_cmd_use_fixed_rate_ap {
2696 u8 multicast_rate; 2696 u8 multicast_rate;
2697 u8 multicast_rate_type; 2697 u8 multicast_rate_type;
2698 u8 management_rate; 2698 u8 management_rate;
2699} __attribute__((packed)); 2699} __packed;
2700 2700
2701static int 2701static int
2702mwl8k_cmd_use_fixed_rate_ap(struct ieee80211_hw *hw, int mcast, int mgmt) 2702mwl8k_cmd_use_fixed_rate_ap(struct ieee80211_hw *hw, int mcast, int mgmt)
@@ -2726,7 +2726,7 @@ mwl8k_cmd_use_fixed_rate_ap(struct ieee80211_hw *hw, int mcast, int mgmt)
2726struct mwl8k_cmd_enable_sniffer { 2726struct mwl8k_cmd_enable_sniffer {
2727 struct mwl8k_cmd_pkt header; 2727 struct mwl8k_cmd_pkt header;
2728 __le32 action; 2728 __le32 action;
2729} __attribute__((packed)); 2729} __packed;
2730 2730
2731static int mwl8k_cmd_enable_sniffer(struct ieee80211_hw *hw, bool enable) 2731static int mwl8k_cmd_enable_sniffer(struct ieee80211_hw *hw, bool enable)
2732{ 2732{
@@ -2759,7 +2759,7 @@ struct mwl8k_cmd_set_mac_addr {
2759 } mbss; 2759 } mbss;
2760 __u8 mac_addr[ETH_ALEN]; 2760 __u8 mac_addr[ETH_ALEN];
2761 }; 2761 };
2762} __attribute__((packed)); 2762} __packed;
2763 2763
2764#define MWL8K_MAC_TYPE_PRIMARY_CLIENT 0 2764#define MWL8K_MAC_TYPE_PRIMARY_CLIENT 0
2765#define MWL8K_MAC_TYPE_SECONDARY_CLIENT 1 2765#define MWL8K_MAC_TYPE_SECONDARY_CLIENT 1
@@ -2814,7 +2814,7 @@ struct mwl8k_cmd_set_rate_adapt_mode {
2814 struct mwl8k_cmd_pkt header; 2814 struct mwl8k_cmd_pkt header;
2815 __le16 action; 2815 __le16 action;
2816 __le16 mode; 2816 __le16 mode;
2817} __attribute__((packed)); 2817} __packed;
2818 2818
2819static int mwl8k_cmd_set_rateadapt_mode(struct ieee80211_hw *hw, __u16 mode) 2819static int mwl8k_cmd_set_rateadapt_mode(struct ieee80211_hw *hw, __u16 mode)
2820{ 2820{
@@ -2842,7 +2842,7 @@ static int mwl8k_cmd_set_rateadapt_mode(struct ieee80211_hw *hw, __u16 mode)
2842struct mwl8k_cmd_bss_start { 2842struct mwl8k_cmd_bss_start {
2843 struct mwl8k_cmd_pkt header; 2843 struct mwl8k_cmd_pkt header;
2844 __le32 enable; 2844 __le32 enable;
2845} __attribute__((packed)); 2845} __packed;
2846 2846
2847static int mwl8k_cmd_bss_start(struct ieee80211_hw *hw, 2847static int mwl8k_cmd_bss_start(struct ieee80211_hw *hw,
2848 struct ieee80211_vif *vif, int enable) 2848 struct ieee80211_vif *vif, int enable)
@@ -2887,7 +2887,7 @@ struct mwl8k_cmd_set_new_stn {
2887 __u8 add_qos_info; 2887 __u8 add_qos_info;
2888 __u8 is_qos_sta; 2888 __u8 is_qos_sta;
2889 __le32 fw_sta_ptr; 2889 __le32 fw_sta_ptr;
2890} __attribute__((packed)); 2890} __packed;
2891 2891
2892#define MWL8K_STA_ACTION_ADD 0 2892#define MWL8K_STA_ACTION_ADD 0
2893#define MWL8K_STA_ACTION_REMOVE 2 2893#define MWL8K_STA_ACTION_REMOVE 2
@@ -2980,7 +2980,7 @@ struct ewc_ht_info {
2980 __le16 control1; 2980 __le16 control1;
2981 __le16 control2; 2981 __le16 control2;
2982 __le16 control3; 2982 __le16 control3;
2983} __attribute__((packed)); 2983} __packed;
2984 2984
2985struct peer_capability_info { 2985struct peer_capability_info {
2986 /* Peer type - AP vs. STA. */ 2986 /* Peer type - AP vs. STA. */
@@ -3009,7 +3009,7 @@ struct peer_capability_info {
3009 __u8 pad2; 3009 __u8 pad2;
3010 __u8 station_id; 3010 __u8 station_id;
3011 __le16 amsdu_enabled; 3011 __le16 amsdu_enabled;
3012} __attribute__((packed)); 3012} __packed;
3013 3013
3014struct mwl8k_cmd_update_stadb { 3014struct mwl8k_cmd_update_stadb {
3015 struct mwl8k_cmd_pkt header; 3015 struct mwl8k_cmd_pkt header;
@@ -3024,7 +3024,7 @@ struct mwl8k_cmd_update_stadb {
3024 3024
3025 /* Peer info - valid during add/update. */ 3025 /* Peer info - valid during add/update. */
3026 struct peer_capability_info peer_info; 3026 struct peer_capability_info peer_info;
3027} __attribute__((packed)); 3027} __packed;
3028 3028
3029#define MWL8K_STA_DB_MODIFY_ENTRY 1 3029#define MWL8K_STA_DB_MODIFY_ENTRY 1
3030#define MWL8K_STA_DB_DEL_ENTRY 2 3030#define MWL8K_STA_DB_DEL_ENTRY 2