aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/orinoco/main.c
diff options
context:
space:
mode:
authorPavel Roskin <proski@gnu.org>2011-07-13 11:19:57 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-15 13:38:31 -0400
commit933d594313a5928ffc5325d7bbb6e2383d79622e (patch)
tree08467734948e6969a7839fa066cb5b5fa27262bb /drivers/net/wireless/orinoco/main.c
parent16c929df0895e6f52f4a0f17683d709f5fef95d8 (diff)
orinoco: minor fixes for problems found by checkpatch.pl
Eliminate spaces before tabs. Eliminate typedefs. Add spaces around operators. Signed-off-by: Pavel Roskin <proski@gnu.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/orinoco/main.c')
-rw-r--r--drivers/net/wireless/orinoco/main.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/drivers/net/wireless/orinoco/main.c b/drivers/net/wireless/orinoco/main.c
index 62c6b2b37dbe..a822422aba74 100644
--- a/drivers/net/wireless/orinoco/main.c
+++ b/drivers/net/wireless/orinoco/main.c
@@ -4,7 +4,7 @@
4 * adaptors, with Lucent/Agere, Intersil or Symbol firmware. 4 * adaptors, with Lucent/Agere, Intersil or Symbol firmware.
5 * 5 *
6 * Current maintainers (as of 29 September 2003) are: 6 * Current maintainers (as of 29 September 2003) are:
7 * Pavel Roskin <proski AT gnu.org> 7 * Pavel Roskin <proski AT gnu.org>
8 * and David Gibson <hermes AT gibson.dropbear.id.au> 8 * and David Gibson <hermes AT gibson.dropbear.id.au>
9 * 9 *
10 * (C) Copyright David Gibson, IBM Corporation 2001-2003. 10 * (C) Copyright David Gibson, IBM Corporation 2001-2003.
@@ -146,10 +146,10 @@ static const u8 encaps_hdr[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
146#define ORINOCO_MAX_MTU (IEEE80211_MAX_DATA_LEN - ENCAPS_OVERHEAD) 146#define ORINOCO_MAX_MTU (IEEE80211_MAX_DATA_LEN - ENCAPS_OVERHEAD)
147 147
148#define MAX_IRQLOOPS_PER_IRQ 10 148#define MAX_IRQLOOPS_PER_IRQ 10
149#define MAX_IRQLOOPS_PER_JIFFY (20000/HZ) /* Based on a guestimate of 149#define MAX_IRQLOOPS_PER_JIFFY (20000 / HZ) /* Based on a guestimate of
150 * how many events the 150 * how many events the
151 * device could 151 * device could
152 * legitimately generate */ 152 * legitimately generate */
153 153
154#define DUMMY_FID 0xFFFF 154#define DUMMY_FID 0xFFFF
155 155
@@ -157,7 +157,7 @@ static const u8 encaps_hdr[] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
157 HERMES_MAX_MULTICAST : 0)*/ 157 HERMES_MAX_MULTICAST : 0)*/
158#define MAX_MULTICAST(priv) (HERMES_MAX_MULTICAST) 158#define MAX_MULTICAST(priv) (HERMES_MAX_MULTICAST)
159 159
160#define ORINOCO_INTEN (HERMES_EV_RX | HERMES_EV_ALLOC \ 160#define ORINOCO_INTEN (HERMES_EV_RX | HERMES_EV_ALLOC \
161 | HERMES_EV_TX | HERMES_EV_TXEXC \ 161 | HERMES_EV_TX | HERMES_EV_TXEXC \
162 | HERMES_EV_WTERR | HERMES_EV_INFO \ 162 | HERMES_EV_WTERR | HERMES_EV_INFO \
163 | HERMES_EV_INFDROP) 163 | HERMES_EV_INFDROP)
@@ -437,12 +437,12 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
437{ 437{
438 struct orinoco_private *priv = ndev_priv(dev); 438 struct orinoco_private *priv = ndev_priv(dev);
439 struct net_device_stats *stats = &priv->stats; 439 struct net_device_stats *stats = &priv->stats;
440 hermes_t *hw = &priv->hw; 440 struct hermes *hw = &priv->hw;
441 int err = 0; 441 int err = 0;
442 u16 txfid = priv->txfid; 442 u16 txfid = priv->txfid;
443 int tx_control; 443 int tx_control;
444 unsigned long flags; 444 unsigned long flags;
445 u8 mic_buf[MICHAEL_MIC_LEN+1]; 445 u8 mic_buf[MICHAEL_MIC_LEN + 1];
446 446
447 if (!netif_running(dev)) { 447 if (!netif_running(dev)) {
448 printk(KERN_ERR "%s: Tx on stopped device!\n", 448 printk(KERN_ERR "%s: Tx on stopped device!\n",
@@ -579,7 +579,7 @@ static netdev_tx_t orinoco_xmit(struct sk_buff *skb, struct net_device *dev)
579 return NETDEV_TX_BUSY; 579 return NETDEV_TX_BUSY;
580} 580}
581 581
582static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw) 582static void __orinoco_ev_alloc(struct net_device *dev, struct hermes *hw)
583{ 583{
584 struct orinoco_private *priv = ndev_priv(dev); 584 struct orinoco_private *priv = ndev_priv(dev);
585 u16 fid = hermes_read_regn(hw, ALLOCFID); 585 u16 fid = hermes_read_regn(hw, ALLOCFID);
@@ -594,7 +594,7 @@ static void __orinoco_ev_alloc(struct net_device *dev, hermes_t *hw)
594 hermes_write_regn(hw, ALLOCFID, DUMMY_FID); 594 hermes_write_regn(hw, ALLOCFID, DUMMY_FID);
595} 595}
596 596
597static void __orinoco_ev_tx(struct net_device *dev, hermes_t *hw) 597static void __orinoco_ev_tx(struct net_device *dev, struct hermes *hw)
598{ 598{
599 struct orinoco_private *priv = ndev_priv(dev); 599 struct orinoco_private *priv = ndev_priv(dev);
600 struct net_device_stats *stats = &priv->stats; 600 struct net_device_stats *stats = &priv->stats;
@@ -606,7 +606,7 @@ static void __orinoco_ev_tx(struct net_device *dev, hermes_t *hw)
606 hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID); 606 hermes_write_regn(hw, TXCOMPLFID, DUMMY_FID);
607} 607}
608 608
609static void __orinoco_ev_txexc(struct net_device *dev, hermes_t *hw) 609static void __orinoco_ev_txexc(struct net_device *dev, struct hermes *hw)
610{ 610{
611 struct orinoco_private *priv = ndev_priv(dev); 611 struct orinoco_private *priv = ndev_priv(dev);
612 struct net_device_stats *stats = &priv->stats; 612 struct net_device_stats *stats = &priv->stats;
@@ -753,7 +753,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid,
753 struct sk_buff *skb; 753 struct sk_buff *skb;
754 struct orinoco_private *priv = ndev_priv(dev); 754 struct orinoco_private *priv = ndev_priv(dev);
755 struct net_device_stats *stats = &priv->stats; 755 struct net_device_stats *stats = &priv->stats;
756 hermes_t *hw = &priv->hw; 756 struct hermes *hw = &priv->hw;
757 757
758 len = le16_to_cpu(desc->data_len); 758 len = le16_to_cpu(desc->data_len);
759 759
@@ -840,7 +840,7 @@ static void orinoco_rx_monitor(struct net_device *dev, u16 rxfid,
840 stats->rx_dropped++; 840 stats->rx_dropped++;
841} 841}
842 842
843void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw) 843void __orinoco_ev_rx(struct net_device *dev, struct hermes *hw)
844{ 844{
845 struct orinoco_private *priv = ndev_priv(dev); 845 struct orinoco_private *priv = ndev_priv(dev);
846 struct net_device_stats *stats = &priv->stats; 846 struct net_device_stats *stats = &priv->stats;
@@ -918,7 +918,7 @@ void __orinoco_ev_rx(struct net_device *dev, hermes_t *hw)
918 32bit boundary, plus 1 byte so we can read in odd length 918 32bit boundary, plus 1 byte so we can read in odd length
919 packets from the card, which has an IO granularity of 16 919 packets from the card, which has an IO granularity of 16
920 bits */ 920 bits */
921 skb = dev_alloc_skb(length+ETH_HLEN+2+1); 921 skb = dev_alloc_skb(length + ETH_HLEN + 2 + 1);
922 if (!skb) { 922 if (!skb) {
923 printk(KERN_WARNING "%s: Can't allocate skb for Rx\n", 923 printk(KERN_WARNING "%s: Can't allocate skb for Rx\n",
924 dev->name); 924 dev->name);
@@ -1402,7 +1402,7 @@ static void orinoco_process_scan_results(struct work_struct *work)
1402 spin_unlock_irqrestore(&priv->scan_lock, flags); 1402 spin_unlock_irqrestore(&priv->scan_lock, flags);
1403} 1403}
1404 1404
1405void __orinoco_ev_info(struct net_device *dev, hermes_t *hw) 1405void __orinoco_ev_info(struct net_device *dev, struct hermes *hw)
1406{ 1406{
1407 struct orinoco_private *priv = ndev_priv(dev); 1407 struct orinoco_private *priv = ndev_priv(dev);
1408 u16 infofid; 1408 u16 infofid;
@@ -1620,7 +1620,7 @@ void __orinoco_ev_info(struct net_device *dev, hermes_t *hw)
1620} 1620}
1621EXPORT_SYMBOL(__orinoco_ev_info); 1621EXPORT_SYMBOL(__orinoco_ev_info);
1622 1622
1623static void __orinoco_ev_infdrop(struct net_device *dev, hermes_t *hw) 1623static void __orinoco_ev_infdrop(struct net_device *dev, struct hermes *hw)
1624{ 1624{
1625 if (net_ratelimit()) 1625 if (net_ratelimit())
1626 printk(KERN_DEBUG "%s: Information frame lost.\n", dev->name); 1626 printk(KERN_DEBUG "%s: Information frame lost.\n", dev->name);
@@ -1831,7 +1831,7 @@ static int __orinoco_commit(struct orinoco_private *priv)
1831int orinoco_commit(struct orinoco_private *priv) 1831int orinoco_commit(struct orinoco_private *priv)
1832{ 1832{
1833 struct net_device *dev = priv->ndev; 1833 struct net_device *dev = priv->ndev;
1834 hermes_t *hw = &priv->hw; 1834 struct hermes *hw = &priv->hw;
1835 int err; 1835 int err;
1836 1836
1837 if (priv->broken_disableport) { 1837 if (priv->broken_disableport) {
@@ -1874,12 +1874,12 @@ int orinoco_commit(struct orinoco_private *priv)
1874/* Interrupt handler */ 1874/* Interrupt handler */
1875/********************************************************************/ 1875/********************************************************************/
1876 1876
1877static void __orinoco_ev_tick(struct net_device *dev, hermes_t *hw) 1877static void __orinoco_ev_tick(struct net_device *dev, struct hermes *hw)
1878{ 1878{
1879 printk(KERN_DEBUG "%s: TICK\n", dev->name); 1879 printk(KERN_DEBUG "%s: TICK\n", dev->name);
1880} 1880}
1881 1881
1882static void __orinoco_ev_wterr(struct net_device *dev, hermes_t *hw) 1882static void __orinoco_ev_wterr(struct net_device *dev, struct hermes *hw)
1883{ 1883{
1884 /* This seems to happen a fair bit under load, but ignoring it 1884 /* This seems to happen a fair bit under load, but ignoring it
1885 seems to work fine...*/ 1885 seems to work fine...*/
@@ -1891,7 +1891,7 @@ irqreturn_t orinoco_interrupt(int irq, void *dev_id)
1891{ 1891{
1892 struct orinoco_private *priv = dev_id; 1892 struct orinoco_private *priv = dev_id;
1893 struct net_device *dev = priv->ndev; 1893 struct net_device *dev = priv->ndev;
1894 hermes_t *hw = &priv->hw; 1894 struct hermes *hw = &priv->hw;
1895 int count = MAX_IRQLOOPS_PER_IRQ; 1895 int count = MAX_IRQLOOPS_PER_IRQ;
1896 u16 evstat, events; 1896 u16 evstat, events;
1897 /* These are used to detect a runaway interrupt situation. 1897 /* These are used to detect a runaway interrupt situation.
@@ -2017,8 +2017,8 @@ static void orinoco_unregister_pm_notifier(struct orinoco_private *priv)
2017 unregister_pm_notifier(&priv->pm_notifier); 2017 unregister_pm_notifier(&priv->pm_notifier);
2018} 2018}
2019#else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */ 2019#else /* !PM_SLEEP || HERMES_CACHE_FW_ON_INIT */
2020#define orinoco_register_pm_notifier(priv) do { } while(0) 2020#define orinoco_register_pm_notifier(priv) do { } while (0)
2021#define orinoco_unregister_pm_notifier(priv) do { } while(0) 2021#define orinoco_unregister_pm_notifier(priv) do { } while (0)
2022#endif 2022#endif
2023 2023
2024/********************************************************************/ 2024/********************************************************************/
@@ -2029,7 +2029,7 @@ int orinoco_init(struct orinoco_private *priv)
2029{ 2029{
2030 struct device *dev = priv->dev; 2030 struct device *dev = priv->dev;
2031 struct wiphy *wiphy = priv_to_wiphy(priv); 2031 struct wiphy *wiphy = priv_to_wiphy(priv);
2032 hermes_t *hw = &priv->hw; 2032 struct hermes *hw = &priv->hw;
2033 int err = 0; 2033 int err = 0;
2034 2034
2035 /* No need to lock, the hw_unavailable flag is already set in 2035 /* No need to lock, the hw_unavailable flag is already set in