# Re: \[PATCH net-next 10/10\] wwan: core: add WWAN common private data for netdev

- From: Sergey Ryazanov \<ryazanov.s.a@gmail.com\>
- Date: 2021-06-20 14:49:24 
- List: netdev
- Page: https://ratatoskr.run/netdev/2021/06/11205864
- Thread: https://ratatoskr.run/netdev/2021/06/11205465/t.md

```text
Hello Johannes,

On Tue, Jun 15, 2021 at 10:31 AM Johannes Berg
[ref] wrote:
> On Tue, 2021-06-15 at 03:30 +0300, Sergey Ryazanov wrote:
>> The WWAN core not only multiplex the netdev configuration data, but
>> process it too, and needs some space to store its private data
>> associated with the netdev. Add a structure to keep common WWAN core
>> data. The structure will be stored inside the netdev private data before
>> WWAN driver private data and have a field to make it easier to access
>> the driver data. Also add a helper function that simplifies drivers
>> access to their data.
>>
>> At the moment we use the common WWAN private data to store the WWAN data
>> link (channel) id at the time the link is created, and report it back to
>> user using the .fill_info() RTNL callback. This should help the user to
>> be aware which network interface is binded to which WWAN device data
>
> Nit: "binded" -> "bound".

Oh. Will fix it in V2.

>> +static size_t wwan_rtnl_get_size(const struct net_device *dev)
>> +{
>> +     return
>> +             nla_total_size(4) +     /* IFLA_WWAN_LINK_ID */
>> +             0;
>> +}
>>
>
> Not sure I like that code style, but I guess I don't care much either :)

Yeah. I am not happy with that code style either. But this is the only
git-blame friendly style known to me that allows us to add new lines
without touching existing ones :(

-- 
Sergey
```
