aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-11-30 06:01:04 -0500
committerJeff Garzik <jeff@garzik.org>2006-11-30 06:01:04 -0500
commitc1cb0b77f905a2f5f297e91fafbe766acc143891 (patch)
tree64fdce32842a8fd0d0765745df7aaf207e34b07f
parentf2b67c7945e8d709444884633670fef498218639 (diff)
parenta88556a4b24baff99f5d2a2a05202c4aca44ea05 (diff)
Merge branch 'upstream-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 into upstream-fixes
-rw-r--r--drivers/net/wireless/zd1211rw/zd_ieee80211.h2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c2
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.h4
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.c26
-rw-r--r--drivers/net/wireless/zd1211rw/zd_usb.h14
-rw-r--r--net/ieee80211/ieee80211_tx.c4
-rw-r--r--net/ieee80211/softmac/ieee80211softmac_scan.c2
7 files changed, 26 insertions, 28 deletions
diff --git a/drivers/net/wireless/zd1211rw/zd_ieee80211.h b/drivers/net/wireless/zd1211rw/zd_ieee80211.h
index f63245b0d966..36329890dfec 100644
--- a/drivers/net/wireless/zd1211rw/zd_ieee80211.h
+++ b/drivers/net/wireless/zd1211rw/zd_ieee80211.h
@@ -64,7 +64,7 @@ struct cck_plcp_header {
64 u8 service; 64 u8 service;
65 __le16 length; 65 __le16 length;
66 __le16 crc16; 66 __le16 crc16;
67}; 67} __attribute__((packed));
68 68
69static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header) 69static inline u8 zd_cck_plcp_header_rate(const struct cck_plcp_header *header)
70{ 70{
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index a7d29bddb298..e5fedf968c19 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -721,7 +721,7 @@ struct zd_rt_hdr {
721 u8 rt_rate; 721 u8 rt_rate;
722 u16 rt_channel; 722 u16 rt_channel;
723 u16 rt_chbitmask; 723 u16 rt_chbitmask;
724}; 724} __attribute__((packed));
725 725
726static void fill_rt_header(void *buffer, struct zd_mac *mac, 726static void fill_rt_header(void *buffer, struct zd_mac *mac,
727 const struct ieee80211_rx_stats *stats, 727 const struct ieee80211_rx_stats *stats,
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.h b/drivers/net/wireless/zd1211rw/zd_mac.h
index b8ea3de7924a..e4dd40a6fec3 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.h
+++ b/drivers/net/wireless/zd1211rw/zd_mac.h
@@ -82,7 +82,7 @@ struct zd_ctrlset {
82struct rx_length_info { 82struct rx_length_info {
83 __le16 length[3]; 83 __le16 length[3];
84 __le16 tag; 84 __le16 tag;
85}; 85} __attribute__((packed));
86 86
87#define RX_LENGTH_INFO_TAG 0x697e 87#define RX_LENGTH_INFO_TAG 0x697e
88 88
@@ -93,7 +93,7 @@ struct rx_status {
93 u8 signal_quality_ofdm; 93 u8 signal_quality_ofdm;
94 u8 decryption_type; 94 u8 decryption_type;
95 u8 frame_status; 95 u8 frame_status;
96}; 96} __attribute__((packed));
97 97
98/* rx_status field decryption_type */ 98/* rx_status field decryption_type */
99#define ZD_RX_NO_WEP 0 99#define ZD_RX_NO_WEP 0
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.c b/drivers/net/wireless/zd1211rw/zd_usb.c
index 3faaeb2b7c89..a15b09549245 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.c
+++ b/drivers/net/wireless/zd1211rw/zd_usb.c
@@ -366,15 +366,6 @@ error:
366 return r; 366 return r;
367} 367}
368 368
369static void disable_read_regs_int(struct zd_usb *usb)
370{
371 struct zd_usb_interrupt *intr = &usb->intr;
372
373 spin_lock(&intr->lock);
374 intr->read_regs_enabled = 0;
375 spin_unlock(&intr->lock);
376}
377
378#define urb_dev(urb) (&(urb)->dev->dev) 369#define urb_dev(urb) (&(urb)->dev->dev)
379 370
380static inline void handle_regs_int(struct urb *urb) 371static inline void handle_regs_int(struct urb *urb)
@@ -1156,10 +1147,19 @@ static void prepare_read_regs_int(struct zd_usb *usb)
1156{ 1147{
1157 struct zd_usb_interrupt *intr = &usb->intr; 1148 struct zd_usb_interrupt *intr = &usb->intr;
1158 1149
1159 spin_lock(&intr->lock); 1150 spin_lock_irq(&intr->lock);
1160 intr->read_regs_enabled = 1; 1151 intr->read_regs_enabled = 1;
1161 INIT_COMPLETION(intr->read_regs.completion); 1152 INIT_COMPLETION(intr->read_regs.completion);
1162 spin_unlock(&intr->lock); 1153 spin_unlock_irq(&intr->lock);
1154}
1155
1156static void disable_read_regs_int(struct zd_usb *usb)
1157{
1158 struct zd_usb_interrupt *intr = &usb->intr;
1159
1160 spin_lock_irq(&intr->lock);
1161 intr->read_regs_enabled = 0;
1162 spin_unlock_irq(&intr->lock);
1163} 1163}
1164 1164
1165static int get_results(struct zd_usb *usb, u16 *values, 1165static int get_results(struct zd_usb *usb, u16 *values,
@@ -1171,7 +1171,7 @@ static int get_results(struct zd_usb *usb, u16 *values,
1171 struct read_regs_int *rr = &intr->read_regs; 1171 struct read_regs_int *rr = &intr->read_regs;
1172 struct usb_int_regs *regs = (struct usb_int_regs *)rr->buffer; 1172 struct usb_int_regs *regs = (struct usb_int_regs *)rr->buffer;
1173 1173
1174 spin_lock(&intr->lock); 1174 spin_lock_irq(&intr->lock);
1175 1175
1176 r = -EIO; 1176 r = -EIO;
1177 /* The created block size seems to be larger than expected. 1177 /* The created block size seems to be larger than expected.
@@ -1204,7 +1204,7 @@ static int get_results(struct zd_usb *usb, u16 *values,
1204 1204
1205 r = 0; 1205 r = 0;
1206error_unlock: 1206error_unlock:
1207 spin_unlock(&intr->lock); 1207 spin_unlock_irq(&intr->lock);
1208 return r; 1208 return r;
1209} 1209}
1210 1210
diff --git a/drivers/net/wireless/zd1211rw/zd_usb.h b/drivers/net/wireless/zd1211rw/zd_usb.h
index e81a2d3cfffd..317d37c36679 100644
--- a/drivers/net/wireless/zd1211rw/zd_usb.h
+++ b/drivers/net/wireless/zd1211rw/zd_usb.h
@@ -74,17 +74,17 @@ enum control_requests {
74struct usb_req_read_regs { 74struct usb_req_read_regs {
75 __le16 id; 75 __le16 id;
76 __le16 addr[0]; 76 __le16 addr[0];
77}; 77} __attribute__((packed));
78 78
79struct reg_data { 79struct reg_data {
80 __le16 addr; 80 __le16 addr;
81 __le16 value; 81 __le16 value;
82}; 82} __attribute__((packed));
83 83
84struct usb_req_write_regs { 84struct usb_req_write_regs {
85 __le16 id; 85 __le16 id;
86 struct reg_data reg_writes[0]; 86 struct reg_data reg_writes[0];
87}; 87} __attribute__((packed));
88 88
89enum { 89enum {
90 RF_IF_LE = 0x02, 90 RF_IF_LE = 0x02,
@@ -101,7 +101,7 @@ struct usb_req_rfwrite {
101 /* RF2595: 24 */ 101 /* RF2595: 24 */
102 __le16 bit_values[0]; 102 __le16 bit_values[0];
103 /* (CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */ 103 /* (CR203 & ~(RF_IF_LE | RF_CLK | RF_DATA)) | (bit ? RF_DATA : 0) */
104}; 104} __attribute__((packed));
105 105
106/* USB interrupt */ 106/* USB interrupt */
107 107
@@ -118,12 +118,12 @@ enum usb_int_flags {
118struct usb_int_header { 118struct usb_int_header {
119 u8 type; /* must always be 1 */ 119 u8 type; /* must always be 1 */
120 u8 id; 120 u8 id;
121}; 121} __attribute__((packed));
122 122
123struct usb_int_regs { 123struct usb_int_regs {
124 struct usb_int_header hdr; 124 struct usb_int_header hdr;
125 struct reg_data regs[0]; 125 struct reg_data regs[0];
126}; 126} __attribute__((packed));
127 127
128struct usb_int_retry_fail { 128struct usb_int_retry_fail {
129 struct usb_int_header hdr; 129 struct usb_int_header hdr;
@@ -131,7 +131,7 @@ struct usb_int_retry_fail {
131 u8 _dummy; 131 u8 _dummy;
132 u8 addr[ETH_ALEN]; 132 u8 addr[ETH_ALEN];
133 u8 ibss_wakeup_dest; 133 u8 ibss_wakeup_dest;
134}; 134} __attribute__((packed));
135 135
136struct read_regs_int { 136struct read_regs_int {
137 struct completion completion; 137 struct completion completion;
diff --git a/net/ieee80211/ieee80211_tx.c b/net/ieee80211/ieee80211_tx.c
index ae254497ba3d..854fc13cd78d 100644
--- a/net/ieee80211/ieee80211_tx.c
+++ b/net/ieee80211/ieee80211_tx.c
@@ -390,7 +390,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
390 * this stack is providing the full 802.11 header, one will 390 * this stack is providing the full 802.11 header, one will
391 * eventually be affixed to this fragment -- so we must account 391 * eventually be affixed to this fragment -- so we must account
392 * for it when determining the amount of payload space. */ 392 * for it when determining the amount of payload space. */
393 bytes_per_frag = frag_size - IEEE80211_3ADDR_LEN; 393 bytes_per_frag = frag_size - hdr_len;
394 if (ieee->config & 394 if (ieee->config &
395 (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS)) 395 (CFG_IEEE80211_COMPUTE_FCS | CFG_IEEE80211_RESERVE_FCS))
396 bytes_per_frag -= IEEE80211_FCS_LEN; 396 bytes_per_frag -= IEEE80211_FCS_LEN;
@@ -412,7 +412,7 @@ int ieee80211_xmit(struct sk_buff *skb, struct net_device *dev)
412 } else { 412 } else {
413 nr_frags = 1; 413 nr_frags = 1;
414 bytes_per_frag = bytes_last_frag = bytes; 414 bytes_per_frag = bytes_last_frag = bytes;
415 frag_size = bytes + IEEE80211_3ADDR_LEN; 415 frag_size = bytes + hdr_len;
416 } 416 }
417 417
418 rts_required = (frag_size > ieee->rts 418 rts_required = (frag_size > ieee->rts
diff --git a/net/ieee80211/softmac/ieee80211softmac_scan.c b/net/ieee80211/softmac/ieee80211softmac_scan.c
index d31cf77498c4..ad67368b58ed 100644
--- a/net/ieee80211/softmac/ieee80211softmac_scan.c
+++ b/net/ieee80211/softmac/ieee80211softmac_scan.c
@@ -47,7 +47,6 @@ ieee80211softmac_start_scan(struct ieee80211softmac_device *sm)
47 sm->scanning = 1; 47 sm->scanning = 1;
48 spin_unlock_irqrestore(&sm->lock, flags); 48 spin_unlock_irqrestore(&sm->lock, flags);
49 49
50 netif_tx_disable(sm->ieee->dev);
51 ret = sm->start_scan(sm->dev); 50 ret = sm->start_scan(sm->dev);
52 if (ret) { 51 if (ret) {
53 spin_lock_irqsave(&sm->lock, flags); 52 spin_lock_irqsave(&sm->lock, flags);
@@ -248,7 +247,6 @@ void ieee80211softmac_scan_finished(struct ieee80211softmac_device *sm)
248 if (net) 247 if (net)
249 sm->set_channel(sm->dev, net->channel); 248 sm->set_channel(sm->dev, net->channel);
250 } 249 }
251 netif_wake_queue(sm->ieee->dev);
252 ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL); 250 ieee80211softmac_call_events(sm, IEEE80211SOFTMAC_EVENT_SCAN_FINISHED, NULL);
253} 251}
254EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished); 252EXPORT_SYMBOL_GPL(ieee80211softmac_scan_finished);