patch for hostap_hw.c (fix amd64)

Jim Cromie jcromie at divsol.com
Sat Jun 4 18:00:35 EDT 2005


trem wrote:

> Hello everybody
>
> I've written another little patch. This time, I hope it isn't already
> on the mm patchset. This new patch fixes some warning when
> compiling hostap_hw.c. Theres warnings are generated by a
> pointer affected to an int. It works on ia32 but not on amd64.
>
> I've simply change int by long.
>
> trem

hi trem,
Im taking the liberty of forwarding it to Jouni Malinen, on his list.

>------------------------------------------------------------------------
>
>--- drivers/net/wireless/hostap/hostap_hw.c.old	2005-06-04 16:07:34.000000000 +0200
>+++ drivers/net/wireless/hostap/hostap_hw.c	2005-06-04 16:11:01.000000000 +0200
>@@ -1715,7 +1715,7 @@ static void prism2_transmit_cb(struct ne
> {
> 	struct hostap_interface *iface;
> 	local_info_t *local;
>-	int idx = (int) context;
>+	long idx = (long) context;
> 
> 	iface = netdev_priv(dev);
> 	local = iface->local;
>@@ -1728,7 +1728,7 @@ static void prism2_transmit_cb(struct ne
> 
> 	if (idx < 0 || idx >= PRISM2_TXFID_COUNT) {
> 		printk(KERN_DEBUG "%s: prism2_transmit_cb called with invalid "
>-		       "idx=%d\n", dev->name, idx);
>+		       "idx=%ld\n", dev->name, idx);
> 		return;
> 	}
> 
>@@ -1749,7 +1749,7 @@ static void prism2_transmit_cb(struct ne
> 	 * will be automatically allocated for the next TX frame */
> 	local->intransmitfid[idx] = resp0;
> 
>-	PDEBUG(DEBUG_FID, "%s: prism2_transmit_cb: txfid[%d]=0x%04x, "
>+	PDEBUG(DEBUG_FID, "%s: prism2_transmit_cb: txfid[%ld]=0x%04x, "
> 	       "resp0=0x%04x, transmit_txfid=0x%04x\n",
> 	       dev->name, idx, local->txfid[idx],
> 	       resp0, local->intransmitfid[local->next_txfid]);
>@@ -1778,7 +1778,7 @@ static void prism2_transmit_cb(struct ne
> 
> /* Called only from software IRQ if PCI bus master is not used (with bus master
>  * this can be called both from software and hardware IRQ) */
>-static int prism2_transmit(struct net_device *dev, int idx)
>+static int prism2_transmit(struct net_device *dev, long idx)
> {
> 	struct hostap_interface *iface;
> 	local_info_t *local;
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Kernel-mentors mailing list
>Kernel-mentors at selenic.com
>http://selenic.com/mailman/listinfo/kernel-mentors
>  
>




More information about the HostAP mailing list