aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/oki-semi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/oki-semi')
-rw-r--r--drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
index dc15e9315f32..799a85aa12b3 100644
--- a/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
+++ b/drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c
@@ -103,9 +103,9 @@ const char pch_driver_version[] = DRV_VERSION;
103/* Macros for ieee1588 */ 103/* Macros for ieee1588 */
104/* 0x40 Time Synchronization Channel Control Register Bits */ 104/* 0x40 Time Synchronization Channel Control Register Bits */
105#define MASTER_MODE (1<<0) 105#define MASTER_MODE (1<<0)
106#define SLAVE_MODE (0<<0) 106#define SLAVE_MODE (0)
107#define V2_MODE (1<<31) 107#define V2_MODE (1<<31)
108#define CAP_MODE0 (0<<16) 108#define CAP_MODE0 (0)
109#define CAP_MODE2 (1<<17) 109#define CAP_MODE2 (1<<17)
110 110
111/* 0x44 Time Synchronization Channel Event Register Bits */ 111/* 0x44 Time Synchronization Channel Event Register Bits */
@@ -151,8 +151,8 @@ static int pch_ptp_match(struct sk_buff *skb, u16 uid_hi, u32 uid_lo, u16 seqid)
151 seqid == *id); 151 seqid == *id);
152} 152}
153 153
154static void pch_rx_timestamp( 154static void
155 struct pch_gbe_adapter *adapter, struct sk_buff *skb) 155pch_rx_timestamp(struct pch_gbe_adapter *adapter, struct sk_buff *skb)
156{ 156{
157 struct skb_shared_hwtstamps *shhwtstamps; 157 struct skb_shared_hwtstamps *shhwtstamps;
158 struct pci_dev *pdev; 158 struct pci_dev *pdev;
@@ -189,8 +189,8 @@ out:
189 pch_ch_event_write(pdev, RX_SNAPSHOT_LOCKED); 189 pch_ch_event_write(pdev, RX_SNAPSHOT_LOCKED);
190} 190}
191 191
192static void pch_tx_timestamp( 192static void
193 struct pch_gbe_adapter *adapter, struct sk_buff *skb) 193pch_tx_timestamp(struct pch_gbe_adapter *adapter, struct sk_buff *skb)
194{ 194{
195 struct skb_shared_hwtstamps shhwtstamps; 195 struct skb_shared_hwtstamps shhwtstamps;
196 struct pci_dev *pdev; 196 struct pci_dev *pdev;
@@ -263,15 +263,15 @@ static int hwtstamp_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
263 break; 263 break;
264 case HWTSTAMP_FILTER_PTP_V1_L4_SYNC: 264 case HWTSTAMP_FILTER_PTP_V1_L4_SYNC:
265 adapter->hwts_rx_en = 0; 265 adapter->hwts_rx_en = 0;
266 pch_ch_control_write(pdev, (SLAVE_MODE | CAP_MODE0)); 266 pch_ch_control_write(pdev, SLAVE_MODE | CAP_MODE0);
267 break; 267 break;
268 case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ: 268 case HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ:
269 adapter->hwts_rx_en = 1; 269 adapter->hwts_rx_en = 1;
270 pch_ch_control_write(pdev, (MASTER_MODE | CAP_MODE0)); 270 pch_ch_control_write(pdev, MASTER_MODE | CAP_MODE0);
271 break; 271 break;
272 case HWTSTAMP_FILTER_PTP_V2_EVENT: 272 case HWTSTAMP_FILTER_PTP_V2_EVENT:
273 adapter->hwts_rx_en = 1; 273 adapter->hwts_rx_en = 1;
274 pch_ch_control_write(pdev, (V2_MODE | CAP_MODE2)); 274 pch_ch_control_write(pdev, V2_MODE | CAP_MODE2);
275 break; 275 break;
276 default: 276 default:
277 return -ERANGE; 277 return -ERANGE;