diff options
author | Sergey Ryazanov <ryazanov.s.a@gmail.com> | 2021-06-22 01:50:58 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-22 10:01:16 -0700 |
commit | ca374290aaade741a4781ae5f6e1ba7515e4e5fa (patch) | |
tree | 8b83a3501a985d176163fdd750b9eb714515a175 /include | |
parent | 9f0248ea476ee59d336d7c8bf1a5d0919d93d030 (diff) |
wwan: core: support default netdev creation
Most, if not each WWAN device driver will create a netdev for the
default data channel. Therefore, add an option for the WWAN netdev ops
registration function to create a default netdev for the WWAN device.
A WWAN device driver should pass a default data channel link id to the
ops registering function to request the creation of a default netdev, or
a special value WWAN_NO_DEFAULT_LINK to inform the WWAN core that the
default netdev should not be created.
For now, only wwan_hwsim utilize the default link creation option. Other
drivers will be reworked next.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
CC: M Chetan Kumar <m.chetan.kumar@intel.com>
CC: Intel Corporation <linuxwwan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/wwan.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/wwan.h b/include/linux/wwan.h index e1981ea3a2fd..91590db70a12 100644 --- a/include/linux/wwan.h +++ b/include/linux/wwan.h @@ -126,6 +126,12 @@ void wwan_port_txon(struct wwan_port *port); */ void *wwan_port_get_drvdata(struct wwan_port *port); +/* + * Used to indicate that the WWAN core should not create a default network + * link. + */ +#define WWAN_NO_DEFAULT_LINK U32_MAX + /** * struct wwan_ops - WWAN device ops * @priv_size: size of private netdev data area @@ -143,7 +149,7 @@ struct wwan_ops { }; int wwan_register_ops(struct device *parent, const struct wwan_ops *ops, - void *ctxt); + void *ctxt, u32 def_link_id); void wwan_unregister_ops(struct device *parent); |