LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-28-2017, 06:59 AM   #1
anon007
LQ Newbie
 
Registered: Jul 2017
Posts: 7

Rep: Reputation: Disabled
Post Patch proposed for kernel 4.9 of the debian 9.1.0 by Amos Tibaldi, the short version


Code:
tibaldi@localhost:/usr/src/linux-source-4.9$ grep -r "send\ auth\ t" *
Binary file net/mac80211/mlme.o matches
Binary file net/mac80211/mac80211.o matches
net/mac80211/mlme.c:	sdata_info(sdata, "send auth to %pM (try %d/%d)\n",
Binary file net/mac80211/mac80211.ko matches
tibaldi@localhost:/usr/src/linux-source-4.9$ 
static int ieee80211_auth(struct ieee80211_sub_if_data *sdata)
{
	struct ieee80211_local *local = sdata->local;
	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
	struct ieee80211_mgd_auth_data *auth_data = ifmgd->auth_data;
	u32 tx_flags = 0;
	u16 trans = 1;
	u16 status = 0;
	sdata_assert_lock(sdata);
	if (WARN_ON_ONCE(!auth_data))
		return -EINVAL;
	auth_data->tries++;
	if (auth_data->tries > IEEE80211_AUTH_MAX_TRIES) {
		sdata_info(sdata, "authentication with %pM timed out\n",
			   auth_data->bss->bssid);
		cfg80211_unlink_bss(local->hw.wiphy, auth_data->bss);
		return -ETIMEDOUT;
	}
	drv_mgd_prepare_tx(local, sdata);
	sdata_info(sdata, "send auth to %pM (try %d/%d)\n",
		   auth_data->bss->bssid, auth_data->tries,
		   IEEE80211_AUTH_MAX_TRIES);
	auth_data->expected_transaction = 2;
	if (auth_data->algorithm == WLAN_AUTH_SAE) {
		trans = auth_data->sae_trans;
		status = auth_data->sae_status;
		auth_data->expected_transaction = trans;
	}
	if (ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS))
		tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
			   (IEEE80211_TX_INTFL_MLME_CONN_TX && (!(IEEE80211_TX_CTL_REQ_TX_STATUS)));
	ieee80211_send_auth(sdata, trans, auth_data->algorithm, status,
			    auth_data->data, auth_data->data_len,
			    auth_data->bss->bssid,
			    auth_data->bss->bssid, NULL, 0, 0,
			    tx_flags);
	if (tx_flags == 0) {
		auth_data->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
		auth_data->timeout_started = true;
		run_again(sdata, auth_data->timeout);
	} else {
		auth_data->timeout =
			round_jiffies_up(jiffies + IEEE80211_AUTH_TIMEOUT_LONG);
		auth_data->timeout_started = true;
		run_again(sdata, auth_data->timeout);
	}
	return 0;
}
static int ieee80211_do_assoc(struct ieee80211_sub_if_data *sdata)
{
tibaldi@localhost:~$ cd /usr/src/linux-source-4.9/
tibaldi@localhost:/usr/src/linux-source-4.9$ make -j 9
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/package.h
  CHK     include/generated/utsrelease.h
  CHK     include/generated/timeconst.h
  CHK     include/generated/bounds.h
  CHK     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC [M]  net/mac80211/mlme.o
  LD [M]  net/mac80211/mac80211.o
  Building modules, stage 2.
  DATAREL arch/x86/boot/compressed/vmlinux
Kernel: arch/x86/boot/bzImage is ready  (#1)
  MODPOST 3381 modules
  LD [M]  net/mac80211/mac80211.ko
tibaldi@localhost:/usr/src/linux-source-4.9$
Amos Tibaldi ( tibaldi.amos@gmail.com ), born in Italy; please check the correctness of the patch before applying it. Thanks!
 
Old 07-28-2017, 04:59 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
A few points:
  • As I mentioned in my reply to your other post, Linus Torvalds and the other kernel devs won't see this unless you post it to the Linux kernel mailing list.
  • Code tags look like this: [code] [/code]
  • There's no point in putting your entire post inside [code] tags; only the actual code should be formatted as such.
  • What you've posted is not a patch, but a piece of code intermingled with some other information. It's very hard to read, and it's not even clear which file you've modified.
Use the diff tool to generate a universal patch by comparing the old and new versions of the file in question, then post that to the LKML. That's the official (and only!) way to get a patch for the Linux kernel approved and pushed.
 
Old 08-02-2017, 04:55 PM   #3
anon007
LQ Newbie
 
Registered: Jul 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
Angry dear sir olmy, you're right

Thanks; by the way, my CODE tags were for the formatting in the HTML5 W3C standard.
Code:
 [removed]







Quote:
Originally Posted by Ser Olmy View Post
A few points:
  • As I mentioned in my reply to your other post, Linus Torvalds and the other kernel devs won't see this unless you post it to the Linux kernel mailing list.
  • Code tags look like this: [code] [/code]
  • There's no point in putting your entire post inside [code] tags; only the actual code should be formatted as such.
  • What you've posted is not a patch, but a piece of code intermingled with some other information. It's very hard to read, and it's not even clear which file you've modified.
Use the diff tool to generate a universal patch by comparing the old and new versions of the file in question, then post that to the LKML. That's the official (and only!) way to get a patch for the Linux kernel approved and pushed.
 
Old 08-03-2017, 08:36 AM   #4
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,602

Rep: Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084Reputation: 4084
@AmosTibaldi, that kind of language isn't acceptable here.

--jeremy
 
1 members found this post helpful.
Old 08-03-2017, 01:23 PM   #5
anon007
LQ Newbie
 
Registered: Jul 2017
Posts: 7

Original Poster
Rep: Reputation: Disabled
excuses

Yes, you are right, Jeremy. Forgive me. Thanks.


Quote:
Originally Posted by jeremy View Post
@AmosTibaldi, that kind of language isn't acceptable here.

--jeremy
 
  


Reply

Tags
80211, kernel, patch



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Patch proposed for kernel 4.9 of the debian 9.1.0 by Amos Tibaldi anon007 Linux - Kernel 1 07-26-2017 03:10 PM
LXer: Why I'm running boring ol' Debian Lenny, the short version LXer Syndicated Linux News 0 12-30-2009 08:40 PM
Which version of patch-o-matic+kernel+iptables fits together? Lokiji Linux - Software 0 02-05-2008 09:59 AM
patch for different kernel version flying-tuxman Linux - Newbie 2 11-25-2006 12:22 AM
debian-patch-debianlogo w/2.6.5 kernel-patch-lpp Outabux Debian 11 05-20-2004 01:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:58 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration