wifi: support ap-mode with wpa_supplicant

A new value for NM80211Mode is introduced (NM_802_11_MODE_AP) and the
new mode is passed to wpa_supplicant analogous to adhoc-mode.
The places which need to know the interface mode have been extended to
handle the new mode.

If the configuration does not contain a fixed frequency, a channel is
selected the same way as with adhoc-mode before.
This commit is contained in:
Jan Luebbe
2012-07-06 14:47:48 +02:00
committed by Dan Williams
parent 802e868f0f
commit f9c72dee3e
17 changed files with 140 additions and 46 deletions

View File

@@ -96,7 +96,9 @@ gboolean
wifi_utils_set_mode (WifiData *data, const NM80211Mode mode)
{
g_return_val_if_fail (data != NULL, FALSE);
g_return_val_if_fail ((mode == NM_802_11_MODE_INFRA) || (mode == NM_802_11_MODE_ADHOC), FALSE);
g_return_val_if_fail ( (mode == NM_802_11_MODE_INFRA)
|| (mode == NM_802_11_MODE_AP)
|| (mode == NM_802_11_MODE_ADHOC), FALSE);
/* nl80211 probably doesn't need this */
return data->set_mode ? data->set_mode (data, mode) : TRUE;