History

tty: n_gsm: add restart flag to DLC specific ioctl config

Currently, changing the parameters of a DLCI gives no direct control to the user whether this should trigger a channel 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 channel reset after parameter configuration for non-conflicting changes. Add the parameter 'flags' to 'gsm_dlci_config' to force a channel reset after ioctl setting regardless of whether the changes made require this or not by setting this to 'GSM_FL_RESTART'. Note that 'GSM_FL_RESTART' is currently the only allow flag to allow additions here.

Daniel Starke committed 3 years ago

Commit a031c771 parent 54b45ee2 files · +18 −1Browse files

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

Unified · Split

include/uapi/linux/gsmmux.h+14−1
@@ -2,10 +2,22 @@ · 1 unmodified line
2#ifndef _LINUX_GSMMUX_H2#ifndef _LINUX_GSMMUX_H
3#define _LINUX_GSMMUX_H3#define _LINUX_GSMMUX_H
4 4
5#include <linux/const.h>
5#include <linux/if.h>6#include <linux/if.h>
6#include <linux/ioctl.h>7#include <linux/ioctl.h>
7#include <linux/types.h>8#include <linux/types.h>
8 9
10/*
11 * flags definition for n_gsm
12 *
13 * Used by:
14 * struct gsm_dlci_config.flags
15 */
16/* Forces a DLCI reset if set. Otherwise, a DLCI reset is only done if
17 * incompatible settings were provided. Always cleared on retrieval.
18 */
19#define GSM_FL_RESTART _BITUL(0)
20
9struct gsm_config21struct gsm_config
10{22{
11 unsigned int adaption;23 unsigned int adaption;
@@ -58,7 +70,8 @@ struct gsm_dlci_config { · 46 unmodified lines
58 __u32 priority; /* Priority (0 for default value) */70 __u32 priority; /* Priority (0 for default value) */
59 __u32 i; /* Frame type (1 = UIH, 2 = UI) */71 __u32 i; /* Frame type (1 = UIH, 2 = UI) */
60 __u32 k; /* Window size (0 for default value) */72 __u32 k; /* Window size (0 for default value) */
61 __u32 reserved[8]; /* For future use, must be initialized to zero */73 __u32 flags; /* DLCI specific flags. */
74 __u32 reserved[7]; /* For future use, must be initialized to zero */
62};75};
63 76
64#define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config)77#define GSMIOC_GETCONF_DLCI _IOWR('G', 7, struct gsm_dlci_config)

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