Please pull 'upstream' branch of wireless-2.6
Subsystems (3)
The following changes since commit e62438630ca37539c8cc1553710bbfaa3cf960a7:
Matthew Wilcox:
Centralise definitions of sector_t and blkcnt_t
are found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream
Daniel Drake:
zd1211rw: zd_mac_rx isn't always called in IRQ context
zd1211rw: Fill enc_capa in GIWRANGE handler
Maxime Austruy:
softmac: fix unbalanced mutex_lock/unlock in ieee80211softmac_wx_set_mlme
Ulrich Kunitz:
zd1211rw: Support for multicast addresses
softmac: Fixed handling of deassociation from AP
Yan Burman:
hostap: replace kmalloc+memset with kzalloc
prism54: replace kmalloc+memset with kzalloc
ipw2200: replace kmalloc+memset with kcalloc
Zhu Yi:
ipw2200: Add IEEE80211_RADIOTAP_TSFT for promiscuous mode
ipw2200: Update version stamp to 1.2.0
ipw2200: Fix a typo
ipw2200: Fix debug output endian issue
drivers/net/wireless/hostap/hostap_ap.c | 4 -- drivers/net/wireless/hostap/hostap_cs.c | 3 - drivers/net/wireless/hostap/hostap_download.c | 4 -- drivers/net/wireless/hostap/hostap_hw.c | 12 +---- drivers/net/wireless/hostap/hostap_info.c | 3 - drivers/net/wireless/hostap/hostap_ioctl.c | 12 +---- drivers/net/wireless/hostap/hostap_pci.c | 3 - drivers/net/wireless/hostap/hostap_plx.c | 3 - drivers/net/wireless/ipw2100.c | 2 - drivers/net/wireless/ipw2200.c | 24 +++++++---- drivers/net/wireless/prism54/isl_ioctl.c | 9 +--- drivers/net/wireless/prism54/oid_mgt.c | 4 -- drivers/net/wireless/zd1211rw/zd_chip.c | 13 ++++++ drivers/net/wireless/zd1211rw/zd_chip.h | 43 +++++++++++++++++++ drivers/net/wireless/zd1211rw/zd_mac.c | 53 ++++++++++++++++++++++-- drivers/net/wireless/zd1211rw/zd_mac.h | 3 + drivers/net/wireless/zd1211rw/zd_netdev.c | 2 - net/ieee80211/softmac/ieee80211softmac_assoc.c | 14 +++++- net/ieee80211/softmac/ieee80211softmac_auth.c | 2 + net/ieee80211/softmac/ieee80211softmac_priv.h | 2 + net/ieee80211/softmac/ieee80211softmac_wx.c | 3 + 21 files changed, 158 insertions(+), 60 deletions(-)
drivers/net/wireless/hostap/hostap_ap.c +1 -3
@@ -1099,15 +1099,13 @@ static struct sta_info * ap_add_sta(stru {struct sta_info *sta; - sta = (struct sta_info *) -kmalloc (sizeof (struct sta_info ),GFP_ATOMIC ); + sta =kzalloc (sizeof (struct sta_info ),GFP_ATOMIC );if (sta ==NULL ) {PDEBUG (DEBUG_AP ,"AP: kmalloc failed\n" );return NULL ; }/* initialize STA info data */ -memset (sta,0 ,sizeof (struct sta_info )); sta->local = ap->local;skb_queue_head_init (&sta->tx_buf);memcpy (sta->addr, addr,ETH_ALEN );
drivers/net/wireless/hostap/hostap_cs.c +1 -2
@@ -566,12 +566,11 @@ static int prism2_config(struct pcmcia_dPDEBUG (DEBUG_FLOW ,"prism2_config()\n" ); parse =kmalloc (sizeof (cisparse_t),GFP_KERNEL ); - hw_priv =kmalloc (sizeof (*hw_priv),GFP_KERNEL ); + hw_priv =kzalloc (sizeof (*hw_priv),GFP_KERNEL );if (parse ==NULL || hw_priv ==NULL ) { ret = -ENOMEM ; goto failed; } -memset (hw_priv,0 ,sizeof (*hw_priv)); tuple.DesiredTuple =CISTPL_CONFIG ; tuple.Attributes =0 ;
drivers/net/wireless/hostap/hostap_download.c +1 -3
@@ -685,14 +685,12 @@ static int prism2_download(local_info_t goto out; } - dl =kmalloc (sizeof (*dl) + param->num_areas * + dl =kzalloc (sizeof (*dl) + param->num_areas *sizeof (struct prism2_download_data_area ),GFP_KERNEL );if (dl ==NULL ) { ret = -ENOMEM ; goto out; } -memset (dl,0 ,sizeof (*dl) + param->num_areas * -sizeof (struct prism2_download_data_area )); dl->dl_cmd = param->dl_cmd; dl->start_addr = param->start_addr; dl->num_areas = param->num_areas;
drivers/net/wireless/hostap/hostap_hw.c +3 -9
@@ -347,14 +347,12 @@ static int hfa384x_cmd(struct net_deviceif (signal_pending (current))return -EINTR ; - entry = (struct hostap_cmd_queue *) -kmalloc (sizeof (*entry),GFP_ATOMIC ); + entry =kzalloc (sizeof (*entry),GFP_ATOMIC );if (entry ==NULL ) {printk (KERN_DEBUG "%s: hfa384x_cmd - kmalloc failed\n" , dev->name);return -ENOMEM ; } -memset (entry,0 ,sizeof (*entry));atomic_set (&entry->usecnt,1 ); entry->type =CMD_SLEEP ; entry->cmd = cmd;
@@ -517,14 +515,12 @@ static int hfa384x_cmd_callback(struct nreturn -1 ; } - entry = (struct hostap_cmd_queue *) -kmalloc (sizeof (*entry),GFP_ATOMIC ); + entry =kzalloc (sizeof (*entry),GFP_ATOMIC );if (entry ==NULL ) {printk (KERN_DEBUG "%s: hfa384x_cmd_callback - kmalloc " "failed\n" , dev->name);return -ENOMEM ; } -memset (entry,0 ,sizeof (*entry));atomic_set (&entry->usecnt,1 ); entry->type =CMD_CALLBACK ; entry->cmd = cmd;
@@ -3015,14 +3011,12 @@ static int prism2_set_tim(struct net_dev iface =netdev_priv (dev); local = iface->local; - new_entry = (struct set_tim_data *) -kmalloc (sizeof (*new_entry),GFP_ATOMIC ); + new_entry =kzalloc (sizeof (*new_entry),GFP_ATOMIC );if (new_entry ==NULL ) {printk (KERN_DEBUG "%s: prism2_set_tim: kmalloc failed\n" , local->dev->name);return -ENOMEM ; } -memset (new_entry,0 ,sizeof (*new_entry)); new_entry->aid = aid; new_entry->set = set;
drivers/net/wireless/hostap/hostap_info.c +1 -2
@@ -327,11 +327,10 @@ static void prism2_info_hostscanresults( ptr = (u8 *) pos; new_count = left / result_size; - results =kmalloc (new_count *sizeof (struct hfa384x_hostscan_result ), + results =kcalloc (new_count,sizeof (struct hfa384x_hostscan_result ),GFP_ATOMIC );if (results ==NULL )return ; -memset (results,0 , new_count *sizeof (struct hfa384x_hostscan_result ));for (i =0 ; i < new_count; i++) {memcpy (&results[i], ptr, copy_len);
drivers/net/wireless/hostap/hostap_ioctl.c +3 -9
@@ -181,12 +181,10 @@ static int prism2_ioctl_siwencode(structstruct ieee80211_crypt_data *new_crypt;/* take WEP into use */ - new_crypt = (struct ieee80211_crypt_data *) -kmalloc (sizeof (struct ieee80211_crypt_data ), + new_crypt =kzalloc (sizeof (struct ieee80211_crypt_data ),GFP_KERNEL );if (new_crypt ==NULL )return -ENOMEM ; -memset (new_crypt,0 ,sizeof (struct ieee80211_crypt_data )); new_crypt->ops =ieee80211_get_crypto_ops ("WEP" );if (!new_crypt->ops) {request_module ("ieee80211_crypt_wep" );
@@ -3320,14 +3318,12 @@ static int prism2_ioctl_siwencodeext(strprism2_crypt_delayed_deinit (local, crypt); - new_crypt = (struct ieee80211_crypt_data *) -kmalloc (sizeof (struct ieee80211_crypt_data ), + new_crypt =kzalloc (sizeof (struct ieee80211_crypt_data ),GFP_KERNEL );if (new_crypt ==NULL ) { ret = -ENOMEM ; goto done; } -memset (new_crypt,0 ,sizeof (struct ieee80211_crypt_data )); new_crypt->ops = ops; new_crypt->priv = new_crypt->ops->init (i);if (new_crypt->priv ==NULL ) {
@@ -3538,14 +3534,12 @@ static int prism2_ioctl_set_encryption(lprism2_crypt_delayed_deinit (local, crypt); - new_crypt = (struct ieee80211_crypt_data *) -kmalloc (sizeof (struct ieee80211_crypt_data ), + new_crypt =kzalloc (sizeof (struct ieee80211_crypt_data ),GFP_KERNEL );if (new_crypt ==NULL ) { ret = -ENOMEM ; goto done; } -memset (new_crypt,0 ,sizeof (struct ieee80211_crypt_data )); new_crypt->ops = ops; new_crypt->priv = new_crypt->ops->init (param->u.crypt.idx);if (new_crypt->priv ==NULL ) {
drivers/net/wireless/hostap/hostap_pci.c +1 -2
@@ -300,10 +300,9 @@ static int prism2_pci_probe(struct pci_dstruct hostap_interface *iface;struct hostap_pci_priv *hw_priv; - hw_priv =kmalloc (sizeof (*hw_priv),GFP_KERNEL ); + hw_priv =kzalloc (sizeof (*hw_priv),GFP_KERNEL );if (hw_priv ==NULL )return -ENOMEM ; -memset (hw_priv,0 ,sizeof (*hw_priv));if (pci_enable_device (pdev)) goto err_out_free;
drivers/net/wireless/hostap/hostap_plx.c +1 -2
@@ -447,10 +447,9 @@ static int prism2_plx_probe(struct pci_dint tmd7160;struct hostap_plx_priv *hw_priv; - hw_priv =kmalloc (sizeof (*hw_priv),GFP_KERNEL ); + hw_priv =kzalloc (sizeof (*hw_priv),GFP_KERNEL );if (hw_priv ==NULL )return -ENOMEM ; -memset (hw_priv,0 ,sizeof (*hw_priv));if (pci_enable_device (pdev)) goto err_out_free;
drivers/net/wireless/ipw2100.c +1 -1
@@ -6215,7 +6215,7 @@ static int ipw2100_pci_init_one(struct p/* Allocate and initialize the Tx/Rx queues and lists */ if (ipw2100_queues_allocate (priv)) { printk(KERN_WARNING DRV_NAME - "Error calilng ipw2100_queues_allocate.\n"); + "Error calling ipw2100_queues_allocate.\n"); err = -ENOMEM ; goto fail; }
drivers/net/wireless/ipw2200.c +16 -8
@@ -70,7 +70,7 @@ #else#define VQ #endif -#define IPW2200_VERSION "1.1.4" VK VD VM VP VR VQ +#define IPW2200_VERSION "1.2.0" VK VD VM VP VR VQ#define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2200/2915 Network Driver"#define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation"#define DRV_VERSION IPW2200_VERSION
@@ -7656,7 +7656,8 @@ static void ipw_handle_data_packet_monit/* Big bitfield of all the fields we provide in radiotap */ ipw_rt->rt_hdr.it_present = - ((1 << IEEE80211_RADIOTAP_FLAGS) | + ((1 << IEEE80211_RADIOTAP_TSFT) | + (1 << IEEE80211_RADIOTAP_FLAGS) | (1 << IEEE80211_RADIOTAP_RATE) | (1 << IEEE80211_RADIOTAP_CHANNEL) | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) |
@@ -7665,10 +7666,14 @@ static void ipw_handle_data_packet_monit/* Zero the flags, we'll add to them as we go */ ipw_rt->rt_flags =0 ; - ipw_rt->rt_tsf =0ULL ; + ipw_rt->rt_tsf = (u64)(frame->parent_tsf[3 ] <<24 | + frame->parent_tsf[2 ] <<16 | + frame->parent_tsf[1 ] <<8 | + frame->parent_tsf[0 ]);/* Convert signal to DBM */ ipw_rt->rt_dbmsignal = antsignal; + ipw_rt->rt_dbmnoise = frame->noise;/* Convert the channel data and set the flags */ ipw_rt->rt_channel =cpu_to_le16 (ieee80211chan2mhz (received_channel));
@@ -7868,7 +7873,8 @@ static void ipw_handle_promiscuous_rx(st/* Big bitfield of all the fields we provide in radiotap */ ipw_rt->rt_hdr.it_present = - ((1 << IEEE80211_RADIOTAP_FLAGS) | + ((1 << IEEE80211_RADIOTAP_TSFT) | + (1 << IEEE80211_RADIOTAP_FLAGS) | (1 << IEEE80211_RADIOTAP_RATE) | (1 << IEEE80211_RADIOTAP_CHANNEL) | (1 << IEEE80211_RADIOTAP_DBM_ANTSIGNAL) |
@@ -7877,7 +7883,10 @@ static void ipw_handle_promiscuous_rx(st/* Zero the flags, we'll add to them as we go */ ipw_rt->rt_flags =0 ; - ipw_rt->rt_tsf =0ULL ; + ipw_rt->rt_tsf = (u64)(frame->parent_tsf[3 ] <<24 | + frame->parent_tsf[2 ] <<16 | + frame->parent_tsf[1 ] <<8 | + frame->parent_tsf[0 ]);/* Convert to DBM */ ipw_rt->rt_dbmsignal = signal;
@@ -8276,7 +8285,7 @@ #endif ("Notification: subtype=%02X flags=%02X size=%d\n" , pkt->u.notification.subtype, pkt->u.notification.flags, - pkt->u.notification.size); +le16_to_cpu (pkt->u.notification.size));ipw_rx_notification (priv, &pkt->u.notification);break ; }
@@ -11129,14 +11138,13 @@ static int ipw_up(struct ipw_priv *priv)return -EIO ;if (cmdlog && !priv->cmdlog) { - priv->cmdlog =kmalloc (sizeof (*priv->cmdlog) * cmdlog, + priv->cmdlog =kcalloc (cmdlog,sizeof (*priv->cmdlog),GFP_KERNEL );if (priv->cmdlog ==NULL ) {IPW_ERROR ("Error allocating %d command log entries.\n" , cmdlog);return -ENOMEM ; }else { -memset (priv->cmdlog,0 ,sizeof (*priv->cmdlog) * cmdlog); priv->cmdlog_len = cmdlog; } }
drivers/net/wireless/prism54/isl_ioctl.c +3 -6
@@ -2140,11 +2140,9 @@ prism54_wpa_bss_ie_add(islpci_private *p struct islpci_bss_wpa_ie, list);list_del (&bss->list); }else { - bss =kmalloc (sizeof (*bss),GFP_ATOMIC ); -if (bss !=NULL ) { + bss =kzalloc (sizeof (*bss),GFP_ATOMIC ); +if (bss !=NULL ) priv->num_bss_wpa++; -memset (bss,0 ,sizeof (*bss)); - } }if (bss !=NULL ) {memcpy (bss->bssid, bssid,ETH_ALEN );
@@ -2684,11 +2682,10 @@ prism2_ioctl_set_generic_element(structreturn -EINVAL ; alen =sizeof (*attach) + len; - attach =kmalloc (alen,GFP_KERNEL ); + attach =kzalloc (alen,GFP_KERNEL );if (attach ==NULL )return -ENOMEM ; -memset (attach,0 , alen);#define WLAN_FC_TYPE_MGMT 0#define WLAN_FC_STYPE_ASSOC_REQ 0#define WLAN_FC_STYPE_REASSOC_REQ 2
drivers/net/wireless/prism54/oid_mgt.c +1 -3
@@ -235,12 +235,10 @@ mgt_init(islpci_private *priv) {int i; - priv->mib =kmalloc (OID_NUM_LAST *sizeof (void *),GFP_KERNEL ); + priv->mib =kcalloc (OID_NUM_LAST ,sizeof (void *),GFP_KERNEL );if (!priv->mib)return -ENOMEM ; -memset (priv->mib,0 ,OID_NUM_LAST *sizeof (void *)); -/* Alloc the cache */ for (i =0 ; i <OID_NUM_LAST ; i++) {if (isl_oid[i].flags &OID_FLAG_CACHED ) {
drivers/net/wireless/zd1211rw/zd_chip.c +13 -0
@@ -1673,3 +1673,16 @@ int zd_rfwritev_cr_locked(struct zd_chipreturn 0 ; } + +int zd_chip_set_multicast_hash (struct zd_chip *chip, +struct zd_mc_hash *hash) +{ +struct zd_ioreq32 ioreqs[] = { + {CR_GROUP_HASH_P1 , hash->low }, + {CR_GROUP_HASH_P2 , hash->high }, + }; + +dev_dbg_f (zd_chip_dev (chip),"hash l 0x%08x h 0x%08x\n" , + ioreqs[0 ].value, ioreqs[1 ].value); +return zd_iowrite32a (chip, ioreqs,ARRAY_SIZE (ioreqs)); +}
drivers/net/wireless/zd1211rw/zd_chip.h +42 -1
56 lines not on this page · raw message
drivers/net/wireless/zd1211rw/zd_mac.c +48 -5
95 lines not on this page · raw message
drivers/net/wireless/zd1211rw/zd_mac.h +3 -0
@@ -133,6 +133,8 @@ struct zd_mac {struct iw_statistics iw_stats;struct housekeeping housekeeping; +struct work_struct set_multicast_hash_work; +struct zd_mc_hash multicast_hash;struct work_struct set_rts_cts_work;struct work_struct set_basic_rates_work;
@@ -189,6 +191,7 @@ int zd_mac_init_hw(struct zd_mac *mac, uint zd_mac_open (struct net_device *netdev);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);
drivers/net/wireless/zd1211rw/zd_netdev.c +1 -1
@@ -242,7 +242,7 @@ struct net_device *zd_netdev_alloc(struc netdev->open = zd_mac_open; netdev->stop = zd_mac_stop;/* netdev->get_stats = */ -/* netdev->set_multicast_list = */ + netdev->set_multicast_list = zd_mac_set_multicast_list; netdev->set_mac_address = zd_mac_set_mac_address; netdev->wireless_handlers = &iw_handler_def;/* netdev->ethtool_ops = */
net/ieee80211/softmac/ieee80211softmac_assoc.c +12 -2
@@ -427,6 +427,17 @@ ieee80211softmac_handle_assoc_response(sreturn 0 ; } +void +ieee80211softmac_try_reassoc (struct ieee80211softmac_device *mac) +{ +unsigned long flags; + +spin_lock_irqsave (&mac->lock, flags); + mac->associnfo.associating =1 ; +schedule_work (&mac->associnfo.work); +spin_unlock_irqrestore (&mac->lock, flags); +} +int ieee80211softmac_handle_disassoc (struct net_device * dev,struct ieee80211_disassoc *disassoc)
@@ -445,8 +456,7 @@ ieee80211softmac_handle_disassoc(struct dprintk(KERN_INFO PFX "got disassoc frame\n");ieee80211softmac_disassoc (mac); -/* try to reassociate */ -schedule_work (&mac->associnfo.work); +ieee80211softmac_try_reassoc (mac);return 0 ; }
net/ieee80211/softmac/ieee80211softmac_auth.c +2 -0
@@ -334,6 +334,8 @@ ieee80211softmac_deauth_from_net(struct/* can't transmit data right now... */ netif_carrier_off (mac->dev);spin_unlock_irqrestore (&mac->lock, flags); + +ieee80211softmac_try_reassoc (mac); }/*
net/ieee80211/softmac/ieee80211softmac_priv.h +2 -0
@@ -238,4 +238,6 @@ void ieee80211softmac_call_events_lockedint ieee80211softmac_notify_internal (struct ieee80211softmac_device *mac,int event,void *event_context,notify_function_ptr fun,void *context,gfp_t gfp_mask); +void ieee80211softmac_try_reassoc (struct ieee80211softmac_device *mac); +#endif /* IEEE80211SOFTMAC_PRIV_H_ */
net/ieee80211/softmac/ieee80211softmac_wx.c +2 -1
@@ -495,7 +495,8 @@ ieee80211softmac_wx_set_mlme(struct net_ printk(KERN_DEBUG PFX "wx_set_mlme: we should know the net here...\n"); goto out; } -return ieee80211softmac_deauth_req (mac, net, reason); + err =ieee80211softmac_deauth_req (mac, net, reason); + goto out;case IW_MLME_DISASSOC :ieee80211softmac_send_disassoc_req (mac, reason); mac->associnfo.associated =0 ;
Signature · 2 lines
John W. Linville [email protected]
Quoted 7 lines · John W. Linville
The following changes since commit
e62438630ca37539c8cc1553710bbfaa3cf960a7:
Matthew Wilcox:
Centralise definitions ofsector_tandblkcnt_tare found in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.gitupstream
pulled, but there were workqueue-related conflicts. let me know if #upstream doesn't match what you would like.