Please pull 'upstream-fixes' branch of wireless-2.6
Subsystems (3)
Please pull 'upstream' branch of wireless-2.6
In reply to John W. LinvilleThe following changes since commit 0c234ae655a45ac3ee53a25b2e56e9bb6c27d71d:
Ulrich Kunitz (1):
ieee80211softmac: Fix mutex_lock at exit of ieee80211_softmac_get_genie
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream
Roy Marples (1):
prism54: set carrier flags correctly
drivers/net/wireless/prism54/isl_ioctl.c | 5 ++++- drivers/net/wireless/prism54/islpci_dev.c | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-)
drivers/net/wireless/prism54/isl_ioctl.c +4 -1
@@ -2093,8 +2093,11 @@ link_changed(struct net_device *ndev, u32 bitrate) }else send_simple_event (netdev_priv (ndev),"Link established" ); - }else +netif_carrier_on (ndev); + }else {send_simple_event (netdev_priv (ndev),"Link lost" ); +netif_carrier_off (ndev); + } }/* Beacon/ProbeResp payload header */
drivers/net/wireless/prism54/islpci_dev.c +3 -1
@@ -386,7 +386,9 @@ islpci_open(struct net_device *ndev) }netif_start_queue (ndev); -/* netif_mark_up( ndev ); */ + +/* Turn off carrier unless we know we have associated */ +netif_carrier_off (ndev);return 0 ; }
Signature · 2 lines
John W. Linville [email protected]
The following changes since commit e25db641c0e6dd49c5db24dbe154048d4a466727:
Linus Torvalds (1):
Merge master.kernel.org:/.../davej/cpufreq
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-fixes
Ulrich Kunitz (3):
zd1211rw: Call ieee80211_rx in tasklet
ieee80211softmac: Fix errors related to the work_struct changes
ieee80211softmac: Fix mutex_lock at exit of ieee80211_softmac_get_genie
drivers/net/wireless/zd1211rw/zd_mac.c | 96 +++++++++++++++++------- drivers/net/wireless/zd1211rw/zd_mac.h | 5 +- drivers/net/wireless/zd1211rw/zd_usb.c | 4 +- net/ieee80211/softmac/ieee80211softmac_assoc.c | 4 +- net/ieee80211/softmac/ieee80211softmac_wx.c | 2 +- 5 files changed, 79 insertions(+), 32 deletions(-)
drivers/net/wireless/zd1211rw/zd_mac.c +70 -26
@@ -41,6 +41,8 @@ static void housekeeping_disable(struct zd_mac *mac);static void set_multicast_hash_handler (struct work_struct *work); +static void do_rx (unsigned long mac_ptr); +int zd_mac_init (struct zd_mac *mac,struct net_device *netdev,struct usb_interface *intf)
@@ -53,6 +55,10 @@ int zd_mac_init(struct zd_mac *mac,INIT_DELAYED_WORK (&mac->set_rts_cts_work, set_rts_cts_work);INIT_DELAYED_WORK (&mac->set_basic_rates_work, set_basic_rates_work); +skb_queue_head_init (&mac->rx_queue); +tasklet_init (&mac->rx_tasklet, do_rx, (unsigned long )mac); +tasklet_disable (&mac->rx_tasklet); +ieee_init (ieee);softmac_init (ieee80211_priv (netdev));zd_chip_init (&mac->chip, netdev, intf);
@@ -140,6 +146,8 @@ out:void zd_mac_clear (struct zd_mac *mac) {flush_workqueue (zd_workqueue); +skb_queue_purge (&mac->rx_queue); +tasklet_kill (&mac->rx_tasklet);zd_chip_clear (&mac->chip);ZD_ASSERT (!spin_is_locked (&mac->lock));ZD_MEMCLEAR (mac,sizeof (struct zd_mac ));
@@ -168,6 +176,8 @@ int zd_mac_open(struct net_device *netdev)struct zd_chip *chip = &mac->chip;int r; +tasklet_enable (&mac->rx_tasklet); + r =zd_chip_enable_int (chip);if (r <0 ) goto out;
@@ -218,6 +228,8 @@ int zd_mac_stop(struct net_device *netdev)*/ zd_chip_disable_rx (chip); +skb_queue_purge (&mac->rx_queue); +tasklet_disable (&mac->rx_tasklet);housekeeping_disable (mac);ieee80211softmac_stop (netdev);
@@ -470,13 +482,13 @@ static void bssinfo_change(struct net_device *netdev, u32 changes)if (changes &IEEE80211SOFTMAC_BSSINFOCHG_RATES ) {/* Set RTS rate to highest available basic rate */ -u8 rate =ieee80211softmac_highest_supported_rate (softmac, +u8 hi_rate =ieee80211softmac_highest_supported_rate (softmac, &bssinfo->supported_rates,1 ); - rate =rate_to_zd_rate (rate); + hi_rate =rate_to_zd_rate (hi_rate);spin_lock_irqsave (&mac->lock, flags); -if (rate != mac->rts_rate) { - mac->rts_rate = rate; +if (hi_rate != mac->rts_rate) { + mac->rts_rate = hi_rate; need_set_rts_cts =1 ; }spin_unlock_irqrestore (&mac->lock, flags);
@@ -1072,43 +1084,75 @@ static int fill_rx_stats(struct ieee80211_rx_stats *stats,return 0 ; } -int zd_mac_rx (struct zd_mac *mac,const u8 *buffer,unsigned int length) +static void zd_mac_rx (struct zd_mac *mac,struct sk_buff *skb) {int r;struct ieee80211_device *ieee =zd_mac_to_ieee80211 (mac);struct ieee80211_rx_stats stats;const struct rx_status *status; -struct sk_buff *skb; -if (length <ZD_PLCP_HEADER_SIZE +IEEE80211_1ADDR_LEN + -IEEE80211_FCS_LEN +sizeof (struct rx_status )) -return -EINVAL ; +if (skb->len <ZD_PLCP_HEADER_SIZE +IEEE80211_1ADDR_LEN + +IEEE80211_FCS_LEN +sizeof (struct rx_status )) + { +dev_dbg_f (zd_mac_dev (mac),"Packet with length %u to small.\n" , + skb->len); + goto free_skb; + } - r =fill_rx_stats (&stats, &status, mac, buffer, length); -if (r) -return r; + r =fill_rx_stats (&stats, &status, mac, skb->data, skb->len); +if (r) { +/* Only packets with rx errors are included here. */ + goto free_skb; + } - length -=ZD_PLCP_HEADER_SIZE +IEEE80211_FCS_LEN + -sizeof (struct rx_status ); - buffer +=ZD_PLCP_HEADER_SIZE ; +__skb_pull (skb,ZD_PLCP_HEADER_SIZE ); +__skb_trim (skb, skb->len - + (IEEE80211_FCS_LEN +sizeof (struct rx_status ))); -update_qual_rssi (mac, buffer, length, stats.signal, stats.rssi); +update_qual_rssi (mac, skb->data, skb->len, stats.signal, + status->signal_strength); - r =filter_rx (ieee, buffer, length, &stats); -if (r <=0 ) -return r; + r =filter_rx (ieee, skb->data, skb->len, &stats); +if (r <=0 ) { +if (r <0 ) +dev_dbg_f (zd_mac_dev (mac),"Error in packet.\n" ); + goto free_skb; + } - skb =dev_alloc_skb (sizeof (struct zd_rt_hdr ) + length); -if (!skb) -return -ENOMEM ;if (ieee->iw_mode ==IW_MODE_MONITOR ) -fill_rt_header (skb_put (skb,sizeof (struct zd_rt_hdr )), mac, +fill_rt_header (skb_push (skb,sizeof (struct zd_rt_hdr )), mac, &stats, status); -memcpy (skb_put (skb, length), buffer, length); r =ieee80211_rx (ieee, skb, &stats); -if (!r) -dev_kfree_skb_any (skb); +if (r) +return ; +free_skb: +/* We are always in a soft irq. */ +dev_kfree_skb (skb); +} + +static void do_rx (unsigned long mac_ptr) +{ +struct zd_mac *mac = (struct zd_mac *)mac_ptr; +struct sk_buff *skb; + +while ((skb =skb_dequeue (&mac->rx_queue)) !=NULL ) +zd_mac_rx (mac, skb); +} + +int zd_mac_rx_irq (struct zd_mac *mac,const u8 *buffer,unsigned int length) +{ +struct sk_buff *skb; + + skb =dev_alloc_skb (sizeof (struct zd_rt_hdr ) + length); +if (!skb) { +dev_warn (zd_mac_dev (mac),"Could not allocate skb.\n" ); +return -ENOMEM ; + } +skb_reserve (skb,sizeof (struct zd_rt_hdr )); +memcpy (__skb_put (skb, length), buffer, length); +skb_queue_tail (&mac->rx_queue, skb); +tasklet_schedule (&mac->rx_tasklet);return 0 ; }
drivers/net/wireless/zd1211rw/zd_mac.h +4 -1
@@ -138,6 +138,9 @@ struct zd_mac {struct delayed_work set_rts_cts_work;struct delayed_work set_basic_rates_work; +struct tasklet_struct rx_tasklet; +struct sk_buff_head rx_queue; +unsigned int stats_count;u8 qual_buffer[ZD_MAC_STATS_BUFFER_SIZE ];u8 rssi_buffer[ZD_MAC_STATS_BUFFER_SIZE ];
@@ -193,7 +196,7 @@ int zd_mac_stop(struct net_device *netdev);int zd_mac_set_mac_address (struct net_device *dev,void *p);void zd_mac_set_multicast_list (struct net_device *netdev); -int zd_mac_rx (struct zd_mac *mac,const u8 *buffer,unsigned int length); +int zd_mac_rx_irq (struct zd_mac *mac,const u8 *buffer,unsigned int length);int zd_mac_set_regdomain (struct zd_mac *zd_mac,u8 regdomain);u8 zd_mac_get_regdomain (struct zd_mac *zd_mac);
drivers/net/wireless/zd1211rw/zd_usb.c +2 -2
@@ -598,13 +598,13 @@ static void handle_rx_packet(struct zd_usb *usb, const u8 *buffer, n = l+k;if (n > length)return ; -zd_mac_rx (mac, buffer+l, k); +zd_mac_rx_irq (mac, buffer+l, k);if (i >=2 )return ; l = (n+3 ) & ~3 ; } }else { -zd_mac_rx (mac, buffer, length); +zd_mac_rx_irq (mac, buffer, length); } }
net/ieee80211/softmac/ieee80211softmac_assoc.c +2 -2
@@ -167,7 +167,7 @@ static void ieee80211softmac_assoc_notify_scan(struct net_device *dev, int event_type, void *context) { struct ieee80211softmac_device *mac = ieee80211_priv(dev); -ieee80211softmac_assoc_work ((void *)mac); +ieee80211softmac_assoc_work (&mac->associnfo.work.work); } static void
@@ -177,7 +177,7 @@ ieee80211softmac_assoc_notify_auth(struct net_device *dev, int event_type, voidswitch (event_type) {case IEEE80211SOFTMAC_EVENT_AUTHENTICATED : -ieee80211softmac_assoc_work ((void *)mac); +ieee80211softmac_assoc_work (&mac->associnfo.work.work);break ;case IEEE80211SOFTMAC_EVENT_AUTH_FAILED :case IEEE80211SOFTMAC_EVENT_AUTH_TIMEOUT :
net/ieee80211/softmac/ieee80211softmac_wx.c +1 -1
@@ -463,7 +463,7 @@ ieee80211softmac_wx_get_genie(struct net_device *dev, err = -E2BIG ; }spin_unlock_irqrestore (&mac->lock, flags); -mutex_lock (&mac->associnfo.mutex); +mutex_unlock (&mac->associnfo.mutex);return err; }
Signature · 2 lines
John W. Linville [email protected]
Quoted 4 lines · John W. Linville
The following changes since commit
e25db641c0e6dd49c5db24dbe154048d4a466727:
Linus Torvalds (1):
Merge master.kernel.org:/.../davej/cpufreq
Quoted 8 lines
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.gitupstream-fixesUlrich Kunitz (3):
zd1211rw: Callieee80211_rxin tasklet
ieee80211softmac: Fix errors related to thework_structchanges
ieee80211softmac: Fixmutex_lockat exit ofieee80211_softmac_get_genie
pulled
Re: Please pull 'upstream' branch of wireless-2.6
In reply to John W. LinvilleQuoted 10 lines · John W. Linville
The following changes since commit
0c234ae655a45ac3ee53a25b2e56e9bb6c27d71d:
Ulrich Kunitz (1):
ieee80211softmac: Fixmutex_lockat exit ofieee80211_softmac_get_genieare found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.gitupstreamRoy Marples (1):
prism54: set carrier flags correctly
Why is this not #upstream-fixes material? What's the impact?
Jeff
Re: Please pull 'upstream' branch of wireless-2.6
Quoted 9 lines · Jeff Garzik
Quoted 8 lines · John W. Linville
The following changes since commit
0c234ae655a45ac3ee53a25b2e56e9bb6c27d71d:
Ulrich Kunitz (1):
ieee80211softmac: Fixmutex_lockat exit ofieee80211_softmac_get_genieare found in the git repository at:
Quoted 7 lines
Quoted 5 lines
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
upstreamRoy Marples (1):
prism54: set carrier flags correctlyWhy is this not #upstream-fixes material? What's the impact?
Just being cautious, really. I have no objection if you want to pull it as a fix.
John
Signature · 2 lines
John W. Linville [email protected]
Re: Please pull 'upstream' branch of wireless-2.6
Quoted 13 lines · John W. Linville
Quoted 12 lines · Jeff Garzik
Quoted 11 lines · John W. Linville
The following changes since commit
0c234ae655a45ac3ee53a25b2e56e9bb6c27d71d:
Ulrich Kunitz (1):
ieee80211softmac: Fixmutex_lockat exit ofieee80211_softmac_get_genieare found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git
upstream
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
Roy Marples (1):
prism54: set carrier flags correctlyWhy is this not #upstream-fixes material? What's the impact?
Just being cautious, really. I have no objection if you want to pull it as a fix.
After further review...
Jeff, it looks like you have not pulled this one so far. Based on the commentary from Roger While [1], lets hold-off on this one.
Roy, please consider refactoring your patch based on Roger's comments.
Thanks,
John
[1] http://marc.10east.com/?l=linux-netdev&m=116740017623597&w=2
Signature · 2 lines
John W. Linville [email protected]