aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wan
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-03-18 03:37:55 -0400
committerDavid S. Miller <davem@davemloft.net>2008-03-18 03:37:55 -0400
commit577f99c1d08cf9cbdafd4e858dd13ff04d855090 (patch)
tree0f726bbda9b18d311d4c95198bbd96cb7ac01db0 /drivers/net/wan
parent26c0f03f6b77c513cb7bc37b73a06819bdbb791b (diff)
parent2f633928cbba8a5858bb39b11e7219a41b0fbef5 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/rt2x00/rt2x00dev.c net/8021q/vlan_dev.c
Diffstat (limited to 'drivers/net/wan')
-rw-r--r--drivers/net/wan/farsync.c17
-rw-r--r--drivers/net/wan/sbni.c2
2 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c
index cf27bf40d36e..547368e9633d 100644
--- a/drivers/net/wan/farsync.c
+++ b/drivers/net/wan/farsync.c
@@ -2024,6 +2024,7 @@ fst_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
2024 struct fstioc_write wrthdr; 2024 struct fstioc_write wrthdr;
2025 struct fstioc_info info; 2025 struct fstioc_info info;
2026 unsigned long flags; 2026 unsigned long flags;
2027 void *buf;
2027 2028
2028 dbg(DBG_IOCTL, "ioctl: %x, %p\n", cmd, ifr->ifr_data); 2029 dbg(DBG_IOCTL, "ioctl: %x, %p\n", cmd, ifr->ifr_data);
2029 2030
@@ -2065,16 +2066,22 @@ fst_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
2065 return -ENXIO; 2066 return -ENXIO;
2066 } 2067 }
2067 2068
2068 /* Now copy the data to the card. 2069 /* Now copy the data to the card. */
2069 * This will probably break on some architectures. 2070
2070 * I'll fix it when I have something to test on. 2071 buf = kmalloc(wrthdr.size, GFP_KERNEL);
2071 */ 2072 if (!buf)
2072 if (copy_from_user(card->mem + wrthdr.offset, 2073 return -ENOMEM;
2074
2075 if (copy_from_user(buf,
2073 ifr->ifr_data + sizeof (struct fstioc_write), 2076 ifr->ifr_data + sizeof (struct fstioc_write),
2074 wrthdr.size)) { 2077 wrthdr.size)) {
2078 kfree(buf);
2075 return -EFAULT; 2079 return -EFAULT;
2076 } 2080 }
2077 2081
2082 memcpy_toio(card->mem + wrthdr.offset, buf, wrthdr.size);
2083 kfree(buf);
2084
2078 /* Writes to the memory of a card in the reset state constitute 2085 /* Writes to the memory of a card in the reset state constitute
2079 * a download 2086 * a download
2080 */ 2087 */
diff --git a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c
index 15d5c58e57bc..e59255a155a9 100644
--- a/drivers/net/wan/sbni.c
+++ b/drivers/net/wan/sbni.c
@@ -751,7 +751,7 @@ upload_data( struct net_device *dev, unsigned framelen, unsigned frameno,
751} 751}
752 752
753 753
754static __inline void 754static inline void
755send_complete( struct net_local *nl ) 755send_complete( struct net_local *nl )
756{ 756{
757#ifdef CONFIG_SBNI_MULTILINE 757#ifdef CONFIG_SBNI_MULTILINE