summaryrefslogtreecommitdiff
path: root/src/network.c
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2019-03-29 16:05:49 +0530
committerNiraj Kumar Goit <niraj.g@samsung.com>2019-04-05 12:56:09 +0530
commit69efc565b595bb39ebdbe635f063675ecf59278c (patch)
tree33c51a4e1d04ba61a143033e32afda67cd93cf83 /src/network.c
parent85074ce75ce1749e270dc9951d003d4a3c1f9cab (diff)
downloadconnman-be12d7daf0ab4743927e6e1d42de4eae1d93703c.tar.gz
connman-be12d7daf0ab4743927e6e1d42de4eae1d93703c.tar.bz2
connman-be12d7daf0ab4743927e6e1d42de4eae1d93703c.zip
Added support of Multiple same SSIDs including band steering.submit/tizen/20190409.131053accepted/tizen/unified/20190410.061801
When there are multiple APs with the same SSID and security, this patch support below features: 1. If AP does not respond to probe request during connection procedure, connman tries to connect with the next available BSSID before sending disconnected event to application. 2. If connection with AP is failed during association due to ASSOC_REJECT, connman tries to connect with the next available BSSID before sending disconnected event to application. Change-Id: Ie80939bd013a12b9c88e91a1fd5a05fbb57c1833 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src/network.c')
-rwxr-xr-xsrc/network.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/src/network.c b/src/network.c
index b7103683..9933b723 100755
--- a/src/network.c
+++ b/src/network.c
@@ -41,11 +41,6 @@
*/
#define RS_REFRESH_TIMEOUT 3
-#if defined TIZEN_EXT
-#define WIFI_ENCYPTION_MODE_LEN_MAX 6
-#define WIFI_BSSID_LEN_MAX 6
-#endif
-
/*
* As per RFC 4861, a host should transmit up to MAX_RTR_SOLICITATIONS(3)
* Router Solicitation messages, each separated by at least
@@ -107,6 +102,7 @@ struct connman_network {
#if defined TIZEN_EXT
char encryption_mode[WIFI_ENCYPTION_MODE_LEN_MAX];
unsigned char bssid[WIFI_BSSID_LEN_MAX];
+ char last_bssid[MAC_ADDRESS_LENGTH];
unsigned int maxrate;
int maxspeed;
bool isHS20AP;
@@ -1584,6 +1580,11 @@ int connman_network_set_connected(struct connman_network *network,
network, network->connected, connected, network->connecting,
network->associating);
+#if defined TIZEN_EXT
+ /* reset last connect request bssid */
+ connman_network_set_last_bssid(network, NULL);
+#endif
+
if ((network->connecting || network->associating) &&
!connected) {
connman_network_set_error(network,
@@ -1975,6 +1976,23 @@ unsigned char *connman_network_get_bssid(struct connman_network *network)
return (unsigned char *)network->wifi.bssid;
}
+int connman_network_set_last_bssid(struct connman_network *network,
+ const char *bssid)
+{
+ if (bssid == NULL) {
+ memset(network->wifi.last_bssid, '\0', sizeof(network->wifi.last_bssid));
+ return -EINVAL;
+ }
+ strncpy(network->wifi.last_bssid, bssid, MAC_ADDRESS_LENGTH - 1);
+
+ return 0;
+}
+
+char *connman_network_get_last_bssid(struct connman_network *network)
+{
+ return (char *)network->wifi.last_bssid;
+}
+
int connman_network_set_maxspeed(struct connman_network *network,
int maxspeed)
{