From: Tim Kourt <tim.a.kourt@linux.intel.com>
To: iwd@lists.01.org
Subject: [PATCH] station: Simplify and comply with coding style
Date: Tue, 08 Oct 2019 13:18:17 -0700 [thread overview]
Message-ID: <20191008201817.29586-1-tim.a.kourt@linux.intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1436 bytes --]
---
src/station.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/station.c b/src/station.c
index 9b3e087e..72393d51 100644
--- a/src/station.c
+++ b/src/station.c
@@ -1164,19 +1164,20 @@ static void station_enter_state(struct station *station,
case STATION_STATE_CONNECTED:
periodic_scan_stop(station);
+ if (!station->netconfig)
+ break;
+
if (station->state == STATION_STATE_ROAMING) {
- if (station->netconfig)
- netconfig_reconfigure(station->netconfig);
+ netconfig_reconfigure(station->netconfig);
break;
}
- if (station->netconfig)
- netconfig_configure(station->netconfig,
- network_get_settings(
- station->connected_network),
- netdev_get_address(
- station->netdev));
+ netconfig_configure(station->netconfig,
+ network_get_settings(
+ station->connected_network),
+ netdev_get_address(
+ station->netdev));
break;
case STATION_STATE_DISCONNECTING:
case STATION_STATE_ROAMING:
@@ -3066,9 +3067,10 @@ static void station_free(struct station *station)
if (station->connected_bss)
netdev_disconnect(station->netdev, NULL, NULL);
- if (station->netconfig)
+ if (station->netconfig) {
netconfig_destroy(station->netconfig);
- station->netconfig = NULL;
+ station->netconfig = NULL;
+ }
periodic_scan_stop(station);
--
2.13.6
next reply other threads:[~2019-10-08 20:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-08 20:18 Tim Kourt [this message]
2019-10-09 19:19 ` [PATCH] station: Simplify and comply with coding style Denis Kenzior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191008201817.29586-1-tim.a.kourt@linux.intel.com \
--to=tim.a.kourt@linux.intel.com \
--cc=iwd@lists.01.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox