Loading drivers/char/diag/diag_masks.c +7 −2 Original line number Diff line number Diff line Loading @@ -456,8 +456,13 @@ static void diag_send_feature_mask_update(uint8_t peripheral) DIAG_SET_FEATURE_MASK(F_DIAG_REQ_RSP_SUPPORT); if (driver->supports_apps_hdlc_encoding) DIAG_SET_FEATURE_MASK(F_DIAG_APPS_HDLC_ENCODE); if (driver->supports_apps_header_untagging) if (driver->supports_apps_header_untagging) { if (peripheral == PERIPHERAL_MODEM) { DIAG_SET_FEATURE_MASK(F_DIAG_PKT_HEADER_UNTAG); driver->peripheral_untag[peripheral] = ENABLE_PKT_HEADER_UNTAGGING; } } DIAG_SET_FEATURE_MASK(F_DIAG_MASK_CENTRALIZATION); if (driver->supports_sockets) DIAG_SET_FEATURE_MASK(F_DIAG_SOCKETS_ENABLED); Loading drivers/char/diag/diagchar.h +1 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,7 @@ struct diagchar_dev { int supports_separate_cmdrsp; int supports_apps_hdlc_encoding; int supports_apps_header_untagging; int peripheral_untag[NUM_PERIPHERALS]; int supports_sockets; /* The state requested in the STM command */ int stm_state_requested[NUM_STM_PROCESSORS]; Loading drivers/char/diag/diagfwd.c +2 −0 Original line number Diff line number Diff line Loading @@ -1600,6 +1600,8 @@ int diagfwd_init(void) driver->supports_separate_cmdrsp = 1; driver->supports_apps_hdlc_encoding = 1; driver->supports_apps_header_untagging = 1; for (i = 0; i < NUM_PERIPHERALS; i++) driver->peripheral_untag[i] = 0; mutex_init(&driver->diag_hdlc_mutex); mutex_init(&driver->diag_cntl_mutex); mutex_init(&driver->mode_lock); Loading drivers/char/diag/diagfwd_peripheral.c +10 −3 Original line number Diff line number Diff line Loading @@ -351,7 +351,8 @@ static void diagfwd_data_read_untag_done(struct diagfwd_info *fwd_info, } if (driver->feature[fwd_info->peripheral].encode_hdlc && driver->feature[fwd_info->peripheral].untag_header) { driver->feature[fwd_info->peripheral].untag_header && driver->peripheral_untag[fwd_info->peripheral]) { mutex_lock(&driver->diagfwd_untag_mutex); temp_buf_cpd = buf; temp_buf_main = buf; Loading Loading @@ -1295,6 +1296,7 @@ static void diagfwd_queue_read(struct diagfwd_info *fwd_info) void diagfwd_buffers_init(struct diagfwd_info *fwd_info) { unsigned char *temp_buf; uint8_t peripheral; if (!fwd_info) return; Loading @@ -1306,6 +1308,9 @@ void diagfwd_buffers_init(struct diagfwd_info *fwd_info) } mutex_lock(&fwd_info->buf_mutex); peripheral = fwd_info->peripheral; if (!fwd_info->buf_1) { fwd_info->buf_1 = kzalloc(sizeof(struct diagfwd_buf_t), GFP_KERNEL); Loading Loading @@ -1347,7 +1352,8 @@ void diagfwd_buffers_init(struct diagfwd_info *fwd_info) fwd_info->type, 2); } if (driver->feature[fwd_info->peripheral].untag_header) { if (driver->feature[peripheral].untag_header && driver->peripheral_untag[peripheral]) { if (!fwd_info->buf_upd_1_a) { fwd_info->buf_upd_1_a = kzalloc(sizeof(struct diagfwd_buf_t), Loading Loading @@ -1421,7 +1427,8 @@ void diagfwd_buffers_init(struct diagfwd_info *fwd_info) } if (driver->feature[fwd_info->peripheral]. untag_header) { untag_header && driver->peripheral_untag[peripheral]) { if (!fwd_info->buf_upd_1_a->data_raw) { fwd_info->buf_upd_1_a->data_raw = kzalloc(PERIPHERAL_BUF_SZ + Loading Loading
drivers/char/diag/diag_masks.c +7 −2 Original line number Diff line number Diff line Loading @@ -456,8 +456,13 @@ static void diag_send_feature_mask_update(uint8_t peripheral) DIAG_SET_FEATURE_MASK(F_DIAG_REQ_RSP_SUPPORT); if (driver->supports_apps_hdlc_encoding) DIAG_SET_FEATURE_MASK(F_DIAG_APPS_HDLC_ENCODE); if (driver->supports_apps_header_untagging) if (driver->supports_apps_header_untagging) { if (peripheral == PERIPHERAL_MODEM) { DIAG_SET_FEATURE_MASK(F_DIAG_PKT_HEADER_UNTAG); driver->peripheral_untag[peripheral] = ENABLE_PKT_HEADER_UNTAGGING; } } DIAG_SET_FEATURE_MASK(F_DIAG_MASK_CENTRALIZATION); if (driver->supports_sockets) DIAG_SET_FEATURE_MASK(F_DIAG_SOCKETS_ENABLED); Loading
drivers/char/diag/diagchar.h +1 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,7 @@ struct diagchar_dev { int supports_separate_cmdrsp; int supports_apps_hdlc_encoding; int supports_apps_header_untagging; int peripheral_untag[NUM_PERIPHERALS]; int supports_sockets; /* The state requested in the STM command */ int stm_state_requested[NUM_STM_PROCESSORS]; Loading
drivers/char/diag/diagfwd.c +2 −0 Original line number Diff line number Diff line Loading @@ -1600,6 +1600,8 @@ int diagfwd_init(void) driver->supports_separate_cmdrsp = 1; driver->supports_apps_hdlc_encoding = 1; driver->supports_apps_header_untagging = 1; for (i = 0; i < NUM_PERIPHERALS; i++) driver->peripheral_untag[i] = 0; mutex_init(&driver->diag_hdlc_mutex); mutex_init(&driver->diag_cntl_mutex); mutex_init(&driver->mode_lock); Loading
drivers/char/diag/diagfwd_peripheral.c +10 −3 Original line number Diff line number Diff line Loading @@ -351,7 +351,8 @@ static void diagfwd_data_read_untag_done(struct diagfwd_info *fwd_info, } if (driver->feature[fwd_info->peripheral].encode_hdlc && driver->feature[fwd_info->peripheral].untag_header) { driver->feature[fwd_info->peripheral].untag_header && driver->peripheral_untag[fwd_info->peripheral]) { mutex_lock(&driver->diagfwd_untag_mutex); temp_buf_cpd = buf; temp_buf_main = buf; Loading Loading @@ -1295,6 +1296,7 @@ static void diagfwd_queue_read(struct diagfwd_info *fwd_info) void diagfwd_buffers_init(struct diagfwd_info *fwd_info) { unsigned char *temp_buf; uint8_t peripheral; if (!fwd_info) return; Loading @@ -1306,6 +1308,9 @@ void diagfwd_buffers_init(struct diagfwd_info *fwd_info) } mutex_lock(&fwd_info->buf_mutex); peripheral = fwd_info->peripheral; if (!fwd_info->buf_1) { fwd_info->buf_1 = kzalloc(sizeof(struct diagfwd_buf_t), GFP_KERNEL); Loading Loading @@ -1347,7 +1352,8 @@ void diagfwd_buffers_init(struct diagfwd_info *fwd_info) fwd_info->type, 2); } if (driver->feature[fwd_info->peripheral].untag_header) { if (driver->feature[peripheral].untag_header && driver->peripheral_untag[peripheral]) { if (!fwd_info->buf_upd_1_a) { fwd_info->buf_upd_1_a = kzalloc(sizeof(struct diagfwd_buf_t), Loading Loading @@ -1421,7 +1427,8 @@ void diagfwd_buffers_init(struct diagfwd_info *fwd_info) } if (driver->feature[fwd_info->peripheral]. untag_header) { untag_header && driver->peripheral_untag[peripheral]) { if (!fwd_info->buf_upd_1_a->data_raw) { fwd_info->buf_upd_1_a->data_raw = kzalloc(PERIPHERAL_BUF_SZ + Loading