aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/os-Linux/drivers/ethertap_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/os-Linux/drivers/ethertap_user.c')
-rw-r--r--arch/um/os-Linux/drivers/ethertap_user.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/um/os-Linux/drivers/ethertap_user.c b/arch/um/os-Linux/drivers/ethertap_user.c
index 4e38ccf35129..96e12ea8172c 100644
--- a/arch/um/os-Linux/drivers/ethertap_user.c
+++ b/arch/um/os-Linux/drivers/ethertap_user.c
@@ -20,6 +20,7 @@
20#include "etap.h" 20#include "etap.h"
21#include "os.h" 21#include "os.h"
22#include "um_malloc.h" 22#include "um_malloc.h"
23#include "kern_constants.h"
23 24
24#define MAX_PACKET ETH_MAX_PACKET 25#define MAX_PACKET ETH_MAX_PACKET
25 26
@@ -50,10 +51,10 @@ static void etap_change(int op, unsigned char *addr, unsigned char *netmask,
50 n = os_write_file(fd, &change, sizeof(change)); 51 n = os_write_file(fd, &change, sizeof(change));
51 if(n != sizeof(change)) 52 if(n != sizeof(change))
52 printk("etap_change - request failed, err = %d\n", -n); 53 printk("etap_change - request failed, err = %d\n", -n);
53 output = um_kmalloc(page_size()); 54 output = um_kmalloc(UM_KERN_PAGE_SIZE);
54 if(output == NULL) 55 if(output == NULL)
55 printk("etap_change : Failed to allocate output buffer\n"); 56 printk("etap_change : Failed to allocate output buffer\n");
56 read_output(fd, output, page_size()); 57 read_output(fd, output, UM_KERN_PAGE_SIZE);
57 if(output != NULL){ 58 if(output != NULL){
58 printk("%s", output); 59 printk("%s", output);
59 kfree(output); 60 kfree(output);
@@ -159,7 +160,7 @@ static int etap_open(void *data)
159 160
160 err = etap_tramp(pri->dev_name, pri->gate_addr, control_fds[0], 161 err = etap_tramp(pri->dev_name, pri->gate_addr, control_fds[0],
161 control_fds[1], data_fds[0], data_fds[1]); 162 control_fds[1], data_fds[0], data_fds[1]);
162 output_len = page_size(); 163 output_len = UM_KERN_PAGE_SIZE;
163 output = um_kmalloc(output_len); 164 output = um_kmalloc(output_len);
164 read_output(control_fds[0], output, output_len); 165 read_output(control_fds[0], output, output_len);
165 166