.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * USB-to-WWAN Driver for Sierra Wireless modems |
---|
3 | 4 | * |
---|
.. | .. |
---|
9 | 10 | * |
---|
10 | 11 | * IMPORTANT DISCLAIMER: This driver is not commercially supported by |
---|
11 | 12 | * Sierra Wireless. Use at your own risk. |
---|
12 | | - * |
---|
13 | | - * This program is free software; you can redistribute it and/or modify |
---|
14 | | - * it under the terms of the GNU General Public License as published by |
---|
15 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
16 | | - * (at your option) any later version. |
---|
17 | | - * |
---|
18 | | - * This program is distributed in the hope that it will be useful, |
---|
19 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
20 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
21 | | - * GNU General Public License for more details. |
---|
22 | | - * |
---|
23 | | - * You should have received a copy of the GNU General Public License |
---|
24 | | - * along with this program; if not, see <http://www.gnu.org/licenses/>. |
---|
25 | 13 | */ |
---|
26 | 14 | |
---|
27 | 15 | #define DRIVER_VERSION "v.2.0" |
---|
.. | .. |
---|
364 | 352 | priv->tx_hdr_template[1] = ctx_ix; |
---|
365 | 353 | *((__be16 *)&priv->tx_hdr_template[2]) = |
---|
366 | 354 | cpu_to_be16(SIERRA_NET_HIP_EXT_IP_OUT_ID); |
---|
367 | | -} |
---|
368 | | - |
---|
369 | | -static inline int sierra_net_is_valid_addrlen(u8 len) |
---|
370 | | -{ |
---|
371 | | - return len == sizeof(struct in_addr); |
---|
372 | 355 | } |
---|
373 | 356 | |
---|
374 | 357 | static int sierra_net_parse_lsi(struct usbnet *dev, char *data, int datalen) |
---|
.. | .. |
---|
877 | 860 | u16 len; |
---|
878 | 861 | bool need_tail; |
---|
879 | 862 | |
---|
880 | | - BUILD_BUG_ON(FIELD_SIZEOF(struct usbnet, data) |
---|
| 863 | + BUILD_BUG_ON(sizeof_field(struct usbnet, data) |
---|
881 | 864 | < sizeof(struct cdc_state)); |
---|
882 | 865 | |
---|
883 | 866 | dev_dbg(&dev->udev->dev, "%s", __func__); |
---|