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
1111 * flags definition for n_gsm
1212 *
1313 * Used by:
14+ * struct gsm_config_ext.flags
1415 * struct gsm_dlci_config.flags
1516 */
1617 /* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if
@@ -98,12 +99,14 @@ struct gsm_netconfig { · 81 unmodified lines
9899 *
99100 * @keep_alive: Control channel keep-alive in 1/100th of a second (0 to disable).
100101 * @wait_config: Wait for DLCI config before opening virtual link?
102+ * @flags: Mux specific flags.
101103 * @reserved: For future use, must be initialized to zero.
102104 */
103105 struct gsm_config_ext {
104106 __u32 keep_alive;
105107 __u32 wait_config;
106− __u32 reserved[6];
108+ __u32 flags;
109+ __u32 reserved[5];
107110 };
108111
109112 #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