Re: [PATCH 1/8] tty: n_gsm: fix formatting errors

2016-02-22 Thread Andrej Krpic
On 21.02.2016 22:30, Joe Perches wrote: On Sun, 2016-02-21 at 22:38 +0100, Andrej Krpic wrote: Minor formatting changes to remove errors and reduce number of warnings produced by checkpatch.pl script. [] diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c [] @@ -489,7 +490,8 @@ static

Re: [PATCH 1/8] tty: n_gsm: fix formatting errors

2016-02-22 Thread Andrej Krpic
On 21.02.2016 22:30, Joe Perches wrote: On Sun, 2016-02-21 at 22:38 +0100, Andrej Krpic wrote: Minor formatting changes to remove errors and reduce number of warnings produced by checkpatch.pl script. [] diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c [] @@ -489,7 +490,8 @@ static

Re: [PATCH 0/8] tty: n_gsm: Make mux work as a responder station

2016-02-22 Thread Andrej Krpic
On 21.02.2016 23:42, One Thousand Gnomes wrote: On Sun, 21 Feb 2016 22:38:29 +0100 Andrej Krpic <a...@tnode.com> wrote: When using n_gsm you have to explicitly set it to work as a initiator station. This led me to believe that it can also work as a responder. snip This looks reasonable

Re: [PATCH 0/8] tty: n_gsm: Make mux work as a responder station

2016-02-22 Thread Andrej Krpic
On 21.02.2016 23:42, One Thousand Gnomes wrote: On Sun, 21 Feb 2016 22:38:29 +0100 Andrej Krpic wrote: When using n_gsm you have to explicitly set it to work as a initiator station. This led me to believe that it can also work as a responder. snip This looks reasonable to me. It was never

Re: [PATCH 0/8] tty: n_gsm: Make mux work as a responder station *DUPLICATE*

2016-02-22 Thread Andrej Krpic
Please ignore this duplicate thread.

Re: [PATCH 0/8] tty: n_gsm: Make mux work as a responder station *DUPLICATE*

2016-02-22 Thread Andrej Krpic
Please ignore this duplicate thread.

[PATCH 1/8] tty: n_gsm: fix formatting errors

2016-02-22 Thread Andrej Krpic
Minor formatting changes to remove errors and reduce number of warnings produced by checkpatch.pl script. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 138 1 file changed, 95 insertions(+), 43 deletions(-) diff

[PATCH 1/8] tty: n_gsm: fix formatting errors

2016-02-22 Thread Andrej Krpic
Minor formatting changes to remove errors and reduce number of warnings produced by checkpatch.pl script. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 138 1 file changed, 95 insertions(+), 43 deletions(-) diff --git a/drivers/tty

[PATCH 3/8] tty: n_gsm: make mux work as a responder station

2016-02-22 Thread Andrej Krpic
0 10 0 (response) 1 0 _\ 01 1 (command) 0 1 / 01 1 (command) 1 1 10 0 (response) Signed-off-by: An

[PATCH 3/8] tty: n_gsm: make mux work as a responder station

2016-02-22 Thread Andrej Krpic
0 10 0 (response) 1 0 _\ 01 1 (command) 0 1 / 01 1 (command) 1 1 10 0 (response) Signed-off-by: An

[PATCH 2/8] tty: n_gsm: fix C/R bit when sending as a responder

2016-02-22 Thread Andrej Krpic
, valid sent commands and received responses must have C/R bit set to 0. Change the value of C/R bit in command and response frames to depend on whether the station is initator or not. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 4 ++-- 1 file changed, 2 insertions

[PATCH 2/8] tty: n_gsm: fix C/R bit when sending as a responder

2016-02-22 Thread Andrej Krpic
, valid sent commands and received responses must have C/R bit set to 0. Change the value of C/R bit in command and response frames to depend on whether the station is initator or not. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 7/8] tty: n_gsm: properly format Modem Status Command message

2016-02-22 Thread Andrej Krpic
of transmitted control messages is fixed and control messages start to be recognized. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 8aa90e0..b0d9edd

[PATCH 7/8] tty: n_gsm: properly format Modem Status Command message

2016-02-22 Thread Andrej Krpic
of transmitted control messages is fixed and control messages start to be recognized. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 8aa90e0..b0d9edd 100644 --- a/drivers/tty

[PATCH 6/8] tty: n_gsm: add missing length field in control channel commands

2016-02-22 Thread Andrej Krpic
) as it is done in gsm_control_reply and expected in gsm_dlci_command. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 3c4c521..8aa90e0 100644 --- a/d

[PATCH 8/8] tty: n_gsm: Enable reception of frames separated with a single SOF marker

2016-02-22 Thread Andrej Krpic
). Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index b0d9edd..12b149d 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1895,9 +1

[PATCH 6/8] tty: n_gsm: add missing length field in control channel commands

2016-02-22 Thread Andrej Krpic
) as it is done in gsm_control_reply and expected in gsm_dlci_command. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 3c4c521..8aa90e0 100644 --- a/drivers/tty/n_gsm.c

[PATCH 8/8] tty: n_gsm: Enable reception of frames separated with a single SOF marker

2016-02-22 Thread Andrej Krpic
). Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index b0d9edd..12b149d 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1895,9 +1895,14 @@ static void

[PATCH 0/8] tty: n_gsm: Make mux work as a responder station

2016-02-22 Thread Andrej Krpic
by the checkpatch script. Andrej Krpic (8): tty: n_gsm: fix formatting errors tty: n_gsm: fix C/R bit when sending as a responder tty: n_gsm: make mux work as a responder station tty: n_gsm: send DM response when accessing an invalid channel tty: n_gsm: replace dead code with a meaningful comment

[PATCH 0/8] tty: n_gsm: Make mux work as a responder station

2016-02-22 Thread Andrej Krpic
by the checkpatch script. Andrej Krpic (8): tty: n_gsm: fix formatting errors tty: n_gsm: fix C/R bit when sending as a responder tty: n_gsm: make mux work as a responder station tty: n_gsm: send DM response when accessing an invalid channel tty: n_gsm: replace dead code with a meaningful comment

[PATCH 5/8] tty: n_gsm: replace dead code with a meaningful comment

2016-02-22 Thread Andrej Krpic
UI/UIH frame can be received as a command from other station or as a response to a command we issued earlier. Add this knowledge to the source code as a comment and remove useless #if 0/#endif block. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 9 +

[PATCH 5/8] tty: n_gsm: replace dead code with a meaningful comment

2016-02-22 Thread Andrej Krpic
UI/UIH frame can be received as a command from other station or as a response to a command we issued earlier. Add this knowledge to the source code as a comment and remove useless #if 0/#endif block. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 9 + 1 file changed, 5

[PATCH 4/8] tty: n_gsm: send DM response when accessing an invalid channel

2016-02-22 Thread Andrej Krpic
Change C/R bit in a response to a UI/UIH frame sent to non-existing/closed channel. As DM frame type is only valid as a response, it should be sent using gsm_response function. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 4/8] tty: n_gsm: send DM response when accessing an invalid channel

2016-02-22 Thread Andrej Krpic
Change C/R bit in a response to a UI/UIH frame sent to non-existing/closed channel. As DM frame type is only valid as a response, it should be sent using gsm_response function. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/8] tty: n_gsm: fix formatting errors

2016-02-21 Thread Andrej Krpic
Minor formatting changes to remove errors and reduce number of warnings produced by checkpatch.pl script. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 138 1 file changed, 95 insertions(+), 43 deletions(-) diff

[PATCH 1/8] tty: n_gsm: fix formatting errors

2016-02-21 Thread Andrej Krpic
Minor formatting changes to remove errors and reduce number of warnings produced by checkpatch.pl script. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 138 1 file changed, 95 insertions(+), 43 deletions(-) diff --git a/drivers/tty

[PATCH 0/8] tty: n_gsm: Make mux work as a responder station

2016-02-21 Thread Andrej Krpic
by the checkpatch script. Andrej Krpic (8): tty: n_gsm: fix formatting errors tty: n_gsm: fix C/R bit when sending as a responder tty: n_gsm: make mux work as a responder station tty: n_gsm: send DM response when accessing an invalid channel tty: n_gsm: replace dead code with a meaningful comment

[PATCH 0/8] tty: n_gsm: Make mux work as a responder station

2016-02-21 Thread Andrej Krpic
by the checkpatch script. Andrej Krpic (8): tty: n_gsm: fix formatting errors tty: n_gsm: fix C/R bit when sending as a responder tty: n_gsm: make mux work as a responder station tty: n_gsm: send DM response when accessing an invalid channel tty: n_gsm: replace dead code with a meaningful comment

[PATCH 6/8] tty: n_gsm: add missing length field in control channel commands

2016-02-21 Thread Andrej Krpic
) as it is done in gsm_control_reply and expected in gsm_dlci_command. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 3c4c521..8aa90e0 100644 --- a/d

[PATCH 3/8] tty: n_gsm: make mux work as a responder station

2016-02-21 Thread Andrej Krpic
0 10 0 (response) 1 0 _\ 01 1 (command) 0 1 / 01 1 (command) 1 1 10 0 (response) Signed-off-by: An

[PATCH 6/8] tty: n_gsm: add missing length field in control channel commands

2016-02-21 Thread Andrej Krpic
) as it is done in gsm_control_reply and expected in gsm_dlci_command. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 3c4c521..8aa90e0 100644 --- a/drivers/tty/n_gsm.c

[PATCH 3/8] tty: n_gsm: make mux work as a responder station

2016-02-21 Thread Andrej Krpic
0 10 0 (response) 1 0 _\ 01 1 (command) 0 1 / 01 1 (command) 1 1 10 0 (response) Signed-off-by: An

[PATCH 2/8] tty: n_gsm: fix C/R bit when sending as a responder

2016-02-21 Thread Andrej Krpic
, valid sent commands and received responses must have C/R bit set to 0. Change the value of C/R bit in command and response frames to depend on whether the station is initator or not. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 4 ++-- 1 file changed, 2 insertions

[PATCH 7/8] tty: n_gsm: properly format Modem Status Command message

2016-02-21 Thread Andrej Krpic
of transmitted control messages is fixed and control messages start to be recognized. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 8aa90e0..b0d9edd

[PATCH 4/8] tty: n_gsm: send DM response when accessing an invalid channel

2016-02-21 Thread Andrej Krpic
Change C/R bit in a response to a UI/UIH frame sent to non-existing/closed channel. As DM frame type is only valid as a response, it should be sent using gsm_response function. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[PATCH 2/8] tty: n_gsm: fix C/R bit when sending as a responder

2016-02-21 Thread Andrej Krpic
, valid sent commands and received responses must have C/R bit set to 0. Change the value of C/R bit in command and response frames to depend on whether the station is initator or not. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 7/8] tty: n_gsm: properly format Modem Status Command message

2016-02-21 Thread Andrej Krpic
of transmitted control messages is fixed and control messages start to be recognized. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index 8aa90e0..b0d9edd 100644 --- a/drivers/tty

[PATCH 4/8] tty: n_gsm: send DM response when accessing an invalid channel

2016-02-21 Thread Andrej Krpic
Change C/R bit in a response to a UI/UIH frame sent to non-existing/closed channel. As DM frame type is only valid as a response, it should be sent using gsm_response function. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 8/8] tty: n_gsm: Enable reception of frames separated with a single SOF marker

2016-02-21 Thread Andrej Krpic
). Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index b0d9edd..12b149d 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1895,9 +1

[PATCH 5/8] tty: n_gsm: replace dead code with a meaningful comment

2016-02-21 Thread Andrej Krpic
UI/UIH frame can be received as a command from other station or as a response to a command we issued earlier. Add this knowledge to the source code as a comment and remove useless #if 0/#endif block. Signed-off-by: Andrej Krpic <a...@tnode.com> --- drivers/tty/n_gsm.c | 9 +

[PATCH 8/8] tty: n_gsm: Enable reception of frames separated with a single SOF marker

2016-02-21 Thread Andrej Krpic
). Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c index b0d9edd..12b149d 100644 --- a/drivers/tty/n_gsm.c +++ b/drivers/tty/n_gsm.c @@ -1895,9 +1895,14 @@ static void

[PATCH 5/8] tty: n_gsm: replace dead code with a meaningful comment

2016-02-21 Thread Andrej Krpic
UI/UIH frame can be received as a command from other station or as a response to a command we issued earlier. Add this knowledge to the source code as a comment and remove useless #if 0/#endif block. Signed-off-by: Andrej Krpic --- drivers/tty/n_gsm.c | 9 + 1 file changed, 5