ht.c (b89371621e5bedc84498ced2c5c33976bd1b2f64) | ht.c (47846c9b0c10808d9337d2e7d09361f3e0a0a71a) |
---|---|
1/* 2 * HT handling 3 * 4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> 5 * Copyright 2002-2005, Instant802 Networks, Inc. 6 * Copyright 2005-2006, Devicescape Software, Inc. 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> --- 92 unchanged lines hidden (view full) --- 101 struct sk_buff *skb; 102 struct ieee80211_mgmt *mgmt; 103 u16 params; 104 105 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom); 106 107 if (!skb) { 108 printk(KERN_ERR "%s: failed to allocate buffer " | 1/* 2 * HT handling 3 * 4 * Copyright 2003, Jouni Malinen <jkmaline@cc.hut.fi> 5 * Copyright 2002-2005, Instant802 Networks, Inc. 6 * Copyright 2005-2006, Devicescape Software, Inc. 7 * Copyright 2006-2007 Jiri Benc <jbenc@suse.cz> 8 * Copyright 2007, Michael Wu <flamingice@sourmilk.net> --- 92 unchanged lines hidden (view full) --- 101 struct sk_buff *skb; 102 struct ieee80211_mgmt *mgmt; 103 u16 params; 104 105 skb = dev_alloc_skb(sizeof(*mgmt) + local->hw.extra_tx_headroom); 106 107 if (!skb) { 108 printk(KERN_ERR "%s: failed to allocate buffer " |
109 "for delba frame\n", sdata->dev->name); | 109 "for delba frame\n", sdata->name); |
110 return; 111 } 112 113 skb_reserve(skb, local->hw.extra_tx_headroom); 114 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); 115 memset(mgmt, 0, 24); 116 memcpy(mgmt->da, da, ETH_ALEN); | 110 return; 111 } 112 113 skb_reserve(skb, local->hw.extra_tx_headroom); 114 mgmt = (struct ieee80211_mgmt *) skb_put(skb, 24); 115 memset(mgmt, 0, 24); 116 memcpy(mgmt->da, da, ETH_ALEN); |
117 memcpy(mgmt->sa, sdata->dev->dev_addr, ETH_ALEN); | 117 memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN); |
118 if (sdata->vif.type == NL80211_IFTYPE_AP || 119 sdata->vif.type == NL80211_IFTYPE_AP_VLAN) | 118 if (sdata->vif.type == NL80211_IFTYPE_AP || 119 sdata->vif.type == NL80211_IFTYPE_AP_VLAN) |
120 memcpy(mgmt->bssid, sdata->dev->dev_addr, ETH_ALEN); | 120 memcpy(mgmt->bssid, sdata->vif.addr, ETH_ALEN); |
121 else if (sdata->vif.type == NL80211_IFTYPE_STATION) 122 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); 123 124 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | 125 IEEE80211_STYPE_ACTION); 126 127 skb_put(skb, 1 + sizeof(mgmt->u.action.u.delba)); 128 --- 40 unchanged lines hidden --- | 121 else if (sdata->vif.type == NL80211_IFTYPE_STATION) 122 memcpy(mgmt->bssid, sdata->u.mgd.bssid, ETH_ALEN); 123 124 mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | 125 IEEE80211_STYPE_ACTION); 126 127 skb_put(skb, 1 + sizeof(mgmt->u.action.u.delba)); 128 --- 40 unchanged lines hidden --- |