diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-30 07:29:27 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2007-11-30 07:29:27 -0500 |
commit | 75e7766680b4b196073bdc941b8a6570b9f777af (patch) | |
tree | 71ce4e83878a3dd9a83559c7d51ec549668cef3a /net | |
parent | b7e0fe9f81e19c4f2a1369b324c3c062c1738be4 (diff) | |
parent | 53cb4791c156908ae634de31949f7f25f8de002b (diff) |
Merge branch 'fixes-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6
Diffstat (limited to 'net')
-rw-r--r-- | net/ieee80211/ieee80211_tx.c | 3 | ||||
-rw-r--r-- | net/mac80211/ieee80211.c | 10 | ||||
-rw-r--r-- | net/mac80211/rx.c | 2 | ||||
-rw-r--r-- | net/mac80211/wep.c | 3 | ||||
-rw-r--r-- | net/rfkill/rfkill.c | 14 |
5 files changed, 17 insertions, 15 deletions
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c index a4c3c51140a3..6d06f1385e28 100644 --- a/net/ieee80211/ieee80211_tx.c +++ b/net/ieee80211/ieee80211_tx.c | |||
@@ -144,7 +144,8 @@ static int ieee80211_copy_snap(u8 * data, u16 h_proto) | |||
144 | snap->oui[1] = oui[1]; | 144 | snap->oui[1] = oui[1]; |
145 | snap->oui[2] = oui[2]; | 145 | snap->oui[2] = oui[2]; |
146 | 146 | ||
147 | *(u16 *) (data + SNAP_SIZE) = htons(h_proto); | 147 | h_proto = htons(h_proto); |
148 | memcpy(data + SNAP_SIZE, &h_proto, sizeof(u16)); | ||
148 | 149 | ||
149 | return SNAP_SIZE + sizeof(u16); | 150 | return SNAP_SIZE + sizeof(u16); |
150 | } | 151 | } |
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c index 59350b8727ec..505af1f067ab 100644 --- a/net/mac80211/ieee80211.c +++ b/net/mac80211/ieee80211.c | |||
@@ -216,6 +216,7 @@ static int ieee80211_open(struct net_device *dev) | |||
216 | res = local->ops->start(local_to_hw(local)); | 216 | res = local->ops->start(local_to_hw(local)); |
217 | if (res) | 217 | if (res) |
218 | return res; | 218 | return res; |
219 | ieee80211_hw_config(local); | ||
219 | } | 220 | } |
220 | 221 | ||
221 | switch (sdata->type) { | 222 | switch (sdata->type) { |
@@ -232,7 +233,6 @@ static int ieee80211_open(struct net_device *dev) | |||
232 | netif_tx_unlock_bh(local->mdev); | 233 | netif_tx_unlock_bh(local->mdev); |
233 | 234 | ||
234 | local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; | 235 | local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; |
235 | ieee80211_hw_config(local); | ||
236 | } | 236 | } |
237 | break; | 237 | break; |
238 | case IEEE80211_IF_TYPE_STA: | 238 | case IEEE80211_IF_TYPE_STA: |
@@ -334,8 +334,7 @@ static int ieee80211_stop(struct net_device *dev) | |||
334 | ieee80211_configure_filter(local); | 334 | ieee80211_configure_filter(local); |
335 | netif_tx_unlock_bh(local->mdev); | 335 | netif_tx_unlock_bh(local->mdev); |
336 | 336 | ||
337 | local->hw.conf.flags |= IEEE80211_CONF_RADIOTAP; | 337 | local->hw.conf.flags &= ~IEEE80211_CONF_RADIOTAP; |
338 | ieee80211_hw_config(local); | ||
339 | } | 338 | } |
340 | break; | 339 | break; |
341 | case IEEE80211_IF_TYPE_STA: | 340 | case IEEE80211_IF_TYPE_STA: |
@@ -357,6 +356,11 @@ static int ieee80211_stop(struct net_device *dev) | |||
357 | cancel_delayed_work(&local->scan_work); | 356 | cancel_delayed_work(&local->scan_work); |
358 | } | 357 | } |
359 | flush_workqueue(local->hw.workqueue); | 358 | flush_workqueue(local->hw.workqueue); |
359 | |||
360 | sdata->u.sta.flags &= ~IEEE80211_STA_PRIVACY_INVOKED; | ||
361 | kfree(sdata->u.sta.extra_ie); | ||
362 | sdata->u.sta.extra_ie = NULL; | ||
363 | sdata->u.sta.extra_ie_len = 0; | ||
360 | /* fall through */ | 364 | /* fall through */ |
361 | default: | 365 | default: |
362 | conf.if_id = dev->ifindex; | 366 | conf.if_id = dev->ifindex; |
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 428a9fcf57d6..00f908d9275e 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -997,7 +997,7 @@ ieee80211_rx_h_drop_unencrypted(struct ieee80211_txrx_data *rx) | |||
997 | if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) && | 997 | if (unlikely(!(rx->fc & IEEE80211_FCTL_PROTECTED) && |
998 | (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && | 998 | (rx->fc & IEEE80211_FCTL_FTYPE) == IEEE80211_FTYPE_DATA && |
999 | (rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC && | 999 | (rx->fc & IEEE80211_FCTL_STYPE) != IEEE80211_STYPE_NULLFUNC && |
1000 | rx->sdata->drop_unencrypted && | 1000 | (rx->key || rx->sdata->drop_unencrypted) && |
1001 | (rx->sdata->eapol == 0 || !ieee80211_is_eapol(rx->skb)))) { | 1001 | (rx->sdata->eapol == 0 || !ieee80211_is_eapol(rx->skb)))) { |
1002 | if (net_ratelimit()) | 1002 | if (net_ratelimit()) |
1003 | printk(KERN_DEBUG "%s: RX non-WEP frame, but expected " | 1003 | printk(KERN_DEBUG "%s: RX non-WEP frame, but expected " |
diff --git a/net/mac80211/wep.c b/net/mac80211/wep.c index 9bf0e1cc530a..b5f3413403bd 100644 --- a/net/mac80211/wep.c +++ b/net/mac80211/wep.c | |||
@@ -265,7 +265,8 @@ int ieee80211_wep_decrypt(struct ieee80211_local *local, struct sk_buff *skb, | |||
265 | if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen, | 265 | if (ieee80211_wep_decrypt_data(local->wep_rx_tfm, rc4key, klen, |
266 | skb->data + hdrlen + WEP_IV_LEN, | 266 | skb->data + hdrlen + WEP_IV_LEN, |
267 | len)) { | 267 | len)) { |
268 | printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); | 268 | if (net_ratelimit()) |
269 | printk(KERN_DEBUG "WEP decrypt failed (ICV)\n"); | ||
269 | ret = -1; | 270 | ret = -1; |
270 | } | 271 | } |
271 | 272 | ||
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index 73d60a307129..4469a7be006c 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c | |||
@@ -60,11 +60,7 @@ static void rfkill_led_trigger(struct rfkill *rfkill, | |||
60 | static int rfkill_toggle_radio(struct rfkill *rfkill, | 60 | static int rfkill_toggle_radio(struct rfkill *rfkill, |
61 | enum rfkill_state state) | 61 | enum rfkill_state state) |
62 | { | 62 | { |
63 | int retval; | 63 | int retval = 0; |
64 | |||
65 | retval = mutex_lock_interruptible(&rfkill->mutex); | ||
66 | if (retval) | ||
67 | return retval; | ||
68 | 64 | ||
69 | if (state != rfkill->state) { | 65 | if (state != rfkill->state) { |
70 | retval = rfkill->toggle_radio(rfkill->data, state); | 66 | retval = rfkill->toggle_radio(rfkill->data, state); |
@@ -74,7 +70,6 @@ static int rfkill_toggle_radio(struct rfkill *rfkill, | |||
74 | } | 70 | } |
75 | } | 71 | } |
76 | 72 | ||
77 | mutex_unlock(&rfkill->mutex); | ||
78 | return retval; | 73 | return retval; |
79 | } | 74 | } |
80 | 75 | ||
@@ -158,12 +153,13 @@ static ssize_t rfkill_state_store(struct device *dev, | |||
158 | if (!capable(CAP_NET_ADMIN)) | 153 | if (!capable(CAP_NET_ADMIN)) |
159 | return -EPERM; | 154 | return -EPERM; |
160 | 155 | ||
156 | if (mutex_lock_interruptible(&rfkill->mutex)) | ||
157 | return -ERESTARTSYS; | ||
161 | error = rfkill_toggle_radio(rfkill, | 158 | error = rfkill_toggle_radio(rfkill, |
162 | state ? RFKILL_STATE_ON : RFKILL_STATE_OFF); | 159 | state ? RFKILL_STATE_ON : RFKILL_STATE_OFF); |
163 | if (error) | 160 | mutex_unlock(&rfkill->mutex); |
164 | return error; | ||
165 | 161 | ||
166 | return count; | 162 | return error ? error : count; |
167 | } | 163 | } |
168 | 164 | ||
169 | static ssize_t rfkill_claim_show(struct device *dev, | 165 | static ssize_t rfkill_claim_show(struct device *dev, |