Changeset 231b3fd in mainline for uspace/drv/nic/e1k/e1k.c
- Timestamp:
- 2018-08-25T21:35:26Z (6 years ago)
- Parents:
- e2625b1a (diff), 3c45353 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - git-author:
- Jakub Jermář <jakub@…> (2018-08-25 21:35:26)
- git-committer:
- GitHub <noreply@…> (2018-08-25 21:35:26)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/nic/e1k/e1k.c
re2625b1a r231b3fd 327 327 } 328 328 329 static uint16_t e1000_calculate_itr_interval_from_usecs( suseconds_t useconds)329 static uint16_t e1000_calculate_itr_interval_from_usecs(usec_t useconds) 330 330 { 331 331 return useconds * 4; … … 1299 1299 } 1300 1300 1301 /** Calculates ITR register interrupt from time valstructure1301 /** Calculates ITR register interrupt from timespec structure 1302 1302 * 1303 1303 * @param period Period 1304 1304 * 1305 1305 */ 1306 static uint16_t e1000_calculate_itr_interval(const struct time val*period)1306 static uint16_t e1000_calculate_itr_interval(const struct timespec *period) 1307 1307 { 1308 1308 // TODO: use also tv_sec 1309 return e1000_calculate_itr_interval_from_usecs( period->tv_usec);1309 return e1000_calculate_itr_interval_from_usecs(NSEC2USEC(period->tv_nsec)); 1310 1310 } 1311 1311 … … 1321 1321 */ 1322 1322 static errno_t e1000_poll_mode_change(nic_t *nic, nic_poll_mode_t mode, 1323 const struct time val*period)1323 const struct timespec *period) 1324 1324 { 1325 1325 assert(nic); … … 2182 2182 goto err_rx_structure; 2183 2183 2184 struct time valperiod;2184 struct timespec period; 2185 2185 period.tv_sec = 0; 2186 period.tv_ usec = E1000_DEFAULT_INTERRUPT_INTERVAL_USEC;2186 period.tv_nsec = USEC2NSEC(E1000_DEFAULT_INTERRUPT_INTERVAL_USEC); 2187 2187 rc = nic_report_poll_mode(nic, NIC_POLL_PERIODIC, &period); 2188 2188 if (rc != EOK)
Note:
See TracChangeset
for help on using the changeset viewer.