aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-01-05 15:05:47 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-06 13:52:14 -0800
commit0252e5c691fd54064212c74435c2255abf3778d5 (patch)
treed6b9cda3556d5013e1188153ed28735c1e07d9c9
parent85e468cd556b04dcf019deca145639e1f8cb1e63 (diff)
Staging: benet: fix up netdev->priv change
netdev->priv is now gone, so fix up all of the build errors in the benet driver due to this change. Cc: Subbu Seetharaman <subbus@serverengines.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/staging/benet/be_ethtool.c18
-rw-r--r--drivers/staging/benet/be_init.c6
-rw-r--r--drivers/staging/benet/be_int.c4
-rw-r--r--drivers/staging/benet/be_netif.c24
4 files changed, 25 insertions, 27 deletions
diff --git a/drivers/staging/benet/be_ethtool.c b/drivers/staging/benet/be_ethtool.c
index 8c3ac90d2fe..027af85707a 100644
--- a/drivers/staging/benet/be_ethtool.c
+++ b/drivers/staging/benet/be_ethtool.c
@@ -79,7 +79,7 @@ static const char benet_gstrings_stats[][ETH_GSTRING_LEN] = {
static void
be_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
strncpy(drvinfo->driver, be_driver_name, 32);
@@ -94,7 +94,7 @@ be_get_drvinfo(struct net_device *netdev, struct ethtool_drvinfo *drvinfo)
static int
be_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
coalesce->rx_max_coalesced_frames = adapter->max_rx_coal;
@@ -120,7 +120,7 @@ be_get_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
static int
be_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
struct be_eq_object *eq_objectp;
u32 max, min, cur;
@@ -170,14 +170,14 @@ be_set_coalesce(struct net_device *netdev, struct ethtool_coalesce *coalesce)
static u32 be_get_rx_csum(struct net_device *netdev)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
return adapter->rx_csum;
}
static int be_set_rx_csum(struct net_device *netdev, uint32_t data)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
if (data)
@@ -208,7 +208,7 @@ static void
be_get_ethtool_stats(struct net_device *netdev,
struct ethtool_stats *stats, uint64_t *data)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
int i;
@@ -251,7 +251,7 @@ static int be_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd)
static void
be_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
/* Pre Set Maxims */
ring->rx_max_pending = pnob->rx_q_len;
@@ -270,7 +270,7 @@ be_get_ringparam(struct net_device *netdev, struct ethtool_ringparam *ring)
static void
be_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
bool rxfc, txfc;
int status;
@@ -300,7 +300,7 @@ be_get_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd)
static int
be_set_pauseparam(struct net_device *netdev, struct ethtool_pauseparam *ecmd)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
bool txfc, rxfc;
int status;
diff --git a/drivers/staging/benet/be_init.c b/drivers/staging/benet/be_init.c
index 9e5bd08d999..59c02bf948b 100644
--- a/drivers/staging/benet/be_init.c
+++ b/drivers/staging/benet/be_init.c
@@ -1057,7 +1057,7 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
status = -ENOMEM;
goto cleanup;
}
- pnob = netdev->priv;
+ pnob = netdev_priv(netdev);
adapter->net_obj = pnob;
adapter->netdevp = netdev;
pnob->adapter = adapter;
@@ -1220,7 +1220,7 @@ static int be_suspend(struct pci_dev *pdev, pm_message_t state)
{
struct be_adapter *adapter = pci_get_drvdata(pdev);
struct net_device *netdev = adapter->netdevp;
- struct be_net_object *pnob = (struct be_net_object *)netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
adapter->dev_pm_state = adapter->dev_state;
adapter->dev_state = BE_DEV_STATE_SUSPEND;
@@ -1252,7 +1252,7 @@ static int be_resume(struct pci_dev *pdev)
int status = 0;
struct be_adapter *adapter = pci_get_drvdata(pdev);
struct net_device *netdev = adapter->netdevp;
- struct be_net_object *pnob = (struct be_net_object *)netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
netif_device_detach(netdev);
diff --git a/drivers/staging/benet/be_int.c b/drivers/staging/benet/be_int.c
index 1e5e2948f17..20e55538bc6 100644
--- a/drivers/staging/benet/be_int.c
+++ b/drivers/staging/benet/be_int.c
@@ -691,7 +691,7 @@ void be_post_eth_rx_buffs(struct be_net_object *pnob)
irqreturn_t be_int(int irq, void *dev)
{
struct net_device *netdev = dev;
- struct be_net_object *pnob = (struct be_net_object *)(netdev->priv);
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
u32 isr;
@@ -718,7 +718,7 @@ irqreturn_t be_int(int irq, void *dev)
int be_poll(struct napi_struct *napi, int budget)
{
struct net_device *netdev = napi->dev;
- struct be_net_object *pnob = (struct be_net_object *)netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
u32 work_done;
diff --git a/drivers/staging/benet/be_netif.c b/drivers/staging/benet/be_netif.c
index 2e590440901..590398981d0 100644
--- a/drivers/staging/benet/be_netif.c
+++ b/drivers/staging/benet/be_netif.c
@@ -120,7 +120,7 @@ be_get_frag_header(struct skb_frag_struct *frag, void **mac_hdr,
static int benet_open(struct net_device *netdev)
{
- struct be_net_object *pnob = (struct be_net_object *)netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
struct net_lro_mgr *lro_mgr;
@@ -169,7 +169,7 @@ static int benet_open(struct net_device *netdev)
static int benet_close(struct net_device *netdev)
{
- struct be_net_object *pnob = (struct be_net_object *)netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
netif_stop_queue(netdev);
@@ -196,9 +196,7 @@ static int benet_close(struct net_device *netdev)
static int benet_set_mac_addr(struct net_device *netdev, void *p)
{
struct sockaddr *addr = p;
- struct be_net_object *pnob;
-
- pnob = (struct be_net_object *)netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
be_rxf_mac_address_read_write(&pnob->fn_obj, 0, 0, false, true, false,
@@ -243,7 +241,7 @@ void be_get_stat_cb(void *context, int status,
struct net_device_stats *benet_get_stats(struct net_device *dev)
{
- struct be_net_object *pnob = dev->priv;
+ struct be_net_object *pnob = netdev_priv(dev);
struct be_adapter *adapter = pnob->adapter;
u64 pa;
struct be_timer_ctxt *ctxt = &adapter->timer_ctxt;
@@ -497,7 +495,7 @@ static inline void be_tx_wrb_info_remember(struct be_net_object *pnob,
static int benet_xmit(struct sk_buff *skb, struct net_device *netdev)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
u32 wrb_cnt, copied = 0;
u32 start = pnob->tx_q_hd;
@@ -557,7 +555,7 @@ static int benet_change_mtu(struct net_device *netdev, int new_mtu)
static void benet_vlan_register(struct net_device *netdev,
struct vlan_group *grp)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
be_disable_eq_intr(pnob);
pnob->vlan_grp = grp;
@@ -571,7 +569,7 @@ static void benet_vlan_register(struct net_device *netdev,
*/
static void benet_vlan_add_vid(struct net_device *netdev, u16 vlan_id)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
if (pnob->num_vlans == (BE_NUM_VLAN_SUPPORTED - 1)) {
/* no way to return an error */
@@ -592,7 +590,7 @@ static void benet_vlan_add_vid(struct net_device *netdev, u16 vlan_id)
*/
static void benet_vlan_rem_vid(struct net_device *netdev, u16 vlan_id)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
u32 i, value;
@@ -629,7 +627,7 @@ static void benet_vlan_rem_vid(struct net_device *netdev, u16 vlan_id)
*/
static void be_set_multicast_filter(struct net_device *netdev)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct dev_mc_list *mc_ptr;
u8 mac_addr[32][ETH_ALEN];
int i;
@@ -659,7 +657,7 @@ static void be_set_multicast_filter(struct net_device *netdev)
*/
static void benet_set_multicast_list(struct net_device *netdev)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
if (netdev->flags & IFF_PROMISC) {
be_rxf_promiscuous(&pnob->fn_obj, 1, 1, NULL, NULL, NULL);
@@ -671,7 +669,7 @@ static void benet_set_multicast_list(struct net_device *netdev)
int benet_init(struct net_device *netdev)
{
- struct be_net_object *pnob = netdev->priv;
+ struct be_net_object *pnob = netdev_priv(netdev);
struct be_adapter *adapter = pnob->adapter;
ether_setup(netdev);