aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2007-05-10 23:10:18 -0400
committerJohn W. Linville <linville@tuxdriver.com>2007-05-11 14:54:55 -0400
commit4269e2ad83036e1d8c076b1f1348f879a93be008 (patch)
tree89a756d40a3e605abfbb7fc8fb1f02b8c2705518 /drivers
parentc4aa7051b6d5697d2c0c169153e727c2e4175c5b (diff)
[PATCH] libertas: 64-bit cleanups
Signed-off-by: Dan Williams <dcbw@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/libertas/cmd.c12
-rw-r--r--drivers/net/wireless/libertas/debugfs.c14
-rw-r--r--drivers/net/wireless/libertas/if_usb.c2
-rw-r--r--drivers/net/wireless/libertas/join.c3
-rw-r--r--drivers/net/wireless/libertas/rx.c4
-rw-r--r--drivers/net/wireless/libertas/scan.c4
-rw-r--r--drivers/net/wireless/libertas/tx.c2
7 files changed, 21 insertions, 20 deletions
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c
index 092cd20e1227..de9cb46a70ff 100644
--- a/drivers/net/wireless/libertas/cmd.c
+++ b/drivers/net/wireless/libertas/cmd.c
@@ -948,8 +948,8 @@ void libertas_queue_cmd(wlan_adapter * adapter, struct cmd_ctrl_node *cmdnode, u
948 948
949 spin_unlock_irqrestore(&adapter->driver_lock, flags); 949 spin_unlock_irqrestore(&adapter->driver_lock, flags);
950 950
951 lbs_pr_debug(1, "QUEUE_CMD: Inserted node=0x%x, cmd=0x%x in cmdpendingq\n", 951 lbs_pr_debug(1, "QUEUE_CMD: Inserted node=%p, cmd=0x%x in cmdpendingq\n",
952 (u32) cmdnode, 952 cmdnode,
953 ((struct cmd_ds_gen*)cmdnode->bufvirtualaddr)->command); 953 ((struct cmd_ds_gen*)cmdnode->bufvirtualaddr)->command);
954 954
955done: 955done:
@@ -977,8 +977,8 @@ static int DownloadcommandToStation(wlan_private * priv,
977 ENTER(); 977 ENTER();
978 978
979 if (!adapter || !cmdnode) { 979 if (!adapter || !cmdnode) {
980 lbs_pr_debug(1, "DNLD_CMD: adapter = %#x, cmdnode = %#x\n", 980 lbs_pr_debug(1, "DNLD_CMD: adapter = %p, cmdnode = %p\n",
981 (int)adapter, (int)cmdnode); 981 adapter, cmdnode);
982 if (cmdnode) { 982 if (cmdnode) {
983 spin_lock_irqsave(&adapter->driver_lock, flags); 983 spin_lock_irqsave(&adapter->driver_lock, flags);
984 __libertas_cleanup_and_insert_cmd(priv, cmdnode); 984 __libertas_cleanup_and_insert_cmd(priv, cmdnode);
@@ -1175,8 +1175,8 @@ int libertas_prepare_and_send_command(wlan_private * priv,
1175 1175
1176 cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr; 1176 cmdptr = (struct cmd_ds_command *)cmdnode->bufvirtualaddr;
1177 1177
1178 lbs_pr_debug(1, "PREP_CMD: Val of cmd ptr =0x%x, command=0x%X\n", 1178 lbs_pr_debug(1, "PREP_CMD: Val of cmd ptr=%p, command=0x%X\n",
1179 (u32) cmdptr, cmd_no); 1179 cmdptr, cmd_no);
1180 1180
1181 if (!cmdptr) { 1181 if (!cmdptr) {
1182 lbs_pr_debug(1, "PREP_CMD: bufvirtualaddr of cmdnode is NULL\n"); 1182 lbs_pr_debug(1, "PREP_CMD: bufvirtualaddr of cmdnode is NULL\n");
diff --git a/drivers/net/wireless/libertas/debugfs.c b/drivers/net/wireless/libertas/debugfs.c
index 61cbd47109e4..7d7bc5e86a56 100644
--- a/drivers/net/wireless/libertas/debugfs.c
+++ b/drivers/net/wireless/libertas/debugfs.c
@@ -277,7 +277,7 @@ static void libertas_parse_ssid(char *buf, size_t count,
277 if (!end) 277 if (!end)
278 end = buf + count - 1; 278 end = buf + count - 1;
279 279
280 size = min(IW_ESSID_MAX_SIZE, end - hold); 280 size = min((size_t)IW_ESSID_MAX_SIZE, (size_t) (end - hold));
281 strncpy(scan_cfg->specificSSID, hold, size); 281 strncpy(scan_cfg->specificSSID, hold, size);
282 282
283 return; 283 return;
@@ -1779,7 +1779,7 @@ void libertas_debugfs_remove_one(wlan_private *priv)
1779struct debug_data { 1779struct debug_data {
1780 char name[32]; 1780 char name[32];
1781 u32 size; 1781 u32 size;
1782 u32 addr; 1782 size_t addr;
1783}; 1783};
1784 1784
1785/* To debug any member of wlan_adapter, simply add one line here. 1785/* To debug any member of wlan_adapter, simply add one line here.
@@ -1826,6 +1826,8 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
1826 val = *((u16 *) d[i].addr); 1826 val = *((u16 *) d[i].addr);
1827 else if (d[i].size == 4) 1827 else if (d[i].size == 4)
1828 val = *((u32 *) d[i].addr); 1828 val = *((u32 *) d[i].addr);
1829 else if (d[i].size == 8)
1830 val = *((u64 *) d[i].addr);
1829 1831
1830 pos += sprintf(p + pos, "%s=%d\n", d[i].name, val); 1832 pos += sprintf(p + pos, "%s=%d\n", d[i].name, val);
1831 } 1833 }
@@ -1845,7 +1847,7 @@ static ssize_t wlan_debugfs_read(struct file *file, char __user *userbuf,
1845 * @param data data to write 1847 * @param data data to write
1846 * @return number of data 1848 * @return number of data
1847 */ 1849 */
1848static int wlan_debugfs_write(struct file *f, const char __user *buf, 1850static ssize_t wlan_debugfs_write(struct file *f, const char __user *buf,
1849 size_t cnt, loff_t *ppos) 1851 size_t cnt, loff_t *ppos)
1850{ 1852{
1851 int r, i; 1853 int r, i;
@@ -1887,12 +1889,14 @@ static int wlan_debugfs_write(struct file *f, const char __user *buf,
1887 *((u16 *) d[i].addr) = (u16) r; 1889 *((u16 *) d[i].addr) = (u16) r;
1888 else if (d[i].size == 4) 1890 else if (d[i].size == 4)
1889 *((u32 *) d[i].addr) = (u32) r; 1891 *((u32 *) d[i].addr) = (u32) r;
1892 else if (d[i].size == 8)
1893 *((u64 *) d[i].addr) = (u64) r;
1890 break; 1894 break;
1891 } while (1); 1895 } while (1);
1892 } 1896 }
1893 kfree(pdata); 1897 kfree(pdata);
1894 1898
1895 return cnt; 1899 return (ssize_t)cnt;
1896} 1900}
1897 1901
1898static struct file_operations libertas_debug_fops = { 1902static struct file_operations libertas_debug_fops = {
@@ -1917,7 +1921,7 @@ void libertas_debug_init(wlan_private * priv, struct net_device *dev)
1917 return; 1921 return;
1918 1922
1919 for (i = 0; i < num_of_items; i++) 1923 for (i = 0; i < num_of_items; i++)
1920 items[i].addr += (u32) priv->adapter; 1924 items[i].addr += (size_t) priv->adapter;
1921 1925
1922 priv->debugfs_debug = debugfs_create_file("debug", 0644, 1926 priv->debugfs_debug = debugfs_create_file("debug", 0644,
1923 priv->debugfs_dir, &items[0], 1927 priv->debugfs_dir, &items[0],
diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c
index f2d37d948498..ae6f72a6cdf3 100644
--- a/drivers/net/wireless/libertas/if_usb.c
+++ b/drivers/net/wireless/libertas/if_usb.c
@@ -388,7 +388,7 @@ static int __if_usb_submit_rx_urb(wlan_private * priv,
388 usb_fill_bulk_urb(cardp->rx_urb, cardp->udev, 388 usb_fill_bulk_urb(cardp->rx_urb, cardp->udev,
389 usb_rcvbulkpipe(cardp->udev, 389 usb_rcvbulkpipe(cardp->udev,
390 cardp->bulk_in_endpointAddr), 390 cardp->bulk_in_endpointAddr),
391 skb->tail + IPFIELD_ALIGN_OFFSET, 391 (void *) (skb->tail + (size_t) IPFIELD_ALIGN_OFFSET),
392 MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn, 392 MRVDRV_ETH_RX_PACKET_BUFFER_SIZE, callbackfn,
393 rinfo); 393 rinfo);
394 394
diff --git a/drivers/net/wireless/libertas/join.c b/drivers/net/wireless/libertas/join.c
index ec40d32183ed..d4926b83e145 100644
--- a/drivers/net/wireless/libertas/join.c
+++ b/drivers/net/wireless/libertas/join.c
@@ -663,9 +663,6 @@ int libertas_cmd_80211_ad_hoc_join(wlan_private * priv,
663 padhocjoin->bssdescriptor.BSSID[5], 663 padhocjoin->bssdescriptor.BSSID[5],
664 padhocjoin->bssdescriptor.SSID); 664 padhocjoin->bssdescriptor.SSID);
665 665
666 lbs_pr_debug(1, "ADHOC_J_CMD: Data Rate = %x\n",
667 (u32) padhocjoin->bssdescriptor.datarates);
668
669 /* failtimeout */ 666 /* failtimeout */
670 padhocjoin->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT); 667 padhocjoin->failtimeout = cpu_to_le16(MRVDRV_ASSOCIATION_TIME_OUT);
671 668
diff --git a/drivers/net/wireless/libertas/rx.c b/drivers/net/wireless/libertas/rx.c
index 7e3f78f092dc..d17924f764e5 100644
--- a/drivers/net/wireless/libertas/rx.c
+++ b/drivers/net/wireless/libertas/rx.c
@@ -210,7 +210,7 @@ int libertas_process_rxed_packet(wlan_private * priv, struct sk_buff *skb)
210 goto done; 210 goto done;
211 } 211 }
212 212
213 lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n", 213 lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %zd = %zd\n",
214 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); 214 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
215 215
216 lbs_dbg_hex("RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr, 216 lbs_dbg_hex("RX Data: Dest", p_rx_pkt->eth803_hdr.dest_addr,
@@ -364,7 +364,7 @@ static int process_rxed_802_11_packet(wlan_private * priv, struct sk_buff *skb)
364 priv->stats.rx_errors++; 364 priv->stats.rx_errors++;
365 } 365 }
366 366
367 lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %d = %d\n", 367 lbs_pr_debug(1, "RX Data: skb->len - sizeof(RxPd) = %d - %zd = %zd\n",
368 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd)); 368 skb->len, sizeof(struct rxpd), skb->len - sizeof(struct rxpd));
369 369
370 /* create the exported radio header */ 370 /* create the exported radio header */
diff --git a/drivers/net/wireless/libertas/scan.c b/drivers/net/wireless/libertas/scan.c
index 26488b08f057..3c0b1a2a1727 100644
--- a/drivers/net/wireless/libertas/scan.c
+++ b/drivers/net/wireless/libertas/scan.c
@@ -1085,7 +1085,7 @@ static int InterpretBSSDescriptionWithIE(struct bss_descriptor * pBSSEntry,
1085 sizeof(pcountryinfo->countrycode) 1085 sizeof(pcountryinfo->countrycode)
1086 || pcountryinfo->len > 254) { 1086 || pcountryinfo->len > 254) {
1087 lbs_pr_debug(1, "InterpretIE: 11D- Err " 1087 lbs_pr_debug(1, "InterpretIE: 11D- Err "
1088 "CountryInfo len =%d min=%d max=254\n", 1088 "CountryInfo len =%d min=%zd max=254\n",
1089 pcountryinfo->len, 1089 pcountryinfo->len,
1090 sizeof(pcountryinfo->countrycode)); 1090 sizeof(pcountryinfo->countrycode));
1091 LEAVE(); 1091 LEAVE();
@@ -1551,7 +1551,7 @@ int libertas_get_scan(struct net_device *dev, struct iw_request_info *info,
1551 for (i = 0; i < adapter->numinscantable; i++) { 1551 for (i = 0; i < adapter->numinscantable; i++) {
1552 if ((current_ev + MAX_SCAN_CELL_SIZE) >= end_buf) { 1552 if ((current_ev + MAX_SCAN_CELL_SIZE) >= end_buf) {
1553 lbs_pr_debug(1, "i=%d break out: current_ev=%p end_buf=%p " 1553 lbs_pr_debug(1, "i=%d break out: current_ev=%p end_buf=%p "
1554 "MAX_SCAN_CELL_SIZE=%d\n", 1554 "MAX_SCAN_CELL_SIZE=%zd\n",
1555 i, current_ev, end_buf, MAX_SCAN_CELL_SIZE); 1555 i, current_ev, end_buf, MAX_SCAN_CELL_SIZE);
1556 break; 1556 break;
1557 } 1557 }
diff --git a/drivers/net/wireless/libertas/tx.c b/drivers/net/wireless/libertas/tx.c
index 82d06223043e..d4b13478c9a7 100644
--- a/drivers/net/wireless/libertas/tx.c
+++ b/drivers/net/wireless/libertas/tx.c
@@ -78,7 +78,7 @@ static int SendSinglePacket(wlan_private * priv, struct sk_buff *skb)
78 min_t(unsigned int, skb->len, 100)); 78 min_t(unsigned int, skb->len, 100));
79 79
80 if (!skb->len || (skb->len > MRVDRV_ETH_TX_PACKET_BUFFER_SIZE)) { 80 if (!skb->len || (skb->len > MRVDRV_ETH_TX_PACKET_BUFFER_SIZE)) {
81 lbs_pr_debug(1, "Tx error: Bad skb length %d : %d\n", 81 lbs_pr_debug(1, "Tx error: Bad skb length %d : %zd\n",
82 skb->len, MRVDRV_ETH_TX_PACKET_BUFFER_SIZE); 82 skb->len, MRVDRV_ETH_TX_PACKET_BUFFER_SIZE);
83 ret = -1; 83 ret = -1;
84 goto done; 84 goto done;