diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-30 10:45:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-05-30 10:45:20 -0400 |
commit | 1beee8dc8cf58e3f605bd7b34d7a39939be7d8d2 (patch) | |
tree | 85183db61290ef9e8e1c25d7ffb9d8d53acb1766 /net | |
parent | 9db8ee3d96e98705ba4e9260815ca326b0d07741 (diff) | |
parent | 3446b9d57edd0b96a89715fef222879e4919a115 (diff) |
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
...
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/rfcomm/core.c | 2 | ||||
-rw-r--r-- | net/dccp/ccids/ccid3.c | 13 | ||||
-rw-r--r-- | net/dccp/ipv4.c | 4 | ||||
-rw-r--r-- | net/llc/llc_sap.c | 10 | ||||
-rw-r--r-- | net/mac80211/cfg.c | 4 | ||||
-rw-r--r-- | net/mac80211/main.c | 2 | ||||
-rw-r--r-- | net/mac80211/mlme.c | 29 | ||||
-rw-r--r-- | net/mac80211/rx.c | 4 | ||||
-rw-r--r-- | net/mac80211/util.c | 4 | ||||
-rw-r--r-- | net/mac80211/wext.c | 11 | ||||
-rw-r--r-- | net/netfilter/nf_conntrack_expect.c | 4 |
11 files changed, 45 insertions, 42 deletions
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index eb62558e9b09..0c2c93735e93 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -423,8 +423,8 @@ static int __rfcomm_dlc_close(struct rfcomm_dlc *d, int err) | |||
423 | 423 | ||
424 | rfcomm_dlc_lock(d); | 424 | rfcomm_dlc_lock(d); |
425 | d->state = BT_CLOSED; | 425 | d->state = BT_CLOSED; |
426 | rfcomm_dlc_unlock(d); | ||
427 | d->state_change(d, err); | 426 | d->state_change(d, err); |
427 | rfcomm_dlc_unlock(d); | ||
428 | 428 | ||
429 | skb_queue_purge(&d->tx_queue); | 429 | skb_queue_purge(&d->tx_queue); |
430 | rfcomm_dlc_unlink(d); | 430 | rfcomm_dlc_unlink(d); |
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c index cd61dea2eea1..f813077234b7 100644 --- a/net/dccp/ccids/ccid3.c +++ b/net/dccp/ccids/ccid3.c | |||
@@ -193,22 +193,17 @@ static inline void ccid3_hc_tx_update_s(struct ccid3_hc_tx_sock *hctx, int len) | |||
193 | 193 | ||
194 | /* | 194 | /* |
195 | * Update Window Counter using the algorithm from [RFC 4342, 8.1]. | 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 | static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, | 198 | static inline void ccid3_hc_tx_update_win_count(struct ccid3_hc_tx_sock *hctx, |
199 | ktime_t now) | 199 | ktime_t now) |
200 | { | 200 | { |
201 | u32 quarter_rtts; | 201 | u32 delta = ktime_us_delta(now, hctx->ccid3hctx_t_last_win_count), |
202 | 202 | quarter_rtts = (4 * delta) / hctx->ccid3hctx_rtt; | |
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; | ||
208 | 203 | ||
209 | if (quarter_rtts > 0) { | 204 | if (quarter_rtts > 0) { |
210 | hctx->ccid3hctx_t_last_win_count = now; | 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 | hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ | 207 | hctx->ccid3hctx_last_win_count &= 0xF; /* mod 16 */ |
213 | } | 208 | } |
214 | } | 209 | } |
diff --git a/net/dccp/ipv4.c b/net/dccp/ipv4.c index b348dd70c685..c22a3780c14e 100644 --- a/net/dccp/ipv4.c +++ b/net/dccp/ipv4.c | |||
@@ -739,8 +739,8 @@ int dccp_invalid_packet(struct sk_buff *skb) | |||
739 | * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet | 739 | * If P.type is not Data, Ack, or DataAck and P.X == 0 (the packet |
740 | * has short sequence numbers), drop packet and return | 740 | * has short sequence numbers), drop packet and return |
741 | */ | 741 | */ |
742 | if (dh->dccph_type >= DCCP_PKT_DATA && | 742 | if ((dh->dccph_type < DCCP_PKT_DATA || |
743 | dh->dccph_type <= DCCP_PKT_DATAACK && dh->dccph_x == 0) { | 743 | dh->dccph_type > DCCP_PKT_DATAACK) && dh->dccph_x == 0) { |
744 | DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", | 744 | DCCP_WARN("P.type (%s) not Data || [Data]Ack, while P.X == 0\n", |
745 | dccp_packet_name(dh->dccph_type)); | 745 | dccp_packet_name(dh->dccph_type)); |
746 | return 1; | 746 | return 1; |
diff --git a/net/llc/llc_sap.c b/net/llc/llc_sap.c index e2ddde755019..008de1fc42ca 100644 --- a/net/llc/llc_sap.c +++ b/net/llc/llc_sap.c | |||
@@ -286,12 +286,14 @@ void llc_build_and_send_xid_pkt(struct llc_sap *sap, struct sk_buff *skb, | |||
286 | * | 286 | * |
287 | * Sends received pdus to the sap state machine. | 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 | struct llc_sap_state_ev *ev = llc_sap_ev(skb); | 292 | struct llc_sap_state_ev *ev = llc_sap_ev(skb); |
292 | 293 | ||
293 | ev->type = LLC_SAP_EV_TYPE_PDU; | 294 | ev->type = LLC_SAP_EV_TYPE_PDU; |
294 | ev->reason = 0; | 295 | ev->reason = 0; |
296 | skb->sk = sk; | ||
295 | llc_sap_state_process(sap, skb); | 297 | llc_sap_state_process(sap, skb); |
296 | } | 298 | } |
297 | 299 | ||
@@ -360,8 +362,7 @@ static void llc_sap_mcast(struct llc_sap *sap, | |||
360 | break; | 362 | break; |
361 | 363 | ||
362 | sock_hold(sk); | 364 | sock_hold(sk); |
363 | skb_set_owner_r(skb1, sk); | 365 | llc_sap_rcv(sap, skb1, sk); |
364 | llc_sap_rcv(sap, skb1); | ||
365 | sock_put(sk); | 366 | sock_put(sk); |
366 | } | 367 | } |
367 | read_unlock_bh(&sap->sk_list.lock); | 368 | read_unlock_bh(&sap->sk_list.lock); |
@@ -381,8 +382,7 @@ void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb) | |||
381 | } else { | 382 | } else { |
382 | struct sock *sk = llc_lookup_dgram(sap, &laddr); | 383 | struct sock *sk = llc_lookup_dgram(sap, &laddr); |
383 | if (sk) { | 384 | if (sk) { |
384 | skb_set_owner_r(skb, sk); | 385 | llc_sap_rcv(sap, skb, sk); |
385 | llc_sap_rcv(sap, skb); | ||
386 | sock_put(sk); | 386 | sock_put(sk); |
387 | } else | 387 | } else |
388 | kfree_skb(skb); | 388 | kfree_skb(skb); |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 699d97b8de5e..a9fce4afdf21 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -672,7 +672,7 @@ static int ieee80211_add_station(struct wiphy *wiphy, struct net_device *dev, | |||
672 | if (params->vlan) { | 672 | if (params->vlan) { |
673 | sdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 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 | sdata->vif.type != IEEE80211_IF_TYPE_AP) | 676 | sdata->vif.type != IEEE80211_IF_TYPE_AP) |
677 | return -EINVAL; | 677 | return -EINVAL; |
678 | } else | 678 | } else |
@@ -760,7 +760,7 @@ static int ieee80211_change_station(struct wiphy *wiphy, | |||
760 | if (params->vlan && params->vlan != sta->sdata->dev) { | 760 | if (params->vlan && params->vlan != sta->sdata->dev) { |
761 | vlansdata = IEEE80211_DEV_TO_SUB_IF(params->vlan); | 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 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { | 764 | vlansdata->vif.type != IEEE80211_IF_TYPE_AP) { |
765 | rcu_read_unlock(); | 765 | rcu_read_unlock(); |
766 | return -EINVAL; | 766 | return -EINVAL; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 915afadb0602..5c876450b14c 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -1313,7 +1313,7 @@ static void ieee80211_handle_filtered_frame(struct ieee80211_local *local, | |||
1313 | /* | 1313 | /* |
1314 | * Clear the TX filter mask for this STA when sending the next | 1314 | * Clear the TX filter mask for this STA when sending the next |
1315 | * packet. If the STA went to power save mode, this will happen | 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 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; | 1318 | sta->flags |= WLAN_STA_CLEAR_PS_FILT; |
1319 | 1319 | ||
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 7cfd12e0d1e2..841278f1df8e 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1325,7 +1325,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1325 | 1325 | ||
1326 | /* prepare reordering buffer */ | 1326 | /* prepare reordering buffer */ |
1327 | tid_agg_rx->reorder_buf = | 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 | if (!tid_agg_rx->reorder_buf) { | 1329 | if (!tid_agg_rx->reorder_buf) { |
1330 | if (net_ratelimit()) | 1330 | if (net_ratelimit()) |
1331 | printk(KERN_ERR "can not allocate reordering buffer " | 1331 | printk(KERN_ERR "can not allocate reordering buffer " |
@@ -1334,7 +1334,7 @@ static void ieee80211_sta_process_addba_request(struct net_device *dev, | |||
1334 | goto end; | 1334 | goto end; |
1335 | } | 1335 | } |
1336 | memset(tid_agg_rx->reorder_buf, 0, | 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 | if (local->ops->ampdu_action) | 1339 | if (local->ops->ampdu_action) |
1340 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, | 1340 | ret = local->ops->ampdu_action(hw, IEEE80211_AMPDU_RX_START, |
@@ -1614,7 +1614,7 @@ void sta_addba_resp_timer_expired(unsigned long data) | |||
1614 | * only one argument, and both sta_info and TID are needed, so init | 1614 | * only one argument, and both sta_info and TID are needed, so init |
1615 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1615 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1616 | * array gives the sta through container_of */ | 1616 | * array gives the sta through container_of */ |
1617 | u16 tid = *(int *)data; | 1617 | u16 tid = *(u8 *)data; |
1618 | struct sta_info *temp_sta = container_of((void *)data, | 1618 | struct sta_info *temp_sta = container_of((void *)data, |
1619 | struct sta_info, timer_to_tid[tid]); | 1619 | struct sta_info, timer_to_tid[tid]); |
1620 | 1620 | ||
@@ -1662,7 +1662,7 @@ timer_expired_exit: | |||
1662 | void sta_rx_agg_session_timer_expired(unsigned long data) | 1662 | void sta_rx_agg_session_timer_expired(unsigned long data) |
1663 | { | 1663 | { |
1664 | /* not an elegant detour, but there is no choice as the timer passes | 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 | * flow in sta_info_create gives the TID as data, while the timer_to_id | 1666 | * flow in sta_info_create gives the TID as data, while the timer_to_id |
1667 | * array gives the sta through container_of */ | 1667 | * array gives the sta through container_of */ |
1668 | u8 *ptid = (u8 *)data; | 1668 | u8 *ptid = (u8 *)data; |
@@ -2479,8 +2479,6 @@ static int ieee80211_sta_join_ibss(struct net_device *dev, | |||
2479 | ifsta->state = IEEE80211_IBSS_JOINED; | 2479 | ifsta->state = IEEE80211_IBSS_JOINED; |
2480 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); | 2480 | mod_timer(&ifsta->timer, jiffies + IEEE80211_IBSS_MERGE_INTERVAL); |
2481 | 2481 | ||
2482 | ieee80211_rx_bss_put(dev, bss); | ||
2483 | |||
2484 | return res; | 2482 | return res; |
2485 | } | 2483 | } |
2486 | 2484 | ||
@@ -3523,6 +3521,7 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3523 | struct ieee80211_supported_band *sband; | 3521 | struct ieee80211_supported_band *sband; |
3524 | u8 bssid[ETH_ALEN], *pos; | 3522 | u8 bssid[ETH_ALEN], *pos; |
3525 | int i; | 3523 | int i; |
3524 | int ret; | ||
3526 | DECLARE_MAC_BUF(mac); | 3525 | DECLARE_MAC_BUF(mac); |
3527 | 3526 | ||
3528 | #if 0 | 3527 | #if 0 |
@@ -3567,7 +3566,9 @@ static int ieee80211_sta_create_ibss(struct net_device *dev, | |||
3567 | *pos++ = (u8) (rate / 5); | 3566 | *pos++ = (u8) (rate / 5); |
3568 | } | 3567 | } |
3569 | 3568 | ||
3570 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3569 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3570 | ieee80211_rx_bss_put(dev, bss); | ||
3571 | return ret; | ||
3571 | } | 3572 | } |
3572 | 3573 | ||
3573 | 3574 | ||
@@ -3615,10 +3616,13 @@ static int ieee80211_sta_find_ibss(struct net_device *dev, | |||
3615 | (bss = ieee80211_rx_bss_get(dev, bssid, | 3616 | (bss = ieee80211_rx_bss_get(dev, bssid, |
3616 | local->hw.conf.channel->center_freq, | 3617 | local->hw.conf.channel->center_freq, |
3617 | ifsta->ssid, ifsta->ssid_len))) { | 3618 | ifsta->ssid, ifsta->ssid_len))) { |
3619 | int ret; | ||
3618 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" | 3620 | printk(KERN_DEBUG "%s: Selected IBSS BSSID %s" |
3619 | " based on configured SSID\n", | 3621 | " based on configured SSID\n", |
3620 | dev->name, print_mac(mac, bssid)); | 3622 | dev->name, print_mac(mac, bssid)); |
3621 | return ieee80211_sta_join_ibss(dev, ifsta, bss); | 3623 | ret = ieee80211_sta_join_ibss(dev, ifsta, bss); |
3624 | ieee80211_rx_bss_put(dev, bss); | ||
3625 | return ret; | ||
3622 | } | 3626 | } |
3623 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 3627 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
3624 | printk(KERN_DEBUG " did not try to join ibss\n"); | 3628 | printk(KERN_DEBUG " did not try to join ibss\n"); |
@@ -4095,18 +4099,17 @@ ieee80211_sta_scan_result(struct net_device *dev, | |||
4095 | 4099 | ||
4096 | memset(&iwe, 0, sizeof(iwe)); | 4100 | memset(&iwe, 0, sizeof(iwe)); |
4097 | iwe.cmd = SIOCGIWFREQ; | 4101 | iwe.cmd = SIOCGIWFREQ; |
4098 | iwe.u.freq.m = bss->freq; | 4102 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); |
4099 | iwe.u.freq.e = 6; | 4103 | iwe.u.freq.e = 0; |
4100 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4104 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4101 | IW_EV_FREQ_LEN); | 4105 | IW_EV_FREQ_LEN); |
4102 | 4106 | ||
4103 | memset(&iwe, 0, sizeof(iwe)); | 4107 | memset(&iwe, 0, sizeof(iwe)); |
4104 | iwe.cmd = SIOCGIWFREQ; | 4108 | iwe.cmd = SIOCGIWFREQ; |
4105 | iwe.u.freq.m = ieee80211_frequency_to_channel(bss->freq); | 4109 | iwe.u.freq.m = bss->freq; |
4106 | iwe.u.freq.e = 0; | 4110 | iwe.u.freq.e = 6; |
4107 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, | 4111 | current_ev = iwe_stream_add_event(current_ev, end_buf, &iwe, |
4108 | IW_EV_FREQ_LEN); | 4112 | IW_EV_FREQ_LEN); |
4109 | |||
4110 | memset(&iwe, 0, sizeof(iwe)); | 4113 | memset(&iwe, 0, sizeof(iwe)); |
4111 | iwe.cmd = IWEVQUAL; | 4114 | iwe.cmd = IWEVQUAL; |
4112 | iwe.u.qual.qual = bss->signal; | 4115 | iwe.u.qual.qual = bss->signal; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 1958bfb361c6..0941e5d6a522 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -1091,7 +1091,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1091 | u16 fc, hdrlen, ethertype; | 1091 | u16 fc, hdrlen, ethertype; |
1092 | u8 *payload; | 1092 | u8 *payload; |
1093 | u8 dst[ETH_ALEN]; | 1093 | u8 dst[ETH_ALEN]; |
1094 | u8 src[ETH_ALEN]; | 1094 | u8 src[ETH_ALEN] __aligned(2); |
1095 | struct sk_buff *skb = rx->skb; | 1095 | struct sk_buff *skb = rx->skb; |
1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 1096 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
1097 | DECLARE_MAC_BUF(mac); | 1097 | DECLARE_MAC_BUF(mac); |
@@ -1234,7 +1234,7 @@ ieee80211_data_to_8023(struct ieee80211_rx_data *rx) | |||
1234 | */ | 1234 | */ |
1235 | static bool ieee80211_frame_allowed(struct ieee80211_rx_data *rx) | 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 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; | 1238 | = { 0x01, 0x80, 0xC2, 0x00, 0x00, 0x03 }; |
1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; | 1239 | struct ethhdr *ehdr = (struct ethhdr *) rx->skb->data; |
1240 | 1240 | ||
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 131e9e6c8a32..4e97b266f907 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -34,11 +34,11 @@ void *mac80211_wiphy_privid = &mac80211_wiphy_privid; | |||
34 | 34 | ||
35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ | 35 | /* See IEEE 802.1H for LLC/SNAP encapsulation/decapsulation */ |
36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ | 36 | /* Ethernet-II snap header (RFC1042 for most EtherTypes) */ |
37 | const unsigned char rfc1042_header[] = | 37 | const unsigned char rfc1042_header[] __aligned(2) = |
38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; | 38 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 }; |
39 | 39 | ||
40 | /* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */ | 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 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; | 42 | { 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 }; |
43 | 43 | ||
44 | 44 | ||
diff --git a/net/mac80211/wext.c b/net/mac80211/wext.c index 457ebf9e85ae..8311bb24f9f3 100644 --- a/net/mac80211/wext.c +++ b/net/mac80211/wext.c | |||
@@ -489,9 +489,14 @@ static int ieee80211_ioctl_giwap(struct net_device *dev, | |||
489 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 489 | sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
490 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || | 490 | if (sdata->vif.type == IEEE80211_IF_TYPE_STA || |
491 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { | 491 | sdata->vif.type == IEEE80211_IF_TYPE_IBSS) { |
492 | ap_addr->sa_family = ARPHRD_ETHER; | 492 | if (sdata->u.sta.state == IEEE80211_ASSOCIATED) { |
493 | memcpy(&ap_addr->sa_data, sdata->u.sta.bssid, ETH_ALEN); | 493 | ap_addr->sa_family = ARPHRD_ETHER; |
494 | return 0; | 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 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { | 500 | } else if (sdata->vif.type == IEEE80211_IF_TYPE_WDS) { |
496 | ap_addr->sa_family = ARPHRD_ETHER; | 501 | ap_addr->sa_family = ARPHRD_ETHER; |
497 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); | 502 | memcpy(&ap_addr->sa_data, sdata->u.wds.remote_addr, ETH_ALEN); |
diff --git a/net/netfilter/nf_conntrack_expect.c b/net/netfilter/nf_conntrack_expect.c index e31beeb33b2b..e8f0dead267f 100644 --- a/net/netfilter/nf_conntrack_expect.c +++ b/net/netfilter/nf_conntrack_expect.c | |||
@@ -587,10 +587,10 @@ int __init nf_conntrack_expect_init(void) | |||
587 | return 0; | 587 | return 0; |
588 | 588 | ||
589 | err3: | 589 | err3: |
590 | kmem_cache_destroy(nf_ct_expect_cachep); | ||
591 | err2: | ||
590 | nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, | 592 | nf_ct_free_hashtable(nf_ct_expect_hash, nf_ct_expect_vmalloc, |
591 | nf_ct_expect_hsize); | 593 | nf_ct_expect_hsize); |
592 | err2: | ||
593 | kmem_cache_destroy(nf_ct_expect_cachep); | ||
594 | err1: | 594 | err1: |
595 | return err; | 595 | return err; |
596 | } | 596 | } |