-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'Add-MBIM-over-MHI-support'
Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Showing
5 changed files
with
394 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
obj-$(CONFIG_MHI_NET) += mhi_net.o | ||
|
||
mhi_net-y := net.o proto_mbim.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* SPDX-License-Identifier: GPL-2.0-or-later */ | ||
/* MHI Network driver - Network over MHI bus | ||
* | ||
* Copyright (C) 2021 Linaro Ltd <loic.poulain@linaro.org> | ||
*/ | ||
|
||
struct mhi_net_stats { | ||
u64_stats_t rx_packets; | ||
u64_stats_t rx_bytes; | ||
u64_stats_t rx_errors; | ||
u64_stats_t rx_dropped; | ||
u64_stats_t rx_length_errors; | ||
u64_stats_t tx_packets; | ||
u64_stats_t tx_bytes; | ||
u64_stats_t tx_errors; | ||
u64_stats_t tx_dropped; | ||
struct u64_stats_sync tx_syncp; | ||
struct u64_stats_sync rx_syncp; | ||
}; | ||
|
||
struct mhi_net_dev { | ||
struct mhi_device *mdev; | ||
struct net_device *ndev; | ||
struct sk_buff *skbagg_head; | ||
struct sk_buff *skbagg_tail; | ||
const struct mhi_net_proto *proto; | ||
void *proto_data; | ||
struct delayed_work rx_refill; | ||
struct mhi_net_stats stats; | ||
u32 rx_queue_sz; | ||
int msg_enable; | ||
}; | ||
|
||
struct mhi_net_proto { | ||
int (*init)(struct mhi_net_dev *mhi_netdev); | ||
struct sk_buff * (*tx_fixup)(struct mhi_net_dev *mhi_netdev, struct sk_buff *skb); | ||
void (*rx)(struct mhi_net_dev *mhi_netdev, struct sk_buff *skb); | ||
}; | ||
|
||
extern const struct mhi_net_proto proto_mbim; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.