Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (26 commits)
llc: Fix double accounting of received packets
netfilter: nf_conntrack_expect: fix error path unwind in nf_conntrack_expect_init()
bluetooth: fix locking bug in the rfcomm socket cleanup handling
mac80211: fix alignment issue with compare_ether_addr()
mac80211: Fix for NULL pointer dereference in sta_info_get()
mac80211: fix a typo in ieee80211_handle_filtered_frame comment
rndis_wlan: add missing range check for power_output modparam
iwlwifi: fix rate scale TLC column selection bug
iwlwifi: fix exit from stay_in_table state
rndis_wlan: Make connections to TKIP PSK networks work
mac80211 : Fixes the status message for iwconfig
rt2x00: Use atomic interface iteration in irq context
rt2x00: Reset antenna RSSI after switch
rt2x00: Don't count retries as failure
rt2x00: Fix memleak in tx() path
mac80211: reorder channel and freq reporting in wext scan report
b43: Fix controller restart crash
mac80211: fix ieee80211_rx_bss_put/get imbalance
net/mac80211: always true conditionals
b43: Upload both beacon templates on initial load
...

+182 -72
+1
drivers/net/wireless/b43/b43.h
··· 737 737 struct ieee80211_tx_control beacon_txctl; 738 738 bool beacon0_uploaded; 739 739 bool beacon1_uploaded; 740 + bool beacon_templates_virgin; /* Never wrote the templates? */ 740 741 struct work_struct beacon_update_trigger; 741 742 742 743 /* The current QOS parameters for the 4 queues.
+54 -16
drivers/net/wireless/b43/main.c
··· 1544 1544 kfree(probe_resp_data); 1545 1545 } 1546 1546 1547 + static void b43_upload_beacon0(struct b43_wldev *dev) 1548 + { 1549 + struct b43_wl *wl = dev->wl; 1550 + 1551 + if (wl->beacon0_uploaded) 1552 + return; 1553 + b43_write_beacon_template(dev, 0x68, 0x18); 1554 + /* FIXME: Probe resp upload doesn't really belong here, 1555 + * but we don't use that feature anyway. */ 1556 + b43_write_probe_resp_template(dev, 0x268, 0x4A, 1557 + &__b43_ratetable[3]); 1558 + wl->beacon0_uploaded = 1; 1559 + } 1560 + 1561 + static void b43_upload_beacon1(struct b43_wldev *dev) 1562 + { 1563 + struct b43_wl *wl = dev->wl; 1564 + 1565 + if (wl->beacon1_uploaded) 1566 + return; 1567 + b43_write_beacon_template(dev, 0x468, 0x1A); 1568 + wl->beacon1_uploaded = 1; 1569 + } 1570 + 1547 1571 static void handle_irq_beacon(struct b43_wldev *dev) 1548 1572 { 1549 1573 struct b43_wl *wl = dev->wl; ··· 1592 1568 return; 1593 1569 } 1594 1570 1595 - if (!beacon0_valid) { 1596 - if (!wl->beacon0_uploaded) { 1597 - b43_write_beacon_template(dev, 0x68, 0x18); 1598 - b43_write_probe_resp_template(dev, 0x268, 0x4A, 1599 - &__b43_ratetable[3]); 1600 - wl->beacon0_uploaded = 1; 1601 - } 1571 + if (unlikely(wl->beacon_templates_virgin)) { 1572 + /* We never uploaded a beacon before. 1573 + * Upload both templates now, but only mark one valid. */ 1574 + wl->beacon_templates_virgin = 0; 1575 + b43_upload_beacon0(dev); 1576 + b43_upload_beacon1(dev); 1602 1577 cmd = b43_read32(dev, B43_MMIO_MACCMD); 1603 1578 cmd |= B43_MACCMD_BEACON0_VALID; 1604 1579 b43_write32(dev, B43_MMIO_MACCMD, cmd); 1605 - } else if (!beacon1_valid) { 1606 - if (!wl->beacon1_uploaded) { 1607 - b43_write_beacon_template(dev, 0x468, 0x1A); 1608 - wl->beacon1_uploaded = 1; 1580 + } else { 1581 + if (!beacon0_valid) { 1582 + b43_upload_beacon0(dev); 1583 + cmd = b43_read32(dev, B43_MMIO_MACCMD); 1584 + cmd |= B43_MACCMD_BEACON0_VALID; 1585 + b43_write32(dev, B43_MMIO_MACCMD, cmd); 1586 + } else if (!beacon1_valid) { 1587 + b43_upload_beacon1(dev); 1588 + cmd = b43_read32(dev, B43_MMIO_MACCMD); 1589 + cmd |= B43_MACCMD_BEACON1_VALID; 1590 + b43_write32(dev, B43_MMIO_MACCMD, cmd); 1609 1591 } 1610 - cmd = b43_read32(dev, B43_MMIO_MACCMD); 1611 - cmd |= B43_MACCMD_BEACON1_VALID; 1612 - b43_write32(dev, B43_MMIO_MACCMD, cmd); 1613 1592 } 1614 1593 } 1615 1594 ··· 4100 4073 wl->filter_flags = 0; 4101 4074 wl->radiotap_enabled = 0; 4102 4075 b43_qos_clear(wl); 4076 + wl->beacon0_uploaded = 0; 4077 + wl->beacon1_uploaded = 0; 4078 + wl->beacon_templates_virgin = 1; 4103 4079 4104 4080 /* First register RFkill. 4105 4081 * LEDs that are registered later depend on it. */ ··· 4271 4241 goto out; 4272 4242 } 4273 4243 } 4274 - out: 4244 + out: 4245 + if (err) 4246 + wl->current_dev = NULL; /* Failed to init the dev. */ 4275 4247 mutex_unlock(&wl->mutex); 4276 4248 if (err) 4277 4249 b43err(wl, "Controller restart FAILED\n"); ··· 4414 4382 struct b43_wldev *wldev; 4415 4383 struct b43_wl *wl; 4416 4384 4385 + /* Do not cancel ieee80211-workqueue based work here. 4386 + * See comment in b43_remove(). */ 4387 + 4417 4388 wldev = ssb_get_drvdata(dev); 4418 4389 wl = wldev->wl; 4419 - cancel_work_sync(&wldev->restart_work); 4420 4390 b43_debugfs_remove_device(wldev); 4421 4391 b43_wireless_core_detach(wldev); 4422 4392 list_del(&wldev->list); ··· 4602 4568 { 4603 4569 struct b43_wl *wl = ssb_get_devtypedata(dev); 4604 4570 struct b43_wldev *wldev = ssb_get_drvdata(dev); 4571 + 4572 + /* We must cancel any work here before unregistering from ieee80211, 4573 + * as the ieee80211 unreg will destroy the workqueue. */ 4574 + cancel_work_sync(&wldev->restart_work); 4605 4575 4606 4576 B43_WARN_ON(!wl); 4607 4577 if (wl->current_dev == wldev)
+1 -2
drivers/net/wireless/iwlwifi/iwl-4965-rs.c
··· 1162 1162 1163 1163 /* Higher rate not available, use the original */ 1164 1164 } else { 1165 - new_rate = rate; 1166 1165 break; 1167 1166 } 1168 1167 } ··· 2008 2009 * 2) Not just finishing up a search 2009 2010 * 3) Allowing a new search 2010 2011 */ 2011 - if (!update_lq && !done_search && !lq_sta->stay_in_tbl) { 2012 + if (!update_lq && !done_search && !lq_sta->stay_in_tbl && window->counter) { 2012 2013 /* Save current throughput to compare with "search" throughput*/ 2013 2014 lq_sta->last_tpt = current_tpt; 2014 2015
+63 -2
drivers/net/wireless/rndis_wlan.c
··· 116 116 #define OID_802_11_ENCRYPTION_STATUS ccpu2(0x0d01011b) 117 117 #define OID_802_11_ADD_KEY ccpu2(0x0d01011d) 118 118 #define OID_802_11_REMOVE_KEY ccpu2(0x0d01011e) 119 + #define OID_802_11_ASSOCIATION_INFORMATION ccpu2(0x0d01011f) 119 120 #define OID_802_11_PMKID ccpu2(0x0d010123) 120 121 #define OID_802_11_NETWORK_TYPES_SUPPORTED ccpu2(0x0d010203) 121 122 #define OID_802_11_NETWORK_TYPE_IN_USE ccpu2(0x0d010204) ··· 270 269 __le32 type; 271 270 __le32 value_offs; 272 271 __le32 value_length; 272 + } __attribute__((packed)); 273 + 274 + struct ndis_80211_assoc_info { 275 + __le32 length; 276 + __le16 req_ies; 277 + struct req_ie { 278 + __le16 capa; 279 + __le16 listen_interval; 280 + u8 cur_ap_address[6]; 281 + } req_ie; 282 + __le32 req_ie_length; 283 + __le32 offset_req_ies; 284 + __le16 resp_ies; 285 + struct resp_ie { 286 + __le16 capa; 287 + __le16 status_code; 288 + __le16 assoc_id; 289 + } resp_ie; 290 + __le32 resp_ie_length; 291 + __le32 offset_resp_ies; 273 292 } __attribute__((packed)); 274 293 275 294 /* these have to match what is in wpa_supplicant */ ··· 695 674 return ret; 696 675 } 697 676 677 + static int get_association_info(struct usbnet *usbdev, 678 + struct ndis_80211_assoc_info *info, int len) 679 + { 680 + return rndis_query_oid(usbdev, OID_802_11_ASSOCIATION_INFORMATION, 681 + info, &len); 682 + } 698 683 699 684 static int is_associated(struct usbnet *usbdev) 700 685 { ··· 2209 2182 struct usbnet *usbdev = priv->usbdev; 2210 2183 union iwreq_data evt; 2211 2184 unsigned char bssid[ETH_ALEN]; 2212 - int ret; 2185 + struct ndis_80211_assoc_info *info; 2186 + int assoc_size = sizeof(*info) + IW_CUSTOM_MAX + 32; 2187 + int ret, offset; 2213 2188 2214 2189 if (test_and_clear_bit(WORK_CONNECTION_EVENT, &priv->work_pending)) { 2215 - ret = get_bssid(usbdev, bssid); 2190 + info = kzalloc(assoc_size, GFP_KERNEL); 2191 + if (!info) 2192 + goto get_bssid; 2216 2193 2194 + /* Get association info IEs from device and send them back to 2195 + * userspace. */ 2196 + ret = get_association_info(usbdev, info, assoc_size); 2197 + if (!ret) { 2198 + evt.data.length = le32_to_cpu(info->req_ie_length); 2199 + if (evt.data.length > 0) { 2200 + offset = le32_to_cpu(info->offset_req_ies); 2201 + wireless_send_event(usbdev->net, 2202 + IWEVASSOCREQIE, &evt, 2203 + (char *)info + offset); 2204 + } 2205 + 2206 + evt.data.length = le32_to_cpu(info->resp_ie_length); 2207 + if (evt.data.length > 0) { 2208 + offset = le32_to_cpu(info->offset_resp_ies); 2209 + wireless_send_event(usbdev->net, 2210 + IWEVASSOCRESPIE, &evt, 2211 + (char *)info + offset); 2212 + } 2213 + } 2214 + 2215 + kfree(info); 2216 + 2217 + get_bssid: 2218 + ret = get_bssid(usbdev, bssid); 2217 2219 if (!ret) { 2218 2220 evt.data.flags = 0; 2219 2221 evt.data.length = 0; ··· 2469 2413 priv->param_power_save = 0; 2470 2414 else if (priv->param_power_save > 2) 2471 2415 priv->param_power_save = 2; 2416 + 2417 + if (priv->param_power_output < 0) 2418 + priv->param_power_output = 0; 2419 + else if (priv->param_power_output > 3) 2420 + priv->param_power_output = 3; 2472 2421 2473 2422 if (priv->param_roamtrigger < -80) 2474 2423 priv->param_roamtrigger = -80;
+5
drivers/net/wireless/rt2x00/rt2x00.h
··· 328 328 return DEFAULT_RSSI; 329 329 } 330 330 331 + static inline void rt2x00_reset_link_ant_rssi(struct link *link) 332 + { 333 + link->ant.rssi_ant = 0; 334 + } 335 + 331 336 static inline int rt2x00_get_link_ant_rssi_history(struct link *link, 332 337 enum antenna ant) 333 338 {
+1
drivers/net/wireless/rt2x00/rt2x00config.c
··· 129 129 */ 130 130 rt2x00dev->ops->lib->config(rt2x00dev, &libconf, CONFIG_UPDATE_ANTENNA); 131 131 rt2x00lib_reset_link_tuner(rt2x00dev); 132 + rt2x00_reset_link_ant_rssi(&rt2x00dev->link); 132 133 133 134 rt2x00dev->link.ant.active.rx = libconf.ant.rx; 134 135 rt2x00dev->link.ant.active.tx = libconf.ant.tx;
+4 -4
drivers/net/wireless/rt2x00/rt2x00dev.c
··· 483 483 if (!test_bit(DEVICE_ENABLED_RADIO, &rt2x00dev->flags)) 484 484 return; 485 485 486 - ieee80211_iterate_active_interfaces(rt2x00dev->hw, 487 - rt2x00lib_beacondone_iter, 488 - rt2x00dev); 486 + ieee80211_iterate_active_interfaces_atomic(rt2x00dev->hw, 487 + rt2x00lib_beacondone_iter, 488 + rt2x00dev); 489 489 490 490 queue_work(rt2x00dev->hw->workqueue, &rt2x00dev->intf_work); 491 491 } ··· 507 507 * Update TX statistics. 508 508 */ 509 509 rt2x00dev->link.qual.tx_success += success; 510 - rt2x00dev->link.qual.tx_failed += txdesc->retry + fail; 510 + rt2x00dev->link.qual.tx_failed += fail; 511 511 512 512 /* 513 513 * Initialize TX status
+1
drivers/net/wireless/rt2x00/rt2x00mac.c
··· 93 93 */ 94 94 if (!test_bit(DEVICE_PRESENT, &rt2x00dev->flags)) { 95 95 ieee80211_stop_queues(hw); 96 + dev_kfree_skb_any(skb); 96 97 return NETDEV_TX_OK; 97 98 } 98 99
+1 -1
drivers/net/wireless/rtl8180_grf5101.c
··· 88 88 write_grf5101(dev, 0x0B, chan); 89 89 write_grf5101(dev, 0x07, 0x1000); 90 90 91 - grf5101_write_phy_antenna(dev, chan); 91 + grf5101_write_phy_antenna(dev, channel); 92 92 } 93 93 94 94 static void grf5101_rf_stop(struct ieee80211_hw *dev)
+3 -2
drivers/net/wireless/rtl8180_max2820.c
··· 78 78 struct ieee80211_conf *conf) 79 79 { 80 80 struct rtl8180_priv *priv = dev->priv; 81 - int channel = ieee80211_frequency_to_channel(conf->channel->center_freq); 81 + int channel = conf ? 82 + ieee80211_frequency_to_channel(conf->channel->center_freq) : 1; 82 83 unsigned int chan_idx = channel - 1; 83 84 u32 txpw = priv->channels[chan_idx].hw_value & 0xFF; 84 85 u32 chan = max2820_chan[chan_idx]; ··· 88 87 * sa2400, for MAXIM we do this directly from BB */ 89 88 rtl8180_write_phy(dev, 3, txpw); 90 89 91 - max2820_write_phy_antenna(dev, chan); 90 + max2820_write_phy_antenna(dev, channel); 92 91 write_max2820(dev, 3, chan); 93 92 } 94 93
+1 -1
drivers/net/wireless/rtl8180_sa2400.c
··· 86 86 87 87 write_sa2400(dev, 7, txpw); 88 88 89 - sa2400_write_phy_antenna(dev, chan); 89 + sa2400_write_phy_antenna(dev, channel); 90 90 91 91 write_sa2400(dev, 0, chan); 92 92 write_sa2400(dev, 1, 0xbb50);
+1 -1
net/bluetooth/rfcomm/core.c
··· 423 423 424 424 rfcomm_dlc_lock(d); 425 425 d->state = BT_CLOSED; 426 - rfcomm_dlc_unlock(d); 427 426 d->state_change(d, err); 427 + rfcomm_dlc_unlock(d); 428 428 429 429 skb_queue_purge(&d->tx_queue); 430 430 rfcomm_dlc_unlink(d);
+4 -9
net/dccp/ccids/ccid3.c
··· 193 193 194 194 /* 195 195 * Update Window Counter using the algorithm from [RFC 4342, 8.1]. 196 - * The algorithm is not applicable if RTT < 4 microseconds. 196 + * As elsewhere, RTT > 0 is assumed by using dccp_sample_rtt(). 197 197 */ 198 198 static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, 199 199 ktime_t now) 200 200 { 201 - u32 quarter_rtts; 202 - 203 - if (unlikely(hctx->ccid3hctx_rtt < 4)) /* avoid divide-by-zero */ 204 - return; 205 - 206 - quarter_rtts = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count); 207 - quarter_rtts /= hctx->ccid3hctx_rtt / 4; 201 + u32 delta = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count), 202 + quarter_rtts = (4 * delta) / hctx->ccid3hctx_rtt; 208 203 209 204 if (quarter_rtts > 0) { 210 205 hctx->ccid3hctx_t_last_win_count = now; 211 - hctx->ccid3hctx_last_win_count += min_t(u32, quarter_rtts, 5); 206 + hctx->ccid3hctx_last_win_count += min(quarter_rtts, 5U); 212 207 hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ 213 208 } 214 209 }
+2 -2
net/dccp/ipv4.c
··· 739 739 * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet 740 740 * has short sequence numbers), drop packet and return 741 741 */ 742 - if (dh->dccph_type >= DCCP_PKT_DATA && 743 - dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) { 742 + if ((dh->dccph_type < DCCP_PKT_DATA || 743 + dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) { 744 744 DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", 745 745 dccp_packet_name(dh->dccph_type)); 746 746 return 1;
+5 -5
net/llc/llc_sap.c
··· 286 286 * 287 287 * Sends received pdus to the sap state machine. 288 288 */ 289 - static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb) 289 + static void llc_sap_rcv(struct llc_sap *sap, struct sk_buff *skb, 290 + struct sock *sk) 290 291 { 291 292 struct llc_sap_state_ev *ev = llc_sap_ev(skb); 292 293 293 294 ev->type = LLC_SAP_EV_TYPE_PDU; 294 295 ev->reason = 0; 296 + skb->sk = sk; 295 297 llc_sap_state_process(sap, skb); 296 298 } 297 299 ··· 362 360 break; 363 361 364 362 sock_hold(sk); 365 - skb_set_owner_r(skb1, sk); 366 - llc_sap_rcv(sap, skb1); 363 + llc_sap_rcv(sap, skb1, sk); 367 364 sock_put(sk); 368 365 } 369 366 read_unlock_bh(&sap->sk_list.lock); ··· 382 381 } else { 383 382 struct sock *sk = llc_lookup_dgram(sap, &laddr); 384 383 if (sk) { 385 - skb_set_owner_r(skb, sk); 386 - llc_sap_rcv(sap, skb); 384 + llc_sap_rcv(sap, skb, sk); 387 385 sock_put(sk); 388 386 } else 389 387 kfree_skb(skb);
+2 -2
net/mac80211/cfg.c
··· 672 672 if (params->vlan) { 673 673 sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); 674 674 675 - if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN || 675 + if (sdata->vif.type != IEEE80211_IF_TYPE_VLAN && 676 676 sdata->vif.type != IEEE80211_IF_TYPE_AP) 677 677 return -EINVAL; 678 678 } else ··· 760 760 if (params->vlan && params->vlan != sta->sdata->dev) { 761 761 vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); 762 762 763 - if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN || 763 + if (vlansdata->vif.type != IEEE80211_IF_TYPE_VLAN && 764 764 vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { 765 765 rcu_read_unlock(); 766 766 return -EINVAL;
+1 -1
net/mac80211/main.c
··· 1313 1313 /* 1314 1314 * Clear the TX filter mask for this STA when sending the next 1315 1315 * packet. If the STA went to power save mode, this will happen 1316 - * happen when it wakes up for the next time. 1316 + * when it wakes up for the next time. 1317 1317 */ 1318 1318 sta->flags |= WLAN_STA_CLEAR_PS_FILT; 1319 1319
+18 -15
net/mac80211/mlme.c
··· 1325 1325 1326 1326 /* prepare reordering buffer */ 1327 1327 tid_agg_rx->reorder_buf = 1328 - kmalloc(buf_size * sizeof(struct sk_buf *), GFP_ATOMIC); 1328 + kmalloc(buf_size * sizeof(struct sk_buff *), GFP_ATOMIC); 1329 1329 if (!tid_agg_rx->reorder_buf) { 1330 1330 if (net_ratelimit()) 1331 1331 printk(KERN_ERR "can not allocate reordering buffer " ··· 1334 1334 goto end; 1335 1335 } 1336 1336 memset(tid_agg_rx->reorder_buf, 0, 1337 - buf_size * sizeof(struct sk_buf *)); 1337 + buf_size * sizeof(struct sk_buff *)); 1338 1338 1339 1339 if (local->ops->ampdu_action) 1340 1340 ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, ··· 1614 1614 * only one argument, and both sta_info and TID are needed, so init 1615 1615 * flow in sta_info_create gives the TID as data, while the timer_to_id 1616 1616 * array gives the sta through container_of */ 1617 - u16 tid = *(int *)data; 1617 + u16 tid = *(u8 *)data; 1618 1618 struct sta_info *temp_sta = container_of((void *)data, 1619 1619 struct sta_info, timer_to_tid[tid]); 1620 1620 ··· 1662 1662 void sta_rx_agg_session_timer_expired(unsigned long data) 1663 1663 { 1664 1664 /* not an elegant detour, but there is no choice as the timer passes 1665 - * only one argument, and verious sta_info are needed here, so init 1665 + * only one argument, and various sta_info are needed here, so init 1666 1666 * flow in sta_info_create gives the TID as data, while the timer_to_id 1667 1667 * array gives the sta through container_of */ 1668 1668 u8 *ptid = (u8 *)data; ··· 2478 2478 2479 2479 ifsta->state = IEEE80211_IBSS_JOINED; 2480 2480 mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); 2481 - 2482 - ieee80211_rx_bss_put(dev, bss); 2483 2481 2484 2482 return res; 2485 2483 } ··· 3521 3523 struct ieee80211_supported_band *sband; 3522 3524 u8 bssid[ETH_ALEN], *pos; 3523 3525 int i; 3526 + int ret; 3524 3527 DECLARE_MAC_BUF(mac); 3525 3528 3526 3529 #if 0 ··· 3566 3567 *pos++ = (u8) (rate / 5); 3567 3568 } 3568 3569 3569 - return ieee80211_sta_join_ibss(dev, ifsta, bss); 3570 + ret = ieee80211_sta_join_ibss(dev, ifsta, bss); 3571 + ieee80211_rx_bss_put(dev, bss); 3572 + return ret; 3570 3573 } 3571 3574 3572 3575 ··· 3616 3615 (bss = ieee80211_rx_bss_get(dev, bssid, 3617 3616 local->hw.conf.channel->center_freq, 3618 3617 ifsta->ssid, ifsta->ssid_len))) { 3618 + int ret; 3619 3619 printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" 3620 3620 " based on configured SSID\n", 3621 3621 dev->name, print_mac(mac, bssid)); 3622 - return ieee80211_sta_join_ibss(dev, ifsta, bss); 3622 + ret = ieee80211_sta_join_ibss(dev, ifsta, bss); 3623 + ieee80211_rx_bss_put(dev, bss); 3624 + return ret; 3623 3625 } 3624 3626 #ifdef CONFIG_MAC80211_IBSS_DEBUG 3625 3627 printk(KERN_DEBUG " did not try to join ibss\n"); ··· 4099 4095 4100 4096 memset(&iwe, 0, sizeof(iwe)); 4101 4097 iwe.cmd = SIOCGIWFREQ; 4102 - iwe.u.freq.m = bss->freq; 4103 - iwe.u.freq.e = 6; 4104 - current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, 4105 - IW_EV_FREQ_LEN); 4106 - 4107 - memset(&iwe, 0, sizeof(iwe)); 4108 - iwe.cmd = SIOCGIWFREQ; 4109 4098 iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); 4110 4099 iwe.u.freq.e = 0; 4111 4100 current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, 4112 4101 IW_EV_FREQ_LEN); 4113 4102 4103 + memset(&iwe, 0, sizeof(iwe)); 4104 + iwe.cmd = SIOCGIWFREQ; 4105 + iwe.u.freq.m = bss->freq; 4106 + iwe.u.freq.e = 6; 4107 + current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, 4108 + IW_EV_FREQ_LEN); 4114 4109 memset(&iwe, 0, sizeof(iwe)); 4115 4110 iwe.cmd = IWEVQUAL; 4116 4111 iwe.u.qual.qual = bss->signal;
+2 -2
net/mac80211/rx.c
··· 1091 1091 u16 fc, hdrlen, ethertype; 1092 1092 u8 *payload; 1093 1093 u8 dst[ETH_ALEN]; 1094 - u8 src[ETH_ALEN]; 1094 + u8 src[ETH_ALEN] __aligned(2); 1095 1095 struct sk_buff *skb = rx->skb; 1096 1096 struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); 1097 1097 DECLARE_MAC_BUF(mac); ··· 1234 1234 */ 1235 1235 static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) 1236 1236 { 1237 - static const u8 pae_group_addr[ETH_ALEN] 1237 + static const u8 pae_group_addr[ETH_ALEN] __aligned(2) 1238 1238 = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; 1239 1239 struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; 1240 1240
+2 -2
net/mac80211/util.c
··· 34 34 35 35 /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ 36 36 /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ 37 - const unsigned char rfc1042_header[] = 37 + const unsigned char rfc1042_header[] __aligned(2) = 38 38 { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; 39 39 40 40 /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ 41 - const unsigned char bridge_tunnel_header[] = 41 + const unsigned char bridge_tunnel_header[] __aligned(2) = 42 42 { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; 43 43 44 44
+8 -3
net/mac80211/wext.c
··· 489 489 sdata = IEEE80211_DEV_TO_SUB_IF(dev); 490 490 if (sdata->vif.type == IEEE80211_IF_TYPE_STA || 491 491 sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { 492 - ap_addr->sa_family = ARPHRD_ETHER; 493 - memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); 494 - return 0; 492 + if (sdata->u.sta.state == IEEE80211_ASSOCIATED) { 493 + ap_addr->sa_family = ARPHRD_ETHER; 494 + memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); 495 + return 0; 496 + } else { 497 + memset(&ap_addr->sa_data, 0, ETH_ALEN); 498 + return 0; 499 + } 495 500 } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { 496 501 ap_addr->sa_family = ARPHRD_ETHER; 497 502 memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN);
+2 -2
net/netfilter/nf_conntrack_expect.c
··· 587 587 return 0; 588 588 589 589 err3: 590 + kmem_cache_destroy(nf_ct_expect_cachep); 591 + err2: 590 592 nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, 591 593 nf_ct_expect_hsize); 592 - err2: 593 - kmem_cache_destroy(nf_ct_expect_cachep); 594 594 err1: 595 595 return err; 596 596 }