Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

135 lines (106 sloc) 3.347 kb
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
source ~/.git-completion.sh
source ~/.git-prompt.sh
export LOCALVERSION=
export HISTCONTROL=ignoredups
export HISTCONTROL=ignoreboth
export EDITOR="emacsclient -c"
export PATH="/home/sujith/dev/sparse:$PATH"
txtblk='\e[0;30m' # Black - Regular
txtgrn='\e[0;32m' # Green
txtred='\e[0;31m' # Red
txtrst='\e[0m' # Text Reset
PS1="\u@\[$txtgrn\]\h\[$txtrst\] "'\W$(__git_ps1 \[$txtred\]" (%s)"\[$txtrst\])\$ '
# General Aliases
alias ls='ls --color=auto'
alias l='ls'
alias ll='ls -lh'
alias lt='ls -lthr'
alias gl='git log'
alias gd='git diff'
alias gc='git commit -a -s -v'
alias se="EDITOR=\"emacsclient -c -a emacs\" sudoedit"
alias qd='quilt diff > /tmp/diff.patch && emacsclient -c /tmp/diff.patch'
alias klog='journalctl -b -f _TRANSPORT=kernel'
# Debugfs shortcuts
WATCH="watch -n 0.1 cat"
PHY="/sys/kernel/debug/ieee80211/phy*"
WLAN="wlan0"
alias wrcstat='${WATCH} ${PHY}/netdev\:${WLAN}/stations/*/rc_stats'
alias wnode='${WATCH} ${PHY}/netdev\:${WLAN}/stations/*/node_stat'
alias wqueues='${WATCH} ${PHY}/ath9k/queues'
alias wxmit='${WATCH} ${PHY}/ath9k/xmit'
alias wrecv='${WATCH} ${PHY}/ath9k/recv'
alias wint='${WATCH} ${PHY}/ath9k/interrupt'
# Wireless usage
alias up='ifconfig ${WLAN} up'
alias down='ifconfig ${WLAN} down'
alias scan='iw dev ${WLAN} scan | grep SSID'
alias wlink='iw dev ${WLAN} link'
alias wip='ifconfig ${WLAN} 172.16.1.111'
# Compilation
function mkkernel () {
make O=build/ tar-pkg -j 4
make O=build-nodebug/ tar-pkg -j 4
}
# Module loading/unloading
function _load () {
(insmod ~/dev/mod/ath.ko \
&& insmod ~/dev/mod/ath9k_hw.ko \
&& insmod ~/dev/mod/ath9k_common.ko \
&& insmod ~/dev/mod/ath9k.ko $*) && echo "Loaded ath9k"
}
function unload () {
(rmmod ath9k && rmmod ath9k_common && rmmod ath9k_hw && rmmod ath) && echo "Unloaded ath9k"
}
function _loadc () {
(insmod ~/dev/mod/ath.ko \
&& insmod ~/dev/mod/ath9k_hw.ko \
&& insmod ~/dev/mod/ath9k_common.ko \
&& insmod ~/dev/mod/ath9k_htc.ko $*) && echo "Loaded ath9k_htc"
}
function unloadc () {
(rmmod ath9k_htc && rmmod ath9k_common && rmmod ath9k_hw && rmmod ath) && echo "Unloaded ath9k_htc"
}
function _l10k () {
(insmod ~/dev/mod/ath10k_core.ko $* && insmod ~/dev/mod/ath10k_pci.ko) && echo "Loaded ath10k"
}
function u10k () {
(rmmod ath10k_pci && rmmod ath10k_core) && echo "unloaded ath10k"
}
alias load='_load debug=0x8f49'
alias loadb='_load debug=0x18f49'
alias loadc='_loadc debug=0x8f49'
alias l10k='_l10k debug_mask=0xffffffff'
# Patch submission
function send_patches () {
git send-email \
--from="Sujith Manoharan <sujith@msujith.org>" \
--smtp-user="sujith@msujith.org" \
--smtp-server="mail.msujith.org" \
--smtp-server-port="465" \
--smtp-encryption="ssl" \
--suppress-cc="self" \
--suppress-cc="author" \
--suppress-cc="sob" \
--to="$1" --cc="$2" \
upstream-patches/*
}
function ath9kpatches () {
send_patches "linux-wireless@vger.kernel.org"
}
function openwrtpatches () {
send_patches "openwrt-devel@lists.openwrt.org"
}
function mac80211patches () {
send_patches "Johannes Berg <johannes@sipsolutions.net>" \
"linux-wireless@vger.kernel.org"
}
function hostapdpatches () {
send_patches "Jouni Malinen <j@w1.fi>" \
"hostap@lists.shmoo.com"
}
Jump to Line
Something went wrong with that request. Please try again.