-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Misc fixes for qrild #21
Open
calebccff
wants to merge
7
commits into
linux-msm:master
Choose a base branch
from
aospm:caleb/qrild-fixes
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
ca18508
qmi: export packet header
calebccff d86dacc
lib/logging.h: extern C
calebccff 4246d2a
Add support for the qmi_tlv based QMI accessor
calebccff 9e9b6ba
qmi_tlv: fix dump and improve formatting
calebccff 8ade7c5
tlv_dump: fix off-by-1, add string decode, add dump helper
calebccff b501651
drop tlv_dump stuff, it should be implemented where needed
calebccff bec5bb2
libqrtr: add qmi_tlv_msg_name to map msg_id to name
calebccff File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -167,11 +167,23 @@ ssize_t qmi_encode_message(struct qrtr_packet *pkt, int type, int msg_id, | |
int txn_id, const void *c_struct, | ||
struct qmi_elem_info *ei); | ||
|
||
struct qmi_tlv { | ||
void *allocated; | ||
void *buf; | ||
size_t size; | ||
int error; | ||
}; | ||
|
||
struct qmi_tlv_item { | ||
uint8_t key; | ||
uint16_t len; | ||
uint8_t data[]; | ||
} __attribute__((__packed__)); | ||
|
||
struct qmi_tlv *qmi_tlv_init(uint16_t txn, uint32_t msg_id, uint32_t msg_type); | ||
void *qmi_tlv_encode(struct qmi_tlv *tlv, size_t *len); | ||
struct qmi_tlv *qmi_tlv_decode(void *buf, size_t len); | ||
void qmi_tlv_free(struct qmi_tlv *tlv); | ||
void qmi_tlv_dump(struct qmi_tlv *tlv); | ||
void *qmi_tlv_get(struct qmi_tlv *tlv, uint8_t id, size_t *len); | ||
void *qmi_tlv_get_array(struct qmi_tlv *tlv, uint8_t id, size_t len_size, | ||
size_t *len, size_t *size); | ||
|
@@ -180,15 +192,6 @@ int qmi_tlv_set_array(struct qmi_tlv *tlv, uint8_t id, size_t len_size, | |
void *buf, size_t len, size_t size); | ||
struct qmi_response_type_v01 *qmi_tlv_get_result(struct qmi_tlv *tlv); | ||
|
||
static inline int qmi_tlv_dump_buf(void *buf, size_t len) { | ||
struct qmi_tlv *tlv = qmi_tlv_decode(buf, len); | ||
if (!tlv) | ||
return -1; | ||
qmi_tlv_dump(tlv); | ||
qmi_tlv_free(tlv); | ||
|
||
return 0; | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd say, also squash |
||
/* Initial kernel header didn't expose these */ | ||
#ifndef QRTR_NODE_BCAST | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, my. I started to like the function and now it is gone. Squash everything together so that the remnants of it won't make me mourn the loss each time I look at the git history.