Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| ndo_change_carrier [2018/08/04 12:17] – [net/sched/sch_generic.c] rpjday | ndo_change_carrier [2018/08/04 17:31] (current) – [Overview] rpjday | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ===== Overview ===== | ===== Overview ===== | ||
| - | Setting/ | + | Setting/ |
| ===== Normal behaviour ===== | ===== Normal behaviour ===== | ||
| - | ==== include/ | + | ==== Net device state ==== |
| + | |||
| + | From '' | ||
| Net device state: | Net device state: | ||
| Line 28: | Line 30: | ||
| </ | </ | ||
| - | Check if carrier | + | ==== Checking for state of carrier |
| + | |||
| + | Again from '' | ||
| < | < | ||
| Line 46: | Line 50: | ||
| </ | </ | ||
| - | ==== net/ | + | ==== Test for interface running ==== |
| + | |||
| + | Still in '' | ||
| + | |||
| + | < | ||
| + | /** | ||
| + | | ||
| + | | ||
| + | * | ||
| + | | ||
| + | */ | ||
| + | static inline bool netif_running(const struct net_device *dev) | ||
| + | { | ||
| + | return test_bit(__LINK_STATE_START, | ||
| + | } | ||
| + | </ | ||
| + | ==== Test if carrier on or off ==== | ||
| + | |||
| + | From '' | ||
| < | < | ||