diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-10-09 16:33:05 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-10-09 16:33:05 -0400 |
commit | c97f68145e8067b3ac4b126a6faebf90f9ffc302 (patch) | |
tree | eb2060681552a00e9efa98224b95f69a3dc84390 /drivers/net | |
parent | b1add0480a95b6ceaece5caf6c50614771eae9b2 (diff) | |
parent | 7bff3c4ce44ea48f50dc47a5994454984bd08c59 (diff) |
Merge branch 'for-rmk' of git://source.mvista.com/git/linux-davinci-2.6.git
Merge branch 'davinci' into devel
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/hp-plus.c | 8 | ||||
-rw-r--r-- | drivers/net/niu.c | 56 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/beacon.c | 13 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/core.h | 1 | ||||
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 14 | ||||
-rw-r--r-- | drivers/net/wireless/b43/rfkill.c | 18 | ||||
-rw-r--r-- | drivers/net/wireless/b43legacy/rfkill.c | 18 |
7 files changed, 88 insertions, 40 deletions
diff --git a/drivers/net/hp-plus.c b/drivers/net/hp-plus.c index 8239939554bc..fbbd3e660c27 100644 --- a/drivers/net/hp-plus.c +++ b/drivers/net/hp-plus.c | |||
@@ -139,7 +139,7 @@ static int __init do_hpp_probe(struct net_device *dev) | |||
139 | #ifndef MODULE | 139 | #ifndef MODULE |
140 | struct net_device * __init hp_plus_probe(int unit) | 140 | struct net_device * __init hp_plus_probe(int unit) |
141 | { | 141 | { |
142 | struct net_device *dev = alloc_ei_netdev(); | 142 | struct net_device *dev = alloc_eip_netdev(); |
143 | int err; | 143 | int err; |
144 | 144 | ||
145 | if (!dev) | 145 | if (!dev) |
@@ -284,7 +284,7 @@ hpp_open(struct net_device *dev) | |||
284 | int option_reg; | 284 | int option_reg; |
285 | int retval; | 285 | int retval; |
286 | 286 | ||
287 | if ((retval = request_irq(dev->irq, ei_interrupt, 0, dev->name, dev))) { | 287 | if ((retval = request_irq(dev->irq, eip_interrupt, 0, dev->name, dev))) { |
288 | return retval; | 288 | return retval; |
289 | } | 289 | } |
290 | 290 | ||
@@ -302,7 +302,7 @@ hpp_open(struct net_device *dev) | |||
302 | /* Select the operational page. */ | 302 | /* Select the operational page. */ |
303 | outw(Perf_Page, ioaddr + HP_PAGING); | 303 | outw(Perf_Page, ioaddr + HP_PAGING); |
304 | 304 | ||
305 | ei_open(dev); | 305 | eip_open(dev); |
306 | return 0; | 306 | return 0; |
307 | } | 307 | } |
308 | 308 | ||
@@ -313,7 +313,7 @@ hpp_close(struct net_device *dev) | |||
313 | int option_reg = inw(ioaddr + HPP_OPTION); | 313 | int option_reg = inw(ioaddr + HPP_OPTION); |
314 | 314 | ||
315 | free_irq(dev->irq, dev); | 315 | free_irq(dev->irq, dev); |
316 | ei_close(dev); | 316 | eip_close(dev); |
317 | outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset, | 317 | outw((option_reg & ~EnableIRQ) | MemDisable | NICReset | ChipReset, |
318 | ioaddr + HPP_OPTION); | 318 | ioaddr + HPP_OPTION); |
319 | 319 | ||
diff --git a/drivers/net/niu.c b/drivers/net/niu.c index e4765b713aba..e3be81eba8a4 100644 --- a/drivers/net/niu.c +++ b/drivers/net/niu.c | |||
@@ -5984,6 +5984,56 @@ static void niu_netif_start(struct niu *np) | |||
5984 | niu_enable_interrupts(np, 1); | 5984 | niu_enable_interrupts(np, 1); |
5985 | } | 5985 | } |
5986 | 5986 | ||
5987 | static void niu_reset_buffers(struct niu *np) | ||
5988 | { | ||
5989 | int i, j, k, err; | ||
5990 | |||
5991 | if (np->rx_rings) { | ||
5992 | for (i = 0; i < np->num_rx_rings; i++) { | ||
5993 | struct rx_ring_info *rp = &np->rx_rings[i]; | ||
5994 | |||
5995 | for (j = 0, k = 0; j < MAX_RBR_RING_SIZE; j++) { | ||
5996 | struct page *page; | ||
5997 | |||
5998 | page = rp->rxhash[j]; | ||
5999 | while (page) { | ||
6000 | struct page *next = | ||
6001 | (struct page *) page->mapping; | ||
6002 | u64 base = page->index; | ||
6003 | base = base >> RBR_DESCR_ADDR_SHIFT; | ||
6004 | rp->rbr[k++] = cpu_to_le32(base); | ||
6005 | page = next; | ||
6006 | } | ||
6007 | } | ||
6008 | for (; k < MAX_RBR_RING_SIZE; k++) { | ||
6009 | err = niu_rbr_add_page(np, rp, GFP_ATOMIC, k); | ||
6010 | if (unlikely(err)) | ||
6011 | break; | ||
6012 | } | ||
6013 | |||
6014 | rp->rbr_index = rp->rbr_table_size - 1; | ||
6015 | rp->rcr_index = 0; | ||
6016 | rp->rbr_pending = 0; | ||
6017 | rp->rbr_refill_pending = 0; | ||
6018 | } | ||
6019 | } | ||
6020 | if (np->tx_rings) { | ||
6021 | for (i = 0; i < np->num_tx_rings; i++) { | ||
6022 | struct tx_ring_info *rp = &np->tx_rings[i]; | ||
6023 | |||
6024 | for (j = 0; j < MAX_TX_RING_SIZE; j++) { | ||
6025 | if (rp->tx_buffs[j].skb) | ||
6026 | (void) release_tx_packet(np, rp, j); | ||
6027 | } | ||
6028 | |||
6029 | rp->pending = MAX_TX_RING_SIZE; | ||
6030 | rp->prod = 0; | ||
6031 | rp->cons = 0; | ||
6032 | rp->wrap_bit = 0; | ||
6033 | } | ||
6034 | } | ||
6035 | } | ||
6036 | |||
5987 | static void niu_reset_task(struct work_struct *work) | 6037 | static void niu_reset_task(struct work_struct *work) |
5988 | { | 6038 | { |
5989 | struct niu *np = container_of(work, struct niu, reset_task); | 6039 | struct niu *np = container_of(work, struct niu, reset_task); |
@@ -6006,6 +6056,12 @@ static void niu_reset_task(struct work_struct *work) | |||
6006 | 6056 | ||
6007 | niu_stop_hw(np); | 6057 | niu_stop_hw(np); |
6008 | 6058 | ||
6059 | spin_unlock_irqrestore(&np->lock, flags); | ||
6060 | |||
6061 | niu_reset_buffers(np); | ||
6062 | |||
6063 | spin_lock_irqsave(&np->lock, flags); | ||
6064 | |||
6009 | err = niu_init_hw(np); | 6065 | err = niu_init_hw(np); |
6010 | if (!err) { | 6066 | if (!err) { |
6011 | np->timer.expires = jiffies + HZ; | 6067 | np->timer.expires = jiffies + HZ; |
diff --git a/drivers/net/wireless/ath9k/beacon.c b/drivers/net/wireless/ath9k/beacon.c index caf569401a34..00a0eaa08866 100644 --- a/drivers/net/wireless/ath9k/beacon.c +++ b/drivers/net/wireless/ath9k/beacon.c | |||
@@ -209,6 +209,7 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) | |||
209 | unsigned int curlen; | 209 | unsigned int curlen; |
210 | struct ath_txq *cabq; | 210 | struct ath_txq *cabq; |
211 | struct ath_txq *mcastq; | 211 | struct ath_txq *mcastq; |
212 | struct ieee80211_tx_info *info; | ||
212 | avp = sc->sc_vaps[if_id]; | 213 | avp = sc->sc_vaps[if_id]; |
213 | 214 | ||
214 | mcastq = &avp->av_mcastq; | 215 | mcastq = &avp->av_mcastq; |
@@ -232,6 +233,18 @@ static struct ath_buf *ath_beacon_generate(struct ath_softc *sc, int if_id) | |||
232 | */ | 233 | */ |
233 | curlen = skb->len; | 234 | curlen = skb->len; |
234 | 235 | ||
236 | info = IEEE80211_SKB_CB(skb); | ||
237 | if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | ||
238 | /* | ||
239 | * TODO: make sure the seq# gets assigned properly (vs. other | ||
240 | * TX frames) | ||
241 | */ | ||
242 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | ||
243 | sc->seq_no += 0x10; | ||
244 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
245 | hdr->seq_ctrl |= cpu_to_le16(sc->seq_no); | ||
246 | } | ||
247 | |||
235 | /* XXX: spin_lock_bh should not be used here, but sparse bitches | 248 | /* XXX: spin_lock_bh should not be used here, but sparse bitches |
236 | * otherwise. We should fix sparse :) */ | 249 | * otherwise. We should fix sparse :) */ |
237 | spin_lock_bh(&mcastq->axq_lock); | 250 | spin_lock_bh(&mcastq->axq_lock); |
diff --git a/drivers/net/wireless/ath9k/core.h b/drivers/net/wireless/ath9k/core.h index 673b3d81133a..4ee695b76b88 100644 --- a/drivers/net/wireless/ath9k/core.h +++ b/drivers/net/wireless/ath9k/core.h | |||
@@ -992,6 +992,7 @@ struct ath_softc { | |||
992 | u32 sc_txintrperiod; /* tx interrupt batching */ | 992 | u32 sc_txintrperiod; /* tx interrupt batching */ |
993 | int sc_haltype2q[ATH9K_WME_AC_VO+1]; /* HAL WME AC -> h/w qnum */ | 993 | int sc_haltype2q[ATH9K_WME_AC_VO+1]; /* HAL WME AC -> h/w qnum */ |
994 | u32 sc_ant_tx[8]; /* recent tx frames/antenna */ | 994 | u32 sc_ant_tx[8]; /* recent tx frames/antenna */ |
995 | u16 seq_no; /* TX sequence number */ | ||
995 | 996 | ||
996 | /* Beacon */ | 997 | /* Beacon */ |
997 | struct ath9k_tx_queue_info sc_beacon_qi; | 998 | struct ath9k_tx_queue_info sc_beacon_qi; |
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index c5107f269f24..99badf1404c3 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -369,6 +369,20 @@ static int ath9k_tx(struct ieee80211_hw *hw, | |||
369 | { | 369 | { |
370 | struct ath_softc *sc = hw->priv; | 370 | struct ath_softc *sc = hw->priv; |
371 | int hdrlen, padsize; | 371 | int hdrlen, padsize; |
372 | struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb); | ||
373 | |||
374 | /* | ||
375 | * As a temporary workaround, assign seq# here; this will likely need | ||
376 | * to be cleaned up to work better with Beacon transmission and virtual | ||
377 | * BSSes. | ||
378 | */ | ||
379 | if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) { | ||
380 | struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; | ||
381 | if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT) | ||
382 | sc->seq_no += 0x10; | ||
383 | hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG); | ||
384 | hdr->seq_ctrl |= cpu_to_le16(sc->seq_no); | ||
385 | } | ||
372 | 386 | ||
373 | /* Add the padding after the header if this is not already done */ | 387 | /* Add the padding after the header if this is not already done */ |
374 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); | 388 | hdrlen = ieee80211_get_hdrlen_from_skb(skb); |
diff --git a/drivers/net/wireless/b43/rfkill.c b/drivers/net/wireless/b43/rfkill.c index fec5645944a4..34ae125d5384 100644 --- a/drivers/net/wireless/b43/rfkill.c +++ b/drivers/net/wireless/b43/rfkill.c | |||
@@ -43,23 +43,6 @@ static bool b43_is_hw_radio_enabled(struct b43_wldev *dev) | |||
43 | return 0; | 43 | return 0; |
44 | } | 44 | } |
45 | 45 | ||
46 | /* Update the rfkill state */ | ||
47 | static void b43_rfkill_update_state(struct b43_wldev *dev) | ||
48 | { | ||
49 | struct b43_rfkill *rfk = &(dev->wl->rfkill); | ||
50 | |||
51 | if (!dev->radio_hw_enable) { | ||
52 | rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED; | ||
53 | return; | ||
54 | } | ||
55 | |||
56 | if (!dev->phy.radio_on) | ||
57 | rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED; | ||
58 | else | ||
59 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | ||
60 | |||
61 | } | ||
62 | |||
63 | /* The poll callback for the hardware button. */ | 46 | /* The poll callback for the hardware button. */ |
64 | static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | 47 | static void b43_rfkill_poll(struct input_polled_dev *poll_dev) |
65 | { | 48 | { |
@@ -77,7 +60,6 @@ static void b43_rfkill_poll(struct input_polled_dev *poll_dev) | |||
77 | if (unlikely(enabled != dev->radio_hw_enable)) { | 60 | if (unlikely(enabled != dev->radio_hw_enable)) { |
78 | dev->radio_hw_enable = enabled; | 61 | dev->radio_hw_enable = enabled; |
79 | report_change = 1; | 62 | report_change = 1; |
80 | b43_rfkill_update_state(dev); | ||
81 | b43info(wl, "Radio hardware status changed to %s\n", | 63 | b43info(wl, "Radio hardware status changed to %s\n", |
82 | enabled ? "ENABLED" : "DISABLED"); | 64 | enabled ? "ENABLED" : "DISABLED"); |
83 | } | 65 | } |
diff --git a/drivers/net/wireless/b43legacy/rfkill.c b/drivers/net/wireless/b43legacy/rfkill.c index 476add97e974..b32bf6a94f19 100644 --- a/drivers/net/wireless/b43legacy/rfkill.c +++ b/drivers/net/wireless/b43legacy/rfkill.c | |||
@@ -44,23 +44,6 @@ static bool b43legacy_is_hw_radio_enabled(struct b43legacy_wldev *dev) | |||
44 | return 0; | 44 | return 0; |
45 | } | 45 | } |
46 | 46 | ||
47 | /* Update the rfkill state */ | ||
48 | static void b43legacy_rfkill_update_state(struct b43legacy_wldev *dev) | ||
49 | { | ||
50 | struct b43legacy_rfkill *rfk = &(dev->wl->rfkill); | ||
51 | |||
52 | if (!dev->radio_hw_enable) { | ||
53 | rfk->rfkill->state = RFKILL_STATE_HARD_BLOCKED; | ||
54 | return; | ||
55 | } | ||
56 | |||
57 | if (!dev->phy.radio_on) | ||
58 | rfk->rfkill->state = RFKILL_STATE_SOFT_BLOCKED; | ||
59 | else | ||
60 | rfk->rfkill->state = RFKILL_STATE_UNBLOCKED; | ||
61 | |||
62 | } | ||
63 | |||
64 | /* The poll callback for the hardware button. */ | 47 | /* The poll callback for the hardware button. */ |
65 | static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) | 48 | static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) |
66 | { | 49 | { |
@@ -78,7 +61,6 @@ static void b43legacy_rfkill_poll(struct input_polled_dev *poll_dev) | |||
78 | if (unlikely(enabled != dev->radio_hw_enable)) { | 61 | if (unlikely(enabled != dev->radio_hw_enable)) { |
79 | dev->radio_hw_enable = enabled; | 62 | dev->radio_hw_enable = enabled; |
80 | report_change = 1; | 63 | report_change = 1; |
81 | b43legacy_rfkill_update_state(dev); | ||
82 | b43legacyinfo(wl, "Radio hardware status changed to %s\n", | 64 | b43legacyinfo(wl, "Radio hardware status changed to %s\n", |
83 | enabled ? "ENABLED" : "DISABLED"); | 65 | enabled ? "ENABLED" : "DISABLED"); |
84 | } | 66 | } |