summaryrefslogtreecommitdiff
path: root/drivers/net/sfc/net_driver.h
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-04-14 09:50:12 +0400
committerDavid S. Miller <davem@davemloft.net>2011-04-15 08:53:42 +0400
commit6c8c2513c86c589a819c161c9abbdea2a3d56f5e (patch)
tree043371fbd07fce16159abf9d58cfd0df35b99268 /drivers/net/sfc/net_driver.h
parent44f4d5a27ee63ec80d498e0d0673605d5ce1427d (diff)
downloadlinux-6c8c2513c86c589a819c161c9abbdea2a3d56f5e.tar.xz
sfc: make function tables const
The phy, mac, and board information structures should be const. Since tables contain function pointer this improves security (at least theoretically). Compile tested only. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sfc/net_driver.h')
-rw-r--r--drivers/net/sfc/net_driver.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/sfc/net_driver.h b/drivers/net/sfc/net_driver.h
index 92a9067e8e77..ab4d05b84eb7 100644
--- a/drivers/net/sfc/net_driver.h
+++ b/drivers/net/sfc/net_driver.h
@@ -773,10 +773,10 @@ struct efx_nic {
struct efx_buffer stats_buffer;
- struct efx_mac_operations *mac_op;
+ const struct efx_mac_operations *mac_op;
unsigned int phy_type;
- struct efx_phy_operations *phy_op;
+ const struct efx_phy_operations *phy_op;
void *phy_data;
struct mdio_if_info mdio;
unsigned int mdio_bus;
@@ -897,7 +897,7 @@ struct efx_nic_type {
void (*resume_wol)(struct efx_nic *efx);
int (*test_registers)(struct efx_nic *efx);
int (*test_nvram)(struct efx_nic *efx);
- struct efx_mac_operations *default_mac_ops;
+ const struct efx_mac_operations *default_mac_ops;
int revision;
unsigned int mem_map_size;