aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/orinoco.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/orinoco/orinoco.h')
-rw-r--r--drivers/net/wireless/orinoco/orinoco.h38
1 files changed, 34 insertions, 4 deletions
diff --git a/drivers/net/wireless/orinoco/orinoco.h b/drivers/net/wireless/orinoco/orinoco.h
index 665ef56f8382..a6da86e0a70f 100644
--- a/drivers/net/wireless/orinoco/orinoco.h
+++ b/drivers/net/wireless/orinoco/orinoco.h
@@ -131,6 +131,8 @@ struct orinoco_private {
131 u16 ap_density, rts_thresh; 131 u16 ap_density, rts_thresh;
132 u16 pm_on, pm_mcast, pm_period, pm_timeout; 132 u16 pm_on, pm_mcast, pm_period, pm_timeout;
133 u16 preamble; 133 u16 preamble;
134 u16 short_retry_limit, long_retry_limit;
135 u16 retry_lifetime;
134#ifdef WIRELESS_SPY 136#ifdef WIRELESS_SPY
135 struct iw_spy_data spy_data; /* iwspy support */ 137 struct iw_spy_data spy_data; /* iwspy support */
136 struct iw_public_data wireless_data; 138 struct iw_public_data wireless_data;
@@ -188,12 +190,30 @@ extern void free_orinocodev(struct orinoco_private *priv);
188extern int orinoco_init(struct orinoco_private *priv); 190extern int orinoco_init(struct orinoco_private *priv);
189extern int orinoco_if_add(struct orinoco_private *priv, 191extern int orinoco_if_add(struct orinoco_private *priv,
190 unsigned long base_addr, 192 unsigned long base_addr,
191 unsigned int irq); 193 unsigned int irq,
194 const struct net_device_ops *ops);
192extern void orinoco_if_del(struct orinoco_private *priv); 195extern void orinoco_if_del(struct orinoco_private *priv);
193extern int orinoco_up(struct orinoco_private *priv); 196extern int orinoco_up(struct orinoco_private *priv);
194extern void orinoco_down(struct orinoco_private *priv); 197extern void orinoco_down(struct orinoco_private *priv);
195extern irqreturn_t orinoco_interrupt(int irq, void *dev_id); 198extern irqreturn_t orinoco_interrupt(int irq, void *dev_id);
196 199
200extern void __orinoco_ev_info(struct net_device *dev, hermes_t *hw);
201extern void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw);
202
203int orinoco_process_xmit_skb(struct sk_buff *skb,
204 struct net_device *dev,
205 struct orinoco_private *priv,
206 int *tx_control,
207 u8 *mic);
208
209/* Common ndo functions exported for reuse by orinoco_usb */
210int orinoco_open(struct net_device *dev);
211int orinoco_stop(struct net_device *dev);
212struct net_device_stats *orinoco_get_stats(struct net_device *dev);
213void orinoco_set_multicast_list(struct net_device *dev);
214int orinoco_change_mtu(struct net_device *dev, int new_mtu);
215void orinoco_tx_timeout(struct net_device *dev);
216
197/********************************************************************/ 217/********************************************************************/
198/* Locking and synchronization functions */ 218/* Locking and synchronization functions */
199/********************************************************************/ 219/********************************************************************/
@@ -201,11 +221,11 @@ extern irqreturn_t orinoco_interrupt(int irq, void *dev_id);
201static inline int orinoco_lock(struct orinoco_private *priv, 221static inline int orinoco_lock(struct orinoco_private *priv,
202 unsigned long *flags) 222 unsigned long *flags)
203{ 223{
204 spin_lock_irqsave(&priv->lock, *flags); 224 priv->hw.ops->lock_irqsave(&priv->lock, flags);
205 if (priv->hw_unavailable) { 225 if (priv->hw_unavailable) {
206 DEBUG(1, "orinoco_lock() called with hw_unavailable (dev=%p)\n", 226 DEBUG(1, "orinoco_lock() called with hw_unavailable (dev=%p)\n",
207 priv->ndev); 227 priv->ndev);
208 spin_unlock_irqrestore(&priv->lock, *flags); 228 priv->hw.ops->unlock_irqrestore(&priv->lock, flags);
209 return -EBUSY; 229 return -EBUSY;
210 } 230 }
211 return 0; 231 return 0;
@@ -214,7 +234,17 @@ static inline int orinoco_lock(struct orinoco_private *priv,
214static inline void orinoco_unlock(struct orinoco_private *priv, 234static inline void orinoco_unlock(struct orinoco_private *priv,
215 unsigned long *flags) 235 unsigned long *flags)
216{ 236{
217 spin_unlock_irqrestore(&priv->lock, *flags); 237 priv->hw.ops->unlock_irqrestore(&priv->lock, flags);
238}
239
240static inline void orinoco_lock_irq(struct orinoco_private *priv)
241{
242 priv->hw.ops->lock_irq(&priv->lock);
243}
244
245static inline void orinoco_unlock_irq(struct orinoco_private *priv)
246{
247 priv->hw.ops->unlock_irq(&priv->lock);
218} 248}
219 249
220/*** Navigate from net_device to orinoco_private ***/ 250/*** Navigate from net_device to orinoco_private ***/