174#endif
175
176
177
178
179
180extern struct net_device *alloc_orinocodev(
181 int sizeof_card, struct device *device,
182 int (*hard_reset)(struct orinoco_private *),
183 int (*stop_fw)(struct orinoco_private *, int));
184extern void free_orinocodev(struct net_device *dev);
185extern int __orinoco_up(struct net_device *dev);
186extern int __orinoco_down(struct net_device *dev);
187extern int orinoco_reinit_firmware(struct net_device *dev);
188extern irqreturn_t orinoco_interrupt(int irq, void * dev_id);
189
190
191
192
193
194static inline int orinoco_lock(struct orinoco_private *priv,
195 unsigned long *flags)
196{
197 spin_lock_irqsave(&priv->lock, *flags);
198 if (priv->hw_unavailable) {
199 DEBUG(1, "orinoco_lock() called with hw_unavailable (dev=%p)\n",
200 priv->ndev);
201 spin_unlock_irqrestore(&priv->lock, *flags);
202 return -EBUSY;
203 }
204 return 0;
205}
206
207static inline void orinoco_unlock(struct orinoco_private *priv,
208 unsigned long *flags)
209{
210 spin_unlock_irqrestore(&priv->lock, *flags);
211}
212
213#endif