Merge lp:~cyphermox/network-manager/powersave+primaryconnectiontype into lp:~phablet-team/network-manager/rtm
- powersave+primaryconnectiontype
- Merge into rtm
Proposed by
Mathieu Trudel-Lapierre
Status: | Merged |
---|---|
Approved by: | Ricardo Salveti |
Approved revision: | 864 |
Merged at revision: | 863 |
Proposed branch: | lp:~cyphermox/network-manager/powersave+primaryconnectiontype |
Merge into: | lp:~phablet-team/network-manager/rtm |
Diff against target: |
373 lines (+337/-0) 5 files modified
debian/changelog (+18/-0) debian/libnm-util2.symbols (+1/-0) debian/patches/powersave.patch (+114/-0) debian/patches/primary_connection_type.patch (+202/-0) debian/patches/series (+2/-0) |
To merge this branch: | bzr merge lp:~cyphermox/network-manager/powersave+primaryconnectiontype |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ricardo Salveti (community) | Approve | ||
Review via email: mp+239556@code.launchpad.net |
Commit message
Description of the change
- Add powersave (barajas bug 1367745)
- New PrimaryConnecti
To post a comment you must log in.
Revision history for this message
Ricardo Salveti (rsalveti) wrote : | # |
Revision history for this message
Ricardo Salveti (rsalveti) wrote : | # |
*Will create a package
Revision history for this message
Ricardo Salveti (rsalveti) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'debian/changelog' | |||
2 | --- debian/changelog 2014-10-15 19:24:43 +0000 | |||
3 | +++ debian/changelog 2014-10-24 13:10:24 +0000 | |||
4 | @@ -1,3 +1,21 @@ | |||
5 | 1 | network-manager (0.9.8.8-0ubuntu29) UNRELEASED; urgency=medium | ||
6 | 2 | |||
7 | 3 | [ Mathieu Trudel-Lapierre ] | ||
8 | 4 | * debian/patches/powersave.patch: enable powersave mode when wifi devices | ||
9 | 5 | are activated; disable it when we're disconnected so as not to interfere | ||
10 | 6 | with scanning and getting connected again to some network. (LP: #1384823) | ||
11 | 7 | * debian/libnm-util2.symbols: update symbols file for new method | ||
12 | 8 | nm_connection_get_connection_type introduced for the PrimaryConnectionType | ||
13 | 9 | patch. | ||
14 | 10 | |||
15 | 11 | [ Ryan Lortie ] | ||
16 | 12 | * debian/patches/primary_connection_type.patch: export the type of the | ||
17 | 13 | currently active primary connection (the one that currently owns the | ||
18 | 14 | default gateway), for use by applications to figure out when not to do | ||
19 | 15 | heavy requests, for example, while on mobile broadband. (LP: #1384776) | ||
20 | 16 | |||
21 | 17 | -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com> Thu, 23 Oct 2014 15:05:25 -0400 | ||
22 | 18 | |||
23 | 1 | network-manager (0.9.8.8-0ubuntu28) utopic; urgency=medium | 19 | network-manager (0.9.8.8-0ubuntu28) utopic; urgency=medium |
24 | 2 | 20 | ||
25 | 3 | * debian/patches/add_ofono_support.patch: Ignore calls to set_mm_enabled; | 21 | * debian/patches/add_ofono_support.patch: Ignore calls to set_mm_enabled; |
26 | 4 | 22 | ||
27 | === modified file 'debian/libnm-util2.symbols' | |||
28 | --- debian/libnm-util2.symbols 2013-02-26 15:00:41 +0000 | |||
29 | +++ debian/libnm-util2.symbols 2014-10-24 13:10:24 +0000 | |||
30 | @@ -10,6 +10,7 @@ | |||
31 | 10 | nm_connection_error_get_type@Base 0.7.0 | 10 | nm_connection_error_get_type@Base 0.7.0 |
32 | 11 | nm_connection_error_quark@Base 0.7.0 | 11 | nm_connection_error_quark@Base 0.7.0 |
33 | 12 | nm_connection_for_each_setting_value@Base 0.7.0 | 12 | nm_connection_for_each_setting_value@Base 0.7.0 |
34 | 13 | nm_connection_get_connection_type@Base 0.9.8.8-0ubuntu29~ | ||
35 | 13 | nm_connection_get_id@Base 0.8.998 | 14 | nm_connection_get_id@Base 0.8.998 |
36 | 14 | nm_connection_get_path@Base 0.7.0 | 15 | nm_connection_get_path@Base 0.7.0 |
37 | 15 | nm_connection_get_setting@Base 0.7.0 | 16 | nm_connection_get_setting@Base 0.7.0 |
38 | 16 | 17 | ||
39 | === added file 'debian/patches/powersave.patch' | |||
40 | --- debian/patches/powersave.patch 1970-01-01 00:00:00 +0000 | |||
41 | +++ debian/patches/powersave.patch 2014-10-24 13:10:24 +0000 | |||
42 | @@ -0,0 +1,114 @@ | |||
43 | 1 | From: Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | ||
44 | 2 | Subject: Enable the use of powersave mode on supporting wireless devices | ||
45 | 3 | Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1384823 | ||
46 | 4 | |||
47 | 5 | --- | ||
48 | 6 | src/nm-device-wifi.c | 5 +++++ | ||
49 | 7 | src/wifi/wifi-utils-nl80211.c | 23 +++++++++++++++++++++++ | ||
50 | 8 | src/wifi/wifi-utils-private.h | 3 +++ | ||
51 | 9 | src/wifi/wifi-utils.c | 8 ++++++++ | ||
52 | 10 | 4 files changed, 39 insertions(+) | ||
53 | 11 | |||
54 | 12 | Index: b/src/nm-device-wifi.c | ||
55 | 13 | =================================================================== | ||
56 | 14 | --- a/src/nm-device-wifi.c | ||
57 | 15 | +++ b/src/nm-device-wifi.c | ||
58 | 16 | @@ -959,6 +959,8 @@ deactivate (NMDevice *dev) | ||
59 | 17 | /* Reset MAC address back to initial address */ | ||
60 | 18 | _set_hw_addr (self, priv->initial_hw_addr, "reset"); | ||
61 | 19 | |||
62 | 20 | + wifi_utils_set_powersave (priv->wifi_data, FALSE); | ||
63 | 21 | + | ||
64 | 22 | /* Ensure we're in infrastructure mode after deactivation; some devices | ||
65 | 23 | * (usually older ones) don't scan well in adhoc mode. | ||
66 | 24 | */ | ||
67 | 25 | @@ -3489,12 +3491,15 @@ device_state_changed (NMDevice *device, | ||
68 | 26 | nm_supplicant_interface_disconnect (priv->supplicant.iface); | ||
69 | 27 | break; | ||
70 | 28 | case NM_DEVICE_STATE_ACTIVATED: | ||
71 | 29 | + wifi_utils_set_powersave (priv->wifi_data, TRUE); | ||
72 | 30 | activation_success_handler (device); | ||
73 | 31 | break; | ||
74 | 32 | case NM_DEVICE_STATE_FAILED: | ||
75 | 33 | + wifi_utils_set_powersave (priv->wifi_data, FALSE); | ||
76 | 34 | activation_failure_handler (device); | ||
77 | 35 | break; | ||
78 | 36 | case NM_DEVICE_STATE_DISCONNECTED: | ||
79 | 37 | + wifi_utils_set_powersave (priv->wifi_data, FALSE); | ||
80 | 38 | /* Kick off a scan to get latest results */ | ||
81 | 39 | priv->scan_interval = SCAN_INTERVAL_MIN; | ||
82 | 40 | cancel_pending_scan (self); | ||
83 | 41 | Index: b/src/wifi/wifi-utils-nl80211.c | ||
84 | 42 | =================================================================== | ||
85 | 43 | --- a/src/wifi/wifi-utils-nl80211.c | ||
86 | 44 | +++ b/src/wifi/wifi-utils-nl80211.c | ||
87 | 45 | @@ -248,6 +248,28 @@ wifi_nl80211_set_mode (WifiData *data, c | ||
88 | 46 | return FALSE; | ||
89 | 47 | } | ||
90 | 48 | |||
91 | 49 | +static gboolean | ||
92 | 50 | +wifi_nl80211_set_powersave (WifiData *data, gboolean powersave) | ||
93 | 51 | +{ | ||
94 | 52 | + WifiDataNl80211 *nl80211 = (WifiDataNl80211 *) data; | ||
95 | 53 | + struct nl_msg *msg; | ||
96 | 54 | + int err; | ||
97 | 55 | + | ||
98 | 56 | + msg = nl80211_alloc_msg (nl80211, NL80211_CMD_SET_POWER_SAVE, 0); | ||
99 | 57 | + | ||
100 | 58 | + if (powersave) | ||
101 | 59 | + NLA_PUT_U32 (msg, NL80211_ATTR_PS_STATE, NL80211_PS_ENABLED); | ||
102 | 60 | + else | ||
103 | 61 | + NLA_PUT_U32 (msg, NL80211_ATTR_PS_STATE, NL80211_PS_DISABLED); | ||
104 | 62 | + | ||
105 | 63 | + err = nl80211_send_and_recv (nl80211, msg, NULL, NULL); | ||
106 | 64 | + return err ? FALSE : TRUE; | ||
107 | 65 | + | ||
108 | 66 | +nla_put_failure: | ||
109 | 67 | + nlmsg_free (msg); | ||
110 | 68 | + return FALSE; | ||
111 | 69 | +} | ||
112 | 70 | + | ||
113 | 71 | /* @divisor: pass what value @xbm should be divided by to get dBm */ | ||
114 | 72 | static guint32 nl80211_xbm_to_percent (gint32 xbm, guint32 divisor) | ||
115 | 73 | { | ||
116 | 74 | @@ -739,6 +761,7 @@ wifi_nl80211_init (const char *iface, in | ||
117 | 75 | nl80211 = wifi_data_new (iface, ifindex, sizeof (*nl80211)); | ||
118 | 76 | nl80211->parent.get_mode = wifi_nl80211_get_mode; | ||
119 | 77 | nl80211->parent.set_mode = wifi_nl80211_set_mode; | ||
120 | 78 | + nl80211->parent.set_powersave = wifi_nl80211_set_powersave; | ||
121 | 79 | nl80211->parent.get_freq = wifi_nl80211_get_freq; | ||
122 | 80 | nl80211->parent.find_freq = wifi_nl80211_find_freq; | ||
123 | 81 | nl80211->parent.get_ssid = wifi_nl80211_get_ssid; | ||
124 | 82 | Index: b/src/wifi/wifi-utils.c | ||
125 | 83 | =================================================================== | ||
126 | 84 | --- a/src/wifi/wifi-utils.c | ||
127 | 85 | +++ b/src/wifi/wifi-utils.c | ||
128 | 86 | @@ -104,6 +104,14 @@ wifi_utils_set_mode (WifiData *data, con | ||
129 | 87 | return data->set_mode ? data->set_mode (data, mode) : TRUE; | ||
130 | 88 | } | ||
131 | 89 | |||
132 | 90 | +gboolean | ||
133 | 91 | +wifi_utils_set_powersave (WifiData *data, gboolean powersave) | ||
134 | 92 | +{ | ||
135 | 93 | + g_return_val_if_fail (data != NULL, FALSE); | ||
136 | 94 | + | ||
137 | 95 | + return data->set_powersave ? data->set_powersave (data, powersave) : TRUE; | ||
138 | 96 | +} | ||
139 | 97 | + | ||
140 | 98 | guint32 | ||
141 | 99 | wifi_utils_get_freq (WifiData *data) | ||
142 | 100 | { | ||
143 | 101 | Index: b/src/wifi/wifi-utils-private.h | ||
144 | 102 | =================================================================== | ||
145 | 103 | --- a/src/wifi/wifi-utils-private.h | ||
146 | 104 | +++ b/src/wifi/wifi-utils-private.h | ||
147 | 105 | @@ -36,6 +36,9 @@ struct WifiData { | ||
148 | 106 | |||
149 | 107 | gboolean (*set_mode) (WifiData *data, const NM80211Mode mode); | ||
150 | 108 | |||
151 | 109 | + /* Set power saving mode on an interface (nl80211 only) */ | ||
152 | 110 | + gboolean (*set_powersave) (WifiData *data, gboolean powersave); | ||
153 | 111 | + | ||
154 | 112 | /* Return current frequency in MHz (really associated BSS frequency) */ | ||
155 | 113 | guint32 (*get_freq) (WifiData *data); | ||
156 | 114 | |||
157 | 0 | 115 | ||
158 | === added file 'debian/patches/primary_connection_type.patch' | |||
159 | --- debian/patches/primary_connection_type.patch 1970-01-01 00:00:00 +0000 | |||
160 | +++ debian/patches/primary_connection_type.patch 2014-10-24 13:10:24 +0000 | |||
161 | @@ -0,0 +1,202 @@ | |||
162 | 1 | From 01dab14dbba76dd804858cad5f3b6ec4605b0d1a Mon Sep 17 00:00:00 2001 | ||
163 | 2 | From: Ryan Lortie <desrt@desrt.ca> | ||
164 | 3 | Date: Thu, 23 Oct 2014 13:56:52 -0400 | ||
165 | 4 | Subject: [PATCH] Add PrimaryConnectionType property to the manager | ||
166 | 5 | |||
167 | 6 | This will provide an extremely easy way for applications to find out | ||
168 | 7 | what type of connection the system is currently using. They might want | ||
169 | 8 | to do this to avoid using data if a phone is on a 3G connection, for | ||
170 | 9 | example. | ||
171 | 10 | |||
172 | 11 | Backported from https://bugzilla.gnome.org/show_bug.cgi?id=739080 | ||
173 | 12 | --- | ||
174 | 13 | introspection/nm-manager.xml | 8 ++++++++ | ||
175 | 14 | libnm-util/libnm-util.ver | 1 + | ||
176 | 15 | libnm-util/nm-connection.c | 21 +++++++++++++++++++++ | ||
177 | 16 | libnm-util/nm-connection.h | 2 ++ | ||
178 | 17 | src/nm-active-connection.c | 11 +++++++++++ | ||
179 | 18 | src/nm-active-connection.h | 2 ++ | ||
180 | 19 | src/nm-manager.c | 15 +++++++++++++++ | ||
181 | 20 | src/nm-manager.h | 1 + | ||
182 | 21 | 8 files changed, 61 insertions(+) | ||
183 | 22 | |||
184 | 23 | diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml | ||
185 | 24 | index a0e2773..97ffc87 100644 | ||
186 | 25 | --- a/introspection/nm-manager.xml | ||
187 | 26 | +++ b/introspection/nm-manager.xml | ||
188 | 27 | @@ -326,6 +326,14 @@ | ||
189 | 28 | </tp:docstring> | ||
190 | 29 | </property> | ||
191 | 30 | |||
192 | 31 | + <property name="PrimaryConnectionType" type="s" access="read"> | ||
193 | 32 | + <tp:docstring> | ||
194 | 33 | + The connection type of the "primary" active connection being | ||
195 | 34 | + used to access the network. This is the same as the Type | ||
196 | 35 | + property on the object indicated by PrimaryConnection. | ||
197 | 36 | + </tp:docstring> | ||
198 | 37 | + </property> | ||
199 | 38 | + | ||
200 | 39 | <property name="ActivatingConnection" type="o" access="read"> | ||
201 | 40 | <tp:docstring> | ||
202 | 41 | The object path of an active connection that is currently | ||
203 | 42 | diff --git a/libnm-util/libnm-util.ver b/libnm-util/libnm-util.ver | ||
204 | 43 | index 04f2a91..dd68293 100644 | ||
205 | 44 | --- a/libnm-util/libnm-util.ver | ||
206 | 45 | +++ b/libnm-util/libnm-util.ver | ||
207 | 46 | @@ -11,6 +11,7 @@ global: | ||
208 | 47 | nm_connection_error_get_type; | ||
209 | 48 | nm_connection_error_quark; | ||
210 | 49 | nm_connection_for_each_setting_value; | ||
211 | 50 | + nm_connection_get_connection_type; | ||
212 | 51 | nm_connection_get_id; | ||
213 | 52 | nm_connection_get_path; | ||
214 | 53 | nm_connection_get_setting; | ||
215 | 54 | diff --git a/libnm-util/nm-connection.c b/libnm-util/nm-connection.c | ||
216 | 55 | index 15b1685..e684138 100644 | ||
217 | 56 | --- a/libnm-util/nm-connection.c | ||
218 | 57 | +++ b/libnm-util/nm-connection.c | ||
219 | 58 | @@ -1249,6 +1249,27 @@ nm_connection_get_id (NMConnection *connection) | ||
220 | 59 | return nm_setting_connection_get_id (s_con); | ||
221 | 60 | } | ||
222 | 61 | |||
223 | 62 | +/** | ||
224 | 63 | + * nm_connection_get_connection_type: | ||
225 | 64 | + * @connection: the #NMConnection | ||
226 | 65 | + * | ||
227 | 66 | + * A shortcut to return the type from the connection's #NMSettingConnection. | ||
228 | 67 | + * | ||
229 | 68 | + * Returns: the type from the connection's 'connection' setting | ||
230 | 69 | + **/ | ||
231 | 70 | +const char * | ||
232 | 71 | +nm_connection_get_connection_type (NMConnection *connection) | ||
233 | 72 | +{ | ||
234 | 73 | + NMSettingConnection *s_con; | ||
235 | 74 | + | ||
236 | 75 | + g_return_val_if_fail (NM_IS_CONNECTION (connection), NULL); | ||
237 | 76 | + | ||
238 | 77 | + s_con = nm_connection_get_setting_connection (connection); | ||
239 | 78 | + g_return_val_if_fail (s_con != NULL, NULL); | ||
240 | 79 | + | ||
241 | 80 | + return nm_setting_connection_get_connection_type (s_con); | ||
242 | 81 | +} | ||
243 | 82 | + | ||
244 | 83 | /*************************************************************/ | ||
245 | 84 | |||
246 | 85 | /** | ||
247 | 86 | diff --git a/libnm-util/nm-connection.h b/libnm-util/nm-connection.h | ||
248 | 87 | index 4d060cc..d6a18f7 100644 | ||
249 | 88 | --- a/libnm-util/nm-connection.h | ||
250 | 89 | +++ b/libnm-util/nm-connection.h | ||
251 | 90 | @@ -187,6 +187,8 @@ const char * nm_connection_get_uuid (NMConnection *connection); | ||
252 | 91 | |||
253 | 92 | const char * nm_connection_get_id (NMConnection *connection); | ||
254 | 93 | |||
255 | 94 | +const char * nm_connection_get_connection_type (NMConnection *connection); | ||
256 | 95 | + | ||
257 | 96 | NMSetting8021x * nm_connection_get_setting_802_1x (NMConnection *connection); | ||
258 | 97 | NMSettingBluetooth * nm_connection_get_setting_bluetooth (NMConnection *connection); | ||
259 | 98 | NMSettingBond * nm_connection_get_setting_bond (NMConnection *connection); | ||
260 | 99 | diff --git a/src/nm-active-connection.c b/src/nm-active-connection.c | ||
261 | 100 | index 6e3a5da..5faded1 100644 | ||
262 | 101 | --- a/src/nm-active-connection.c | ||
263 | 102 | +++ b/src/nm-active-connection.c | ||
264 | 103 | @@ -137,6 +137,17 @@ nm_active_connection_get_connection (NMActiveConnection *self) | ||
265 | 104 | } | ||
266 | 105 | |||
267 | 106 | const char * | ||
268 | 107 | +nm_active_connection_get_connection_type (NMActiveConnection *self) | ||
269 | 108 | +{ | ||
270 | 109 | + NMActiveConnectionPrivate *priv = NM_ACTIVE_CONNECTION_GET_PRIVATE (self); | ||
271 | 110 | + | ||
272 | 111 | + if (priv->connection == NULL) | ||
273 | 112 | + return NULL; | ||
274 | 113 | + | ||
275 | 114 | + return nm_connection_get_connection_type (priv->connection); | ||
276 | 115 | +} | ||
277 | 116 | + | ||
278 | 117 | +const char * | ||
279 | 118 | nm_active_connection_get_path (NMActiveConnection *self) | ||
280 | 119 | { | ||
281 | 120 | return NM_ACTIVE_CONNECTION_GET_PRIVATE (self)->path; | ||
282 | 121 | diff --git a/src/nm-active-connection.h b/src/nm-active-connection.h | ||
283 | 122 | index 2f17c58..0401f88 100644 | ||
284 | 123 | --- a/src/nm-active-connection.h | ||
285 | 124 | +++ b/src/nm-active-connection.h | ||
286 | 125 | @@ -70,6 +70,8 @@ void nm_active_connection_export (NMActiveConnection *self); | ||
287 | 126 | NMConnection *nm_active_connection_get_connection (NMActiveConnection *self); | ||
288 | 127 | const char * nm_active_connection_get_name (NMActiveConnection *self); | ||
289 | 128 | |||
290 | 129 | +const char * nm_active_connection_get_connection_type (NMActiveConnection *self); | ||
291 | 130 | + | ||
292 | 131 | const char * nm_active_connection_get_path (NMActiveConnection *self); | ||
293 | 132 | |||
294 | 133 | const char * nm_active_connection_get_specific_object (NMActiveConnection *self); | ||
295 | 134 | diff --git a/src/nm-manager.c b/src/nm-manager.c | ||
296 | 135 | index 9c82d14..11a50f2 100644 | ||
297 | 136 | --- a/src/nm-manager.c | ||
298 | 137 | +++ b/src/nm-manager.c | ||
299 | 138 | @@ -291,6 +291,7 @@ enum { | ||
300 | 139 | PROP_ACTIVE_CONNECTIONS, | ||
301 | 140 | PROP_CONNECTIVITY, | ||
302 | 141 | PROP_PRIMARY_CONNECTION, | ||
303 | 142 | + PROP_PRIMARY_CONNECTION_TYPE, | ||
304 | 143 | PROP_ACTIVATING_CONNECTION, | ||
305 | 144 | |||
306 | 145 | /* Not exported */ | ||
307 | 146 | @@ -4054,6 +4055,7 @@ policy_default_device_changed (GObject *object, GParamSpec *pspec, gpointer user | ||
308 | 147 | priv->primary_connection = ac ? g_object_ref (ac) : NULL; | ||
309 | 148 | nm_log_dbg (LOGD_CORE, "PrimaryConnection now %s", ac ? nm_active_connection_get_name (ac) : "(none)"); | ||
310 | 149 | g_object_notify (G_OBJECT (self), NM_MANAGER_PRIMARY_CONNECTION); | ||
311 | 150 | + g_object_notify (G_OBJECT (self), NM_MANAGER_PRIMARY_CONNECTION_TYPE); | ||
312 | 151 | } | ||
313 | 152 | } | ||
314 | 153 | |||
315 | 154 | @@ -4660,6 +4662,7 @@ get_property (GObject *object, guint prop_id, | ||
316 | 155 | GSList *iter; | ||
317 | 156 | GPtrArray *active; | ||
318 | 157 | const char *path; | ||
319 | 158 | + const char *type; | ||
320 | 159 | |||
321 | 160 | switch (prop_id) { | ||
322 | 161 | case PROP_VERSION: | ||
323 | 162 | @@ -4705,6 +4708,10 @@ get_property (GObject *object, guint prop_id, | ||
324 | 163 | path = priv->primary_connection ? nm_active_connection_get_path (priv->primary_connection) : "/"; | ||
325 | 164 | g_value_set_boxed (value, path); | ||
326 | 165 | break; | ||
327 | 166 | + case PROP_PRIMARY_CONNECTION_TYPE: | ||
328 | 167 | + type = priv->primary_connection ? nm_active_connection_get_connection_type (priv->primary_connection) : NULL; | ||
329 | 168 | + g_value_set_string (value, type ? type : ""); | ||
330 | 169 | + break; | ||
331 | 170 | case PROP_ACTIVATING_CONNECTION: | ||
332 | 171 | path = priv->activating_connection ? nm_active_connection_get_path (priv->activating_connection) : "/"; | ||
333 | 172 | g_value_set_boxed (value, path); | ||
334 | 173 | @@ -4981,6 +4988,14 @@ nm_manager_class_init (NMManagerClass *manager_class) | ||
335 | 174 | G_PARAM_READABLE)); | ||
336 | 175 | |||
337 | 176 | g_object_class_install_property | ||
338 | 177 | + (object_class, PROP_PRIMARY_CONNECTION_TYPE, | ||
339 | 178 | + g_param_spec_string (NM_MANAGER_PRIMARY_CONNECTION_TYPE, "", "", | ||
340 | 179 | + NULL, | ||
341 | 180 | + G_PARAM_READABLE | | ||
342 | 181 | + G_PARAM_STATIC_STRINGS)); | ||
343 | 182 | + | ||
344 | 183 | + | ||
345 | 184 | + g_object_class_install_property | ||
346 | 185 | (object_class, PROP_ACTIVATING_CONNECTION, | ||
347 | 186 | g_param_spec_boxed (NM_MANAGER_ACTIVATING_CONNECTION, | ||
348 | 187 | "Activating connection", | ||
349 | 188 | diff --git a/src/nm-manager.h b/src/nm-manager.h | ||
350 | 189 | index 9884d05..a0c9065 100644 | ||
351 | 190 | --- a/src/nm-manager.h | ||
352 | 191 | +++ b/src/nm-manager.h | ||
353 | 192 | @@ -61,6 +61,7 @@ typedef enum { | ||
354 | 193 | #define NM_MANAGER_ACTIVE_CONNECTIONS "active-connections" | ||
355 | 194 | #define NM_MANAGER_CONNECTIVITY "connectivity" | ||
356 | 195 | #define NM_MANAGER_PRIMARY_CONNECTION "primary-connection" | ||
357 | 196 | +#define NM_MANAGER_PRIMARY_CONNECTION_TYPE "primary-connection-type" | ||
358 | 197 | #define NM_MANAGER_ACTIVATING_CONNECTION "activating-connection" | ||
359 | 198 | |||
360 | 199 | /* Not exported */ | ||
361 | 200 | -- | ||
362 | 201 | 2.1.0 | ||
363 | 202 | |||
364 | 0 | 203 | ||
365 | === modified file 'debian/patches/series' | |||
366 | --- debian/patches/series 2014-10-15 19:24:43 +0000 | |||
367 | +++ debian/patches/series 2014-10-24 13:10:24 +0000 | |||
368 | @@ -43,3 +43,5 @@ | |||
369 | 43 | remove-extra-scan_done-on-scan-start.patch | 43 | remove-extra-scan_done-on-scan-start.patch |
370 | 44 | scan_update_last_seen.patch | 44 | scan_update_last_seen.patch |
371 | 45 | cull_aps_on_scan_done_signal.patch | 45 | cull_aps_on_scan_done_signal.patch |
372 | 46 | powersave.patch | ||
373 | 47 | primary_connection_type.patch |
LGTM
Will create a patch and test to see if it actually works as expected (before top approval).