History

tty: n_gsm: add restart flag to extended ioctl config

Currently, changing the parameters of the n_gsm mux gives no direct control to the user whether this should trigger a mux reset or not. The decision is solely made by the driver based on the assumption which parameter changes are compatible or not. Therefore, the user has no means to perform an automatic mux reset after parameter configuration for non-conflicting changes. Add the parameter 'flags' to 'gsm_config_ext' to force a mux reset after ioctl setting regardless of whether the changes made require this or not by setting this to 'GSM_FL_RESTART'. This is done similar to 'GSM_FL_RESTART' in gsm_dlci_config.flags. Note that 'GSM_FL_RESTART' is currently the only allowed flag to allow additions here.

Daniel Starke committed 3 years ago

Commit e112ec41 parent 57677122 files · +27 −1Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/gsmmux.h+4−1
@@ -11,6 +11,7 @@ · 10 unmodified lines
11 * flags definition for n_gsm11 * flags definition for n_gsm
12 *12 *
13 * Used by:13 * Used by:
14 * struct gsm_config_ext.flags
14 * struct gsm_dlci_config.flags15 * struct gsm_dlci_config.flags
15 */16 */
16/* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if17/* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if
@@ -98,12 +99,14 @@ struct gsm_netconfig { · 81 unmodified lines
98 *99 *
99 * @keep_alive: Control channel keep-alive in 1/100th of a second (0 to disable).100 * @keep_alive: Control channel keep-alive in 1/100th of a second (0 to disable).
100 * @wait_config: Wait for DLCI config before opening virtual link?101 * @wait_config: Wait for DLCI config before opening virtual link?
102 * @flags: Mux specific flags.
101 * @reserved: For future use, must be initialized to zero.103 * @reserved: For future use, must be initialized to zero.
102 */104 */
103struct gsm_config_ext {105struct gsm_config_ext {
104 __u32 keep_alive;106 __u32 keep_alive;
105 __u32 wait_config;107 __u32 wait_config;
106 __u32 reserved[6];108 __u32 flags;
109 __u32 reserved[5];
107};110};
108 111
109#define GSMIOC_GETCONF_EXT _IOR('G', 5, struct gsm_config_ext)112#define GSMIOC_GETCONF_EXT _IOR('G', 5, struct gsm_config_ext)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t