Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 1 | /******************************************************************************* |
| 2 | * Agere Systems Inc. |
| 3 | * Wireless device driver for Linux (wlags49). |
| 4 | * |
| 5 | * Copyright (c) 1998-2003 Agere Systems Inc. |
| 6 | * All rights reserved. |
| 7 | * http://www.agere.com |
| 8 | * |
| 9 | * Initially developed by TriplePoint, Inc. |
| 10 | * http://www.triplepoint.com |
| 11 | * |
| 12 | *------------------------------------------------------------------------------ |
| 13 | * |
| 14 | * Header describing information required by the network layerentry points |
| 15 | * into the driver. |
| 16 | * |
| 17 | *------------------------------------------------------------------------------ |
| 18 | * |
| 19 | * SOFTWARE LICENSE |
| 20 | * |
| 21 | * This software is provided subject to the following terms and conditions, |
| 22 | * which you should read carefully before using the software. Using this |
| 23 | * software indicates your acceptance of these terms and conditions. If you do |
| 24 | * not agree with these terms and conditions, do not use the software. |
| 25 | * |
Al Viro | d36b691 | 2011-12-29 17:09:01 -0500 | [diff] [blame] | 26 | * Copyright © 2003 Agere Systems Inc. |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 27 | * All rights reserved. |
| 28 | * |
| 29 | * Redistribution and use in source or binary forms, with or without |
| 30 | * modifications, are permitted provided that the following conditions are met: |
| 31 | * |
| 32 | * . Redistributions of source code must retain the above copyright notice, this |
| 33 | * list of conditions and the following Disclaimer as comments in the code as |
| 34 | * well as in the documentation and/or other materials provided with the |
| 35 | * distribution. |
| 36 | * |
| 37 | * . Redistributions in binary form must reproduce the above copyright notice, |
| 38 | * this list of conditions and the following Disclaimer in the documentation |
| 39 | * and/or other materials provided with the distribution. |
| 40 | * |
| 41 | * . Neither the name of Agere Systems Inc. nor the names of the contributors |
| 42 | * may be used to endorse or promote products derived from this software |
| 43 | * without specific prior written permission. |
| 44 | * |
| 45 | * Disclaimer |
| 46 | * |
Al Viro | d36b691 | 2011-12-29 17:09:01 -0500 | [diff] [blame] | 47 | * THIS SOFTWARE IS PROVIDED AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 48 | * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF |
| 49 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ANY |
| 50 | * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN |
| 51 | * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY |
| 52 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 53 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 54 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND |
| 55 | * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT |
| 56 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
| 57 | * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
| 58 | * DAMAGE. |
| 59 | * |
| 60 | ******************************************************************************/ |
| 61 | |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 62 | #ifndef __WL_NETDEV_H__ |
| 63 | #define __WL_NETDEV_H__ |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | /******************************************************************************* |
| 69 | * function prototypes |
| 70 | ******************************************************************************/ |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 71 | int wl_init(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 72 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 73 | int wl_config(struct net_device *dev, struct ifmap *map); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 74 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 75 | struct net_device *wl_device_alloc(void); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 76 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 77 | void wl_device_dealloc(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 78 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 79 | int wl_open(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 80 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 81 | int wl_close(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 82 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 83 | int wl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 84 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 85 | int wl_tx(struct sk_buff *skb, struct net_device *dev, int port); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 86 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 87 | int wl_send(struct wl_private *lp); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 88 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 89 | int wl_rx(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 90 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 91 | void wl_tx_timeout(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 92 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 93 | struct net_device_stats *wl_stats(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 94 | |
| 95 | |
| 96 | #ifdef ENABLE_DMA |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 97 | int wl_send_dma(struct wl_private *lp, struct sk_buff *skb, int port); |
| 98 | int wl_rx_dma(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 99 | #endif |
| 100 | |
| 101 | #ifdef NEW_MULTICAST |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 102 | void wl_multicast(struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 103 | #else |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 104 | void wl_multicast(struct net_device *dev, int num_addrs, void *addrs); |
Johan Meiring | 2dddc56 | 2012-11-30 18:58:39 +0200 | [diff] [blame] | 105 | #endif /* NEW_MULTICAST */ |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 106 | |
| 107 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 108 | int wl_tx_port0(struct sk_buff *skb, struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 109 | |
| 110 | |
| 111 | #ifdef USE_WDS |
| 112 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 113 | int wl_tx_port1(struct sk_buff *skb, struct net_device *dev); |
| 114 | int wl_tx_port2(struct sk_buff *skb, struct net_device *dev); |
| 115 | int wl_tx_port3(struct sk_buff *skb, struct net_device *dev); |
| 116 | int wl_tx_port4(struct sk_buff *skb, struct net_device *dev); |
| 117 | int wl_tx_port5(struct sk_buff *skb, struct net_device *dev); |
| 118 | int wl_tx_port6(struct sk_buff *skb, struct net_device *dev); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 119 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 120 | void wl_wds_device_alloc(struct wl_private *lp); |
| 121 | void wl_wds_device_dealloc(struct wl_private *lp); |
| 122 | void wl_wds_netif_start_queue(struct wl_private *lp); |
| 123 | void wl_wds_netif_stop_queue(struct wl_private *lp); |
| 124 | void wl_wds_netif_wake_queue(struct wl_private *lp); |
| 125 | void wl_wds_netif_carrier_on(struct wl_private *lp); |
| 126 | void wl_wds_netif_carrier_off(struct wl_private *lp); |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 127 | |
| 128 | #endif /* USE_WDS */ |
| 129 | |
| 130 | |
| 131 | #ifdef USE_WDS |
| 132 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 133 | #define WL_WDS_DEVICE_ALLOC(ARG) wl_wds_device_alloc(ARG) |
| 134 | #define WL_WDS_DEVICE_DEALLOC(ARG) wl_wds_device_dealloc(ARG) |
| 135 | #define WL_WDS_NETIF_START_QUEUE(ARG) wl_wds_netif_start_queue(ARG) |
| 136 | #define WL_WDS_NETIF_STOP_QUEUE(ARG) wl_wds_netif_stop_queue(ARG) |
| 137 | #define WL_WDS_NETIF_WAKE_QUEUE(ARG) wl_wds_netif_wake_queue(ARG) |
| 138 | #define WL_WDS_NETIF_CARRIER_ON(ARG) wl_wds_netif_carrier_on(ARG) |
| 139 | #define WL_WDS_NETIF_CARRIER_OFF(ARG) wl_wds_netif_carrier_off(ARG) |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 140 | |
| 141 | #else |
| 142 | |
Johan Meiring | 79249c4b | 2012-11-30 18:58:40 +0200 | [diff] [blame] | 143 | #define WL_WDS_DEVICE_ALLOC(ARG) |
| 144 | #define WL_WDS_DEVICE_DEALLOC(ARG) |
| 145 | #define WL_WDS_NETIF_START_QUEUE(ARG) |
| 146 | #define WL_WDS_NETIF_STOP_QUEUE(ARG) |
| 147 | #define WL_WDS_NETIF_WAKE_QUEUE(ARG) |
| 148 | #define WL_WDS_NETIF_CARRIER_ON(ARG) |
| 149 | #define WL_WDS_NETIF_CARRIER_OFF(ARG) |
Henk de Groot | 68c0bdf | 2009-09-27 11:12:52 +0200 | [diff] [blame] | 150 | |
| 151 | #endif /* USE_WDS */ |
| 152 | |
| 153 | |
Johan Meiring | 2dddc56 | 2012-11-30 18:58:39 +0200 | [diff] [blame] | 154 | #endif /* __WL_NETDEV_H__ */ |