1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
diff --git a/patches/kdrivers/include/if_wanpipe_common.h b/patches/kdrivers/include/if_wanpipe_common.h
index e7f4fca..1bf0c1b 100644
--- a/patches/kdrivers/include/if_wanpipe_common.h
+++ b/patches/kdrivers/include/if_wanpipe_common.h
@@ -49,7 +49,7 @@ typedef struct {
#if defined (__LINUX__)
int (*change_mtu)(netdevice_t *dev, int new_mtu);
#endif
-} wanpipe_common_iface_t;
+} __no_const wanpipe_common_iface_t;
typedef struct wanpipe_common {
#if defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__)
diff --git a/patches/kdrivers/include/sdla_front_end.h b/patches/kdrivers/include/sdla_front_end.h
index 11d7f3c..61bb8a2 100644
--- a/patches/kdrivers/include/sdla_front_end.h
+++ b/patches/kdrivers/include/sdla_front_end.h
@@ -630,7 +630,7 @@ typedef struct {
/* Enable/Disable Clock recovery from the line */
int (*clock_ctrl)(sdla_fe_t*, u_int8_t /* WANOPT_NO/WANOPT_YES */);
u_int32_t (*read_tx_alarm)(sdla_fe_t *fe, int);
-} sdla_fe_iface_t;
+} __no_const sdla_fe_iface_t;
/*
** Sangoma Front-End interface structure (new version)
diff --git a/patches/kdrivers/include/sdladrv.h b/patches/kdrivers/include/sdladrv.h
index 4398f4c..5e34811 100644
--- a/patches/kdrivers/include/sdladrv.h
+++ b/patches/kdrivers/include/sdladrv.h
@@ -743,7 +743,7 @@ typedef struct sdlahw_iface
int (*usb_flush_err_stats)(void *phw);
void (*reset_fe)(void*);
-} sdlahw_iface_t;
+} __no_const sdlahw_iface_t;
typedef struct sdla_hw_type_cnt
{
@@ -772,7 +772,7 @@ typedef struct sdla_hw_type_cnt
typedef struct sdladrv_callback_ {
int (*add_device)(void);
int (*delete_device)(char*);
-} sdladrv_callback_t;
+} __no_const sdladrv_callback_t;
#if defined(SDLADRV_HW_IFACE)
typedef struct sdladrv_hw_probe_iface {
diff --git a/patches/kdrivers/include/wanpipe_cdev_iface.h b/patches/kdrivers/include/wanpipe_cdev_iface.h
index bccf2e2..486572e 100644
--- a/patches/kdrivers/include/wanpipe_cdev_iface.h
+++ b/patches/kdrivers/include/wanpipe_cdev_iface.h
@@ -32,7 +32,7 @@ typedef struct wanpipe_cdev_ops
/* handle transmission time out */
int (*tx_timeout)(void* dev_ptr);
-}wanpipe_cdev_ops_t;
+} __no_const wanpipe_cdev_ops_t;
diff --git a/patches/kdrivers/include/wanpipe_defines.h b/patches/kdrivers/include/wanpipe_defines.h
index 9c62b8d..5269262 100644
--- a/patches/kdrivers/include/wanpipe_defines.h
+++ b/patches/kdrivers/include/wanpipe_defines.h
@@ -895,7 +895,7 @@ typedef struct wan_rtp_pkt {
#if defined(HAVE_NET_DEVICE_OPS) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,0,0)
-#define WAN_DECLARE_NETDEV_OPS(_ops_name) static struct net_device_ops _ops_name = {0};
+#define WAN_DECLARE_NETDEV_OPS(_ops_name) static net_device_ops_no_const _ops_name = {0};
#define WAN_NETDEV_OPS_BIND(dev,_ops_name) dev->netdev_ops = &_ops_name
diff --git a/patches/kdrivers/include/wanpipe_wanrouter.h b/patches/kdrivers/include/wanpipe_wanrouter.h
index 7b2a919..4a05fa5 100644
--- a/patches/kdrivers/include/wanpipe_wanrouter.h
+++ b/patches/kdrivers/include/wanpipe_wanrouter.h
@@ -362,7 +362,7 @@ typedef struct wan_device
void (*ringdetect) (void* card_id, wan_event_t*);
void (*linkstatus) (void* card_id, wan_event_t*);
void (*polarityreverse) (void* card_id, wan_event_t*);
- } event_callback;
+ } __no_const event_callback;
unsigned char ignore_front_end_status;
unsigned char line_idle;
diff --git a/patches/kdrivers/src/net/sdladrv.c b/patches/kdrivers/src/net/sdladrv.c
index 22d4b4f..d5b9fbb 100644
--- a/patches/kdrivers/src/net/sdladrv.c
+++ b/patches/kdrivers/src/net/sdladrv.c
@@ -343,12 +343,12 @@ static unsigned sdla_test_memregion (sdlahw_t* hw, unsigned len);
static unsigned short sdla_checksum (unsigned char* buf, unsigned len);
static int sdla_init_pci_slot(sdlahw_t *);
-static sdlahw_card_t* sdla_card_register(u8 hw_type, int bus_no, int slot_no, int ioport, char*);
+static sdlahw_card_t* sdla_card_register(u8 hw_type, int bus_no, int slot_no, int ioport, const char*);
static int sdla_card_unregister (sdlahw_card_t*);
-static sdlahw_card_t* sdla_card_search(u8 hw_type, int bus_no, int slot_no, int ioport, char*);
+static sdlahw_card_t* sdla_card_search(u8 hw_type, int bus_no, int slot_no, int ioport, const char*);
static int sdla_card_info(sdlahw_card_t*);
-sdlahw_cpu_t* sdla_hwcpu_search(u8, int, int, int, int, char*);
+sdlahw_cpu_t* sdla_hwcpu_search(u8, int, int, int, int, const char*);
static sdlahw_cpu_t* sdla_hwcpu_register(sdlahw_card_t*, int, int, void*);
static int sdla_hwcpu_unregister(sdlahw_cpu_t*);
static int sdla_hwcpu_info(sdlahw_cpu_t*);
@@ -4339,7 +4339,7 @@ static int sdla_card_info(sdlahw_card_t *hwcard)
}
static sdlahw_card_t*
-sdla_card_register(u8 hw_type, int bus_no, int slot_no, int ioport, char *bus_id)
+sdla_card_register(u8 hw_type, int bus_no, int slot_no, int ioport, const char *bus_id)
{
sdlahw_card_t *new_hwcard, *last_hwcard;
@@ -4408,7 +4408,7 @@ sdla_card_unregister(sdlahw_card_t* hwcard)
}
static sdlahw_card_t*
-sdla_card_search(u8 hw_type, int bus_no, int slot_no, int ioport, char *bus_id)
+sdla_card_search(u8 hw_type, int bus_no, int slot_no, int ioport, const char *bus_id)
{
sdlahw_card_t* tmp;
@@ -4547,7 +4547,7 @@ static int sdla_hwcpu_unregister(sdlahw_cpu_t *hwcpu)
}
sdlahw_cpu_t*
-sdla_hwcpu_search(u8 hw_type, int bus_no, int slot_no, int ioport, int cpu_no, char *bus_id)
+sdla_hwcpu_search(u8 hw_type, int bus_no, int slot_no, int ioport, int cpu_no, const char *bus_id)
{
sdlahw_cpu_t* tmp;
|