mirror of
https://github.com/lakinduakash/linux-wifi-hotspot.git
synced 2024-11-21 19:40:11 +00:00
Add ieee80211ac ieee80211n
This commit is contained in:
parent
e07d175ea5
commit
f3f013d12f
@ -388,6 +388,38 @@
|
||||
<property name="height">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cb_ieee80211n">
|
||||
<property name="label" translatable="yes">IEEE80211n</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="cb_ieee80211ac">
|
||||
<property name="label" translatable="yes">IEEE80211ac</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="top_attach">8</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
|
@ -122,6 +122,14 @@ const char *build_wh_mkconfig_command(ConfigValues* cv){
|
||||
strcat(cmd_mkconfig,cv->channel);
|
||||
}
|
||||
|
||||
if(cv->ieee80211n!=NULL && (strcmp(cv->ieee80211n,"1") == 0)){
|
||||
strcat(cmd_mkconfig," --ieee80211n ");
|
||||
}
|
||||
|
||||
if(cv->ieee80211ac!=NULL && (strcmp(cv->ieee80211ac,"1") == 0)){
|
||||
strcat(cmd_mkconfig," --ieee80211ac ");
|
||||
}
|
||||
|
||||
if(cv->mac!=NULL) {
|
||||
strcat(cmd_mkconfig, " --mac ");
|
||||
strcat(cmd_mkconfig, cv->mac);
|
||||
|
@ -122,6 +122,12 @@ static void setConfigValues(const char * key, char *value){
|
||||
if( !strcmp ( MAC_FILTER_ACCEP, key ))
|
||||
configValues.accepted_mac_file = value;
|
||||
|
||||
if( !strcmp ( IEEE80211N, key ))
|
||||
configValues.ieee80211n = value;
|
||||
|
||||
if( !strcmp ( IEEE80211AC, key ))
|
||||
configValues.ieee80211ac = value;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -88,6 +88,8 @@ typedef struct{
|
||||
char *mac_filter;
|
||||
char *accepted_mac_file;
|
||||
char *accepted_macs;
|
||||
char *ieee80211n;
|
||||
char *ieee80211ac;
|
||||
} ConfigValues;
|
||||
|
||||
|
||||
|
24
src/ui/ui.c
24
src/ui/ui.c
@ -78,6 +78,8 @@ GtkCheckButton *cb_novirt;
|
||||
GtkCheckButton *cb_channel;
|
||||
GtkCheckButton *cb_open;
|
||||
GtkCheckButton *cb_mac_filter;
|
||||
GtkCheckButton *cb_ieee80211n;
|
||||
GtkCheckButton *cb_ieee80211ac;
|
||||
|
||||
GtkProgressBar *progress_bar;
|
||||
|
||||
@ -370,6 +372,8 @@ int initUi(int argc, char *argv[]){
|
||||
cb_channel = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_channel");
|
||||
cb_open = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_open");
|
||||
cb_mac_filter = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_mac_filter");
|
||||
cb_ieee80211n = (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211n");
|
||||
cb_ieee80211ac= (GtkCheckButton *) gtk_builder_get_object(builder, "cb_ieee80211ac");
|
||||
|
||||
rb_freq_auto = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_auto");
|
||||
rb_freq_2 = (GtkRadioButton *) gtk_builder_get_object(builder, "rb_freq_2");
|
||||
@ -459,6 +463,16 @@ void init_ui_from_config(){
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_psk,TRUE);
|
||||
}
|
||||
|
||||
if(strcmp(values->ieee80211n,"1")==0){
|
||||
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_ieee80211n,TRUE);
|
||||
}
|
||||
|
||||
if(strcmp(values->ieee80211ac,"1")==0){
|
||||
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_ieee80211ac,TRUE);
|
||||
}
|
||||
|
||||
if(strcmp(values->channel,"")!=0 && strcmp(values->channel,"default")!=0){
|
||||
gtk_toggle_button_set_active((GtkToggleButton*) cb_channel,TRUE);
|
||||
gtk_entry_set_text(entry_channel,values->channel);
|
||||
@ -801,6 +815,16 @@ static int init_config_val_input(ConfigValues* cv){
|
||||
else
|
||||
cv->use_psk =NULL;
|
||||
|
||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_ieee80211n)))
|
||||
cv->ieee80211n = "1";
|
||||
else
|
||||
cv->ieee80211n =NULL;
|
||||
|
||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_ieee80211ac)))
|
||||
cv->ieee80211ac = "1";
|
||||
else
|
||||
cv->ieee80211ac =NULL;
|
||||
|
||||
if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_mac_filter))){
|
||||
|
||||
cv->mac_filter = "1";
|
||||
|
Loading…
Reference in New Issue
Block a user