* Anyone working on making iw able to specify MAC address at station creation time? @ 2014-09-04 17:51 Ben Greear 2014-09-05 6:33 ` Johannes Berg 0 siblings, 1 reply; 5+ messages in thread From: Ben Greear @ 2014-09-04 17:51 UTC (permalink / raw) To: linux-wireless@vger.kernel.org I'm having issues with udev renaming newly created stations when I have udev rules for wlanX, when wlanX is not already existing. I think specifying MAC on station creation time would solve my problems, but haven't looked closely yet. My version of 'iw' doesn't support setting the MAC on creation, from what I can tel. Curious if anyone else is working on this? Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Anyone working on making iw able to specify MAC address at station creation time? 2014-09-04 17:51 Anyone working on making iw able to specify MAC address at station creation time? Ben Greear @ 2014-09-05 6:33 ` Johannes Berg 2014-09-30 17:16 ` Ben Greear 2014-09-30 17:44 ` Ben Greear 0 siblings, 2 replies; 5+ messages in thread From: Johannes Berg @ 2014-09-05 6:33 UTC (permalink / raw) To: Ben Greear, Marcel Holtmann; +Cc: linux-wireless@vger.kernel.org On Thu, 2014-09-04 at 10:51 -0700, Ben Greear wrote: > I'm having issues with udev renaming newly created stations when I have > udev rules for wlanX, when wlanX is not already existing. > > I think specifying MAC on station creation time would solve my problems, > but haven't looked closely yet. > > My version of 'iw' doesn't support setting the MAC on creation, from > what I can tel. > > Curious if anyone else is working on this? I think Marcel mentioned wanting this before. There's even an attribute in nl80211 already, but it can only be used for P2P_DEVICE I believe, so a feature flag or so would be needed to be able to know whether or not this would be expected to take any effect (kernels before those future changes would ignore the attribute for non-P2P-DEVICE I believe) Haven't looked at the code right now, this is all I know. johannes ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Anyone working on making iw able to specify MAC address at station creation time? 2014-09-05 6:33 ` Johannes Berg @ 2014-09-30 17:16 ` Ben Greear 2014-09-30 17:44 ` Ben Greear 1 sibling, 0 replies; 5+ messages in thread From: Ben Greear @ 2014-09-30 17:16 UTC (permalink / raw) To: Johannes Berg; +Cc: Marcel Holtmann, linux-wireless@vger.kernel.org On 09/04/2014 11:33 PM, Johannes Berg wrote: > On Thu, 2014-09-04 at 10:51 -0700, Ben Greear wrote: >> I'm having issues with udev renaming newly created stations when I have >> udev rules for wlanX, when wlanX is not already existing. >> >> I think specifying MAC on station creation time would solve my problems, >> but haven't looked closely yet. >> >> My version of 'iw' doesn't support setting the MAC on creation, from >> what I can tel. >> >> Curious if anyone else is working on this? > > I think Marcel mentioned wanting this before. There's even an attribute > in nl80211 already, but it can only be used for P2P_DEVICE I believe, so > a feature flag or so would be needed to be able to know whether or not > this would be expected to take any effect (kernels before those future > changes would ignore the attribute for non-P2P-DEVICE I believe) > > Haven't looked at the code right now, this is all I know. In the iw code, it seems that the arguments: mesh_id, 4addr, flags cannot be used at the same time? I want to add an option pass an optional mac-address as well. It would be easier if I processed args in a loop and removed the exclusivity on those 3 above, but if they do need to remain exclusive, then I can do that too: static int handle_interface_add(struct nl80211_state *state, struct nl_cb *cb, struct nl_msg *msg, int argc, char **argv, enum id_input id) { char *name; char *mesh_id = NULL; enum nl80211_iftype type; int tpset; if (argc < 1) return 1; name = argv[0]; argc--; argv++; tpset = get_if_type(&argc, &argv, &type, true); if (tpset) return tpset; if (argc) { if (strcmp(argv[0], "mesh_id") == 0) { argc--; argv++; if (!argc) return 1; mesh_id = argv[0]; argc--; argv++; } else if (strcmp(argv[0], "4addr") == 0) { argc--; argv++; if (parse_4addr_flag(argv[0], msg)) { fprintf(stderr, "4addr error\n"); return 2; } argc--; argv++; } else if (strcmp(argv[0], "flags") == 0) { argc--; argv++; if (parse_mntr_flags(&argc, &argv, msg)) { fprintf(stderr, "flags error\n"); return 2; } } else { return 1; } } if (argc) return 1; Thanks, Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Anyone working on making iw able to specify MAC address at station creation time? 2014-09-05 6:33 ` Johannes Berg 2014-09-30 17:16 ` Ben Greear @ 2014-09-30 17:44 ` Ben Greear 2014-10-01 8:25 ` Arend van Spriel 1 sibling, 1 reply; 5+ messages in thread From: Ben Greear @ 2014-09-30 17:44 UTC (permalink / raw) To: Johannes Berg; +Cc: Marcel Holtmann, linux-wireless@vger.kernel.org On 09/04/2014 11:33 PM, Johannes Berg wrote: > On Thu, 2014-09-04 at 10:51 -0700, Ben Greear wrote: >> I'm having issues with udev renaming newly created stations when I have >> udev rules for wlanX, when wlanX is not already existing. >> >> I think specifying MAC on station creation time would solve my problems, >> but haven't looked closely yet. >> >> My version of 'iw' doesn't support setting the MAC on creation, from >> what I can tel. >> >> Curious if anyone else is working on this? > > I think Marcel mentioned wanting this before. There's even an attribute > in nl80211 already, but it can only be used for P2P_DEVICE I believe, so > a feature flag or so would be needed to be able to know whether or not > this would be expected to take any effect (kernels before those future > changes would ignore the attribute for non-P2P-DEVICE I believe) >From what I can tell, cfg80211 does parse the macaddr for p2p-device, but I don't see it used in mac80211/iface.c ieee80211_if_add. Am I missing something? Thanks, Ben > > Haven't looked at the code right now, this is all I know. > > johannes > -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Anyone working on making iw able to specify MAC address at station creation time? 2014-09-30 17:44 ` Ben Greear @ 2014-10-01 8:25 ` Arend van Spriel 0 siblings, 0 replies; 5+ messages in thread From: Arend van Spriel @ 2014-10-01 8:25 UTC (permalink / raw) To: Ben Greear; +Cc: Johannes Berg, Marcel Holtmann, linux-wireless@vger.kernel.org On 09/30/14 19:44, Ben Greear wrote: > On 09/04/2014 11:33 PM, Johannes Berg wrote: >> On Thu, 2014-09-04 at 10:51 -0700, Ben Greear wrote: >>> I'm having issues with udev renaming newly created stations when I have >>> udev rules for wlanX, when wlanX is not already existing. >>> >>> I think specifying MAC on station creation time would solve my problems, >>> but haven't looked closely yet. >>> >>> My version of 'iw' doesn't support setting the MAC on creation, from >>> what I can tel. >>> >>> Curious if anyone else is working on this? >> >> I think Marcel mentioned wanting this before. There's even an attribute >> in nl80211 already, but it can only be used for P2P_DEVICE I believe, so >> a feature flag or so would be needed to be able to know whether or not >> this would be expected to take any effect (kernels before those future >> changes would ignore the attribute for non-P2P-DEVICE I believe) > > From what I can tell, cfg80211 does parse the macaddr for p2p-device, > but I don't see it used in mac80211/iface.c ieee80211_if_add. > > Am I missing something? Hi Ben, It has been a while ago since I added this, but it could be that only brcmfmac is the only driver looking at the mac address parameter and that is a cfg80211 driver. Regards, Arend --8<----------------------------------------------------------------- commit 1c18f1452a772dfe884ed25677bddb3ecaf9c43a Author: Arend van Spriel <arend@broadcom.com> Date: Tue Jan 8 10:17:27 2013 +0100 nl80211: allow user-space to set address for P2P_DEVICE As per email discussion Jouni Malinen pointed out that: "P2P message exchanges can be executed on the current operating channel of any operation (both P2P and non-P2P station). These can be on 5 GHz and even on 60 GHz (so yes, you _can_ do GO Negotiation on 60 GHz). As an example, it would be possible to receive a GO Negotiation Request frame on a 5 GHz only radio and then to complete GO Negotiation on that band. This can happen both when connected to a P2P group (through client discoverability mechanism) and when connected to a legacy AP (assuming the station receive Probe Request frame from full scan in the beginning of P2P device discovery)." This means that P2P messages can be sent over different radio devices. However, these should use the same P2P device address so it should be able to provision this from user-space. This patch adds a parameter for this to struct vif_params which should only be used during creation of the P2P device interface. Cc: Jouni Malinen <j@w1.fi> Cc: Greg Goldman <ggoldman@broadcom.com> Cc: Jithu Jance <jithu@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> [add error checking] Signed-off-by: Johannes Berg <johannes.berg@intel.com> include/net/cfg80211.h | 4 ++++ net/wireless/nl80211.c | 7 +++++++ 2 files changed, 11 insertions(+) >> >> Haven't looked at the code right now, this is all I know. >> >> johannes >> > > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-10-01 8:25 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-09-04 17:51 Anyone working on making iw able to specify MAC address at station creation time? Ben Greear 2014-09-05 6:33 ` Johannes Berg 2014-09-30 17:16 ` Ben Greear 2014-09-30 17:44 ` Ben Greear 2014-10-01 8:25 ` Arend van Spriel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).